Click here to Skip to main content
15,887,596 members

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: Which code you suggest? PinPopular
OriginalGriff25-Jul-13 23:22
mveOriginalGriff25-Jul-13 23:22 
GeneralRe: Which code you suggest? Pin
SortaCore25-Jul-13 23:39
SortaCore25-Jul-13 23:39 
GeneralRe: Which code you suggest? Pin
Stefan_Lang26-Jul-13 0:19
Stefan_Lang26-Jul-13 0:19 
GeneralRe: Which code you suggest? Pin
OriginalGriff26-Jul-13 0:26
mveOriginalGriff26-Jul-13 0:26 
GeneralRe: Which code you suggest? Pin
Stefan_Lang26-Jul-13 1:27
Stefan_Lang26-Jul-13 1:27 
GeneralRe: Which code you suggest? Pin
svella26-Jul-13 4:42
svella26-Jul-13 4:42 
QuestionRe: Which code you suggest? Pin
Amir Mohammad Nasrollahi28-Jul-13 1:55
professionalAmir Mohammad Nasrollahi28-Jul-13 1:55 
GeneralRe: Which code you suggest? Pin
Stefan_Lang28-Jul-13 22:21
Stefan_Lang28-Jul-13 22:21 
If we ever get around to refactor this, then maybe that is the way to go. But not anytime soon. When I said 'really old', I meant it: some of that code predates exception handling by a decade.

Besides, there are plenty of good reasons not to use exceptions at every possible opportunity. E. g. I suppose you wouldn't suggest the use of exceptions in the case of the OP Wink | ;)

Flags (or states, if you prefer), are perfectly valid mechanisms for keeping track of the state of your processing. They're definitely not the only way to handle this, but there is no real downside to them either.
GeneralRe: Which code you suggest? Pin
svella29-Jul-13 4:02
svella29-Jul-13 4:02 
GeneralRe: Which code you suggest? Pin
Stefan_Lang29-Jul-13 22:48
Stefan_Lang29-Jul-13 22:48 
GeneralRe: Which code you suggest? Pin
svella30-Jul-13 3:57
svella30-Jul-13 3:57 
GeneralRe: Which code you suggest? Pin
PIEBALDconsult30-Jul-13 5:44
mvePIEBALDconsult30-Jul-13 5:44 
GeneralRe: Which code you suggest? Pin
Renzo Ciafardone27-Jul-13 16:49
Renzo Ciafardone27-Jul-13 16:49 
GeneralRe: Which code you suggest? Pin
Fabio Franco26-Jul-13 2:59
professionalFabio Franco26-Jul-13 2:59 
GeneralRe: Which code you suggest? Pin
Klaus-Werner Konrad1-Aug-13 12:32
Klaus-Werner Konrad1-Aug-13 12:32 
GeneralRe: Which code you suggest? Pin
Sentenryu25-Jul-13 8:46
Sentenryu25-Jul-13 8:46 
GeneralRe: Which code you suggest? Pin
ZurdoDev30-Jul-13 5:44
professionalZurdoDev30-Jul-13 5:44 
GeneralRe: Which code you suggest? Pin
PIEBALDconsult30-Jul-13 5:43
mvePIEBALDconsult30-Jul-13 5:43 
GeneralRe: Which code you suggest? Pin
César de Souza26-Jul-13 3:06
professionalCésar de Souza26-Jul-13 3:06 
GeneralRe: Which code you suggest? Pin
Argonia26-Jul-13 3:59
professionalArgonia26-Jul-13 3:59 
GeneralRe: Which code you suggest? Pin
César de Souza26-Jul-13 4:41
professionalCésar de Souza26-Jul-13 4:41 
GeneralRe: Which code you suggest? Pin
Ancandune26-Jul-13 2:19
Ancandune26-Jul-13 2:19 
GeneralRe: Which code you suggest? Pin
ZurdoDev26-Jul-13 2:21
professionalZurdoDev26-Jul-13 2:21 
GeneralRe: Which code you suggest? Pin
Ravi Bhavnani29-Jul-13 11:16
professionalRavi Bhavnani29-Jul-13 11:16 
GeneralRe: Which code you suggest? Pin
ZurdoDev29-Jul-13 14:45
professionalZurdoDev29-Jul-13 14:45 

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.