Click here to Skip to main content

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrasing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Most Unhelpful Message Ever PinmemberChad3F7-Sep-13 13:40 
GeneralRe: Most Unhelpful Message Ever Pinmemberpasztorpisti7-Sep-13 14:09 
GeneralRe: Most Unhelpful Message Ever PinmemberCIDev30-Aug-13 6:35 
GeneralRe: Most Unhelpful Message Ever Pinmemberpasztorpisti7-Sep-13 1:34 
QuestionWhich code you suggest? PinprofessionalRajesh Anuhya24-Jul-13 21:04 
AnswerRe: Which code you suggest? PinmemberNeverJustHere24-Jul-13 22:02 
GeneralRe: Which code you suggest? PinmemberReelix25-Jul-13 22:36 
GeneralRe: Which code you suggest? PinmemberKP Lee26-Jul-13 18:21 
AnswerRe: Which code you suggest? Pinprofessional_Damian S_24-Jul-13 22:02 
AnswerRe: Which code you suggest? Pinmemberihoecken25-Jul-13 4:42 
AnswerRe: Which code you suggest? Pinmemberryanb3125-Jul-13 5:48 
GeneralRe: Which code you suggest? PinprotectorOriginalGriff25-Jul-13 6:04 
GeneralRe: Which code you suggest? Pinmemberryanb3125-Jul-13 6:11 
GeneralRe: Which code you suggest? PinmemberSentenryu25-Jul-13 8:15 
ryanb31 wrote:
Generally speaking the amount of time saved by returning in various places is negligible.

 
Generalization is Bad. what would you say if there was a database access on that loop? or a file read/write? a service call? are those so rare that they can't be considered "general"?
 
I'm ok with having one single return point, provided that the method doesn't do any significant work. the general rule should be to exit as soon as you finish the work or realize there's nothing more to be done.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
 
"Given the chance I'd rather work smart than work hard." - PHS241
 
"'Sophisticated platform' typically means 'I have no idea how it works.'"

GeneralRe: Which code you suggest? Pinmemberryanb3125-Jul-13 8:32 
GeneralRe: Which code you suggest? PinprotectorOriginalGriff25-Jul-13 9:26 
GeneralRe: Which code you suggest? Pinmemberryanb3125-Jul-13 9:28 
GeneralRe: Which code you suggest? PinprotectorOriginalGriff25-Jul-13 9:31 
GeneralRe: Which code you suggest? Pinmemberryanb3125-Jul-13 9:35 
GeneralRe: Which code you suggest? PinmemberAndrew Leeder25-Jul-13 23:34 
GeneralRe: Which code you suggest? PinprotectorOriginalGriff25-Jul-13 23:50 
GeneralRe: Which code you suggest? PinmemberSortaCore26-Jul-13 0:15 
GeneralRe: Which code you suggest? PinprotectorOriginalGriff26-Jul-13 0:22 
GeneralRe: Which code you suggest? PinmemberSortaCore26-Jul-13 0:39 
GeneralRe: Which code you suggest? PinmemberStefan_Lang26-Jul-13 1:19 
GeneralRe: Which code you suggest? PinprotectorOriginalGriff26-Jul-13 1:26 
GeneralRe: Which code you suggest? PinmemberStefan_Lang26-Jul-13 2:27 
GeneralRe: Which code you suggest? Pinmembersvella26-Jul-13 5:42 
QuestionRe: Which code you suggest? PinprofessionalAmir Mohammad Nasrollahi28-Jul-13 2:55 
GeneralRe: Which code you suggest? PinmemberStefan_Lang28-Jul-13 23:21 
GeneralRe: Which code you suggest? Pinmembersvella29-Jul-13 5:02 
GeneralRe: Which code you suggest? PinmemberStefan_Lang29-Jul-13 23:48 
GeneralRe: Which code you suggest? Pinmembersvella30-Jul-13 4:57 
GeneralRe: Which code you suggest? PinprofessionalPIEBALDconsult30-Jul-13 6:44 
GeneralRe: Which code you suggest? PinmemberRenzo Ciafardone27-Jul-13 17:49 
GeneralRe: Which code you suggest? PinmemberFabio Franco26-Jul-13 3:59 
GeneralRe: Which code you suggest? PinmemberKlaus-Werner Konrad1-Aug-13 13:32 
GeneralRe: Which code you suggest? PinmemberSentenryu25-Jul-13 9:46 
GeneralRe: Which code you suggest? Pinmemberryanb3130-Jul-13 6:44 
GeneralRe: Which code you suggest? PinprofessionalPIEBALDconsult30-Jul-13 6:43 
GeneralRe: Which code you suggest? PinprofessionalCésar de Souza26-Jul-13 4:06 
GeneralRe: Which code you suggest? PinprofessionalArgonia26-Jul-13 4:59 
GeneralRe: Which code you suggest? PinprofessionalCésar de Souza26-Jul-13 5:41 
GeneralRe: Which code you suggest? PinmemberMember 1017430126-Jul-13 3:19 
GeneralRe: Which code you suggest? Pinmemberryanb3126-Jul-13 3:21 
GeneralRe: Which code you suggest? PinprofessionalRavi Bhavnani29-Jul-13 12:16 
GeneralRe: Which code you suggest? Pinmemberryanb3129-Jul-13 15:45 
GeneralRe: Which code you suggest? PinprofessionalRavi Bhavnani30-Jul-13 6:05 
GeneralRe: Which code you suggest? Pinmemberryanb3130-Jul-13 6:07 
GeneralRe: Which code you suggest? PinprofessionalRavi Bhavnani30-Jul-13 6:10 

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

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


Advertise | Privacy | Mobile
Web01 | 2.8.150301.1 | Last Updated 1 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid