Click here to Skip to main content
12,447,778 members (79,190 online)

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, embarrassing 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 Pin
pasztorpisti7-Sep-13 13:09
memberpasztorpisti7-Sep-13 13:09 
GeneralRe: Most Unhelpful Message Ever Pin
CIDev30-Aug-13 5:35
memberCIDev30-Aug-13 5:35 
GeneralRe: Most Unhelpful Message Ever Pin
pasztorpisti7-Sep-13 0:34
memberpasztorpisti7-Sep-13 0:34 
QuestionWhich code you suggest? Pin
Rajesh Anuhya24-Jul-13 20:04
professionalRajesh Anuhya24-Jul-13 20:04 
AnswerRe: Which code you suggest? Pin
NeverJustHere24-Jul-13 21:02
memberNeverJustHere24-Jul-13 21:02 
GeneralRe: Which code you suggest? Pin
Reelix25-Jul-13 21:36
memberReelix25-Jul-13 21:36 
GeneralRe: Which code you suggest? Pin
KP Lee26-Jul-13 17:21
memberKP Lee26-Jul-13 17:21 
AnswerRe: Which code you suggest? Pin
_Damian S_24-Jul-13 21:02
professional_Damian S_24-Jul-13 21: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? Pin
ihoecken25-Jul-13 3:42
memberihoecken25-Jul-13 3:42 
AnswerRe: Which code you suggest? Pin
ryanb3125-Jul-13 4:48
memberryanb3125-Jul-13 4:48 
GeneralRe: Which code you suggest? Pin
OriginalGriff25-Jul-13 5:04
protectorOriginalGriff25-Jul-13 5:04 
GeneralRe: Which code you suggest? Pin
ryanb3125-Jul-13 5:11
memberryanb3125-Jul-13 5:11 
GeneralRe: Which code you suggest? Pin
Sentenryu25-Jul-13 7:15
memberSentenryu25-Jul-13 7:15 
GeneralRe: Which code you suggest? Pin
ryanb3125-Jul-13 7:32
memberryanb3125-Jul-13 7:32 
GeneralRe: Which code you suggest? Pin
OriginalGriff25-Jul-13 8:26
protectorOriginalGriff25-Jul-13 8:26 
GeneralRe: Which code you suggest? Pin
ryanb3125-Jul-13 8:28
memberryanb3125-Jul-13 8:28 
GeneralRe: Which code you suggest? Pin
OriginalGriff25-Jul-13 8:31
protectorOriginalGriff25-Jul-13 8:31 
GeneralRe: Which code you suggest? Pin
ryanb3125-Jul-13 8:35
memberryanb3125-Jul-13 8:35 
GeneralRe: Which code you suggest? Pin
Andrew Leeder25-Jul-13 22:34
memberAndrew Leeder25-Jul-13 22:34 
GeneralRe: Which code you suggest? Pin
OriginalGriff25-Jul-13 22:50
protectorOriginalGriff25-Jul-13 22:50 
GeneralRe: Which code you suggest? Pin
SortaCore25-Jul-13 23:15
memberSortaCore25-Jul-13 23:15 
GeneralRe: Which code you suggest? Pin
OriginalGriff25-Jul-13 23:22
protectorOriginalGriff25-Jul-13 23:22 
GeneralRe: Which code you suggest? Pin
SortaCore25-Jul-13 23:39
memberSortaCore25-Jul-13 23:39 
GeneralRe: Which code you suggest? Pin
Stefan_Lang26-Jul-13 0:19
memberStefan_Lang26-Jul-13 0:19 
GeneralRe: Which code you suggest? Pin
OriginalGriff26-Jul-13 0:26
protectorOriginalGriff26-Jul-13 0:26 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 25 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid