Click here to Skip to main content
15,891,253 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
OriginalGriff29-Oct-15 5:43
mveOriginalGriff29-Oct-15 5:43 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 5:46
professionalZurdoDev29-Oct-15 5:46 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 5:47
professionalZurdoDev29-Oct-15 5:47 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Eddy Vluggen29-Oct-15 5:50
professionalEddy Vluggen29-Oct-15 5:50 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 5:53
professionalZurdoDev29-Oct-15 5:53 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Eddy Vluggen29-Oct-15 6:01
professionalEddy Vluggen29-Oct-15 6:01 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Robert g Blair1-Nov-15 17:40
Robert g Blair1-Nov-15 17:40 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Kevin McFarlane29-Oct-15 8:02
Kevin McFarlane29-Oct-15 8:02 
Having a single return is a guideline that I mostly follow. First I aim for short functions so it tends not to be a problem. Secondly returning initially after a condition check and then again at the end is common and fine. Sometimes it actually reads better that way. But long spaghetti methods with returns all over the place is definitely a no-no.

Again, I once had to maintain some code in which the single return rule was followed slavishly. The code was mostly pretty impressive but in one case there was a bug caused precisely by slavishly adhering to this rule.
Kevin

GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
ZurdoDev29-Oct-15 8:20
professionalZurdoDev29-Oct-15 8:20 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Richard Deeming29-Oct-15 4:30
mveRichard Deeming29-Oct-15 4:30 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
OriginalGriff29-Oct-15 5:31
mveOriginalGriff29-Oct-15 5:31 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Jörgen Andersson29-Oct-15 6:52
professionalJörgen Andersson29-Oct-15 6:52 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
F-ES Sitecore29-Oct-15 4:36
professionalF-ES Sitecore29-Oct-15 4:36 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Duncan Edwards Jones29-Oct-15 4:39
professionalDuncan Edwards Jones29-Oct-15 4:39 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Rob Philpott29-Oct-15 5:06
Rob Philpott29-Oct-15 5:06 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
U. G. Leander29-Oct-15 5:00
professionalU. G. Leander29-Oct-15 5:00 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Jeremy Falcon29-Oct-15 6:56
professionalJeremy Falcon29-Oct-15 6:56 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Roger Wright29-Oct-15 12:58
professionalRoger Wright29-Oct-15 12:58 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Chris Maunder29-Oct-15 17:59
cofounderChris Maunder29-Oct-15 17:59 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Pirate Guy29-Oct-15 20:16
Pirate Guy29-Oct-15 20:16 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Sander Rossel29-Oct-15 22:03
professionalSander Rossel29-Oct-15 22:03 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Kevin Bewley30-Oct-15 0:53
Kevin Bewley30-Oct-15 0:53 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Sander Rossel30-Oct-15 1:20
professionalSander Rossel30-Oct-15 1:20 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
Brady Kelly30-Oct-15 1:27
Brady Kelly30-Oct-15 1:27 
GeneralRe: Coding - so what's a crime and whats a misdemeanor? Pin
PIEBALDconsult31-Oct-15 7:10
mvePIEBALDconsult31-Oct-15 7:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.