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 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 
Personally I prefer the second option, as there's only a single return from the function.
 
That said, there's a whole bunch wrong with the code... or at least not good practice. (Yes, I realise it's just an example.)

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 
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 

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
Web03 | 2.8.150301.1 | Last Updated 3 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid