Click here to Skip to main content
15,892,161 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: Useless for Pin
PIEBALDconsult20-Feb-09 16:07
mvePIEBALDconsult20-Feb-09 16:07 
GeneralRe: Useless for Pin
dojohansen10-Mar-09 22:16
dojohansen10-Mar-09 22:16 
GeneralRe: Useless for Pin
PIEBALDconsult20-Feb-09 13:54
mvePIEBALDconsult20-Feb-09 13:54 
GeneralRe: Useless for Pin
Electron Shepherd5-Mar-09 7:29
Electron Shepherd5-Mar-09 7:29 
GeneralRe: Useless for Pin
Luc Pattyn5-Mar-09 8:49
sitebuilderLuc Pattyn5-Mar-09 8:49 
GeneralRe: Useless for Pin
supercat924-Feb-09 9:27
supercat924-Feb-09 9:27 
GeneralRe: Useless for Pin
gspyacc24-Feb-09 10:22
gspyacc24-Feb-09 10:22 
GeneralRe: Useless for Pin
JasonPSage27-Feb-09 7:08
JasonPSage27-Feb-09 7:08 
I agree with the poster who said it depends.

If this is the loop's entire construct - yes I think it's not ideal. (Not a horror though). I would just have two statements "do something" and "do something else" and MAYBE block them in braces to be clear its a "unit" or make a function if warranted.

If the person planned to expand on this loop - where it cycled thru ten iterations, but was suppose to do something special for iteration 1 and 2, then a case statement might be ideal.. still not a horror.

--Jason P Sage

Know way to many languages... master of none!

GeneralRe: Useless for Pin
Oscar Luis Vera Pérez3-Mar-09 9:14
Oscar Luis Vera Pérez3-Mar-09 9:14 
GeneralRe: Useless for [modified] Pin
che33582-Mar-09 9:55
che33582-Mar-09 9:55 
RantRe: Useless for Pin
IglesiasP21-May-09 1:08
IglesiasP21-May-09 1:08 
GeneralRe: Useless for Pin
Julia Washburn2-Mar-09 19:21
Julia Washburn2-Mar-09 19:21 
GeneralNice usage of foreach Pin
Andrew Chan19-Feb-09 0:58
Andrew Chan19-Feb-09 0:58 
GeneralRe: Nice usage of foreach Pin
PIEBALDconsult19-Feb-09 3:21
mvePIEBALDconsult19-Feb-09 3:21 
GeneralRe: Nice usage of foreach Pin
J4amieC19-Feb-09 4:03
J4amieC19-Feb-09 4:03 
GeneralRe: Nice usage of foreach Pin
PIEBALDconsult19-Feb-09 4:09
mvePIEBALDconsult19-Feb-09 4:09 
GeneralRe: Nice usage of foreach Pin
J4amieC20-Feb-09 0:01
J4amieC20-Feb-09 0:01 
GeneralRe: Nice usage of foreach Pin
cpkilekofp10-Mar-09 9:19
cpkilekofp10-Mar-09 9:19 
GeneralRe: Nice usage of foreach Pin
dojohansen10-Mar-09 22:18
dojohansen10-Mar-09 22:18 
GeneralRe: Nice usage of foreach Pin
PIEBALDconsult11-Mar-09 4:55
mvePIEBALDconsult11-Mar-09 4:55 
GeneralRe: Nice usage of foreach Pin
Luc Pattyn19-Feb-09 3:47
sitebuilderLuc Pattyn19-Feb-09 3:47 
JokeRe: Nice usage of foreach Pin
Jeremy Tierman23-Feb-09 11:56
Jeremy Tierman23-Feb-09 11:56 
GeneralRe: Nice usage of foreach Pin
Marc Clifton23-Feb-09 2:27
mvaMarc Clifton23-Feb-09 2:27 
GeneralRe: Nice usage of foreach Pin
Andrew Chan23-Feb-09 3:20
Andrew Chan23-Feb-09 3:20 
GeneralRe: Nice usage of foreach Pin
Rob Grainger24-Feb-09 3:06
Rob Grainger24-Feb-09 3:06 

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.