Click here to Skip to main content
15,891,136 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.

 
GeneralQuotes of the day: Pin
Brady Kelly26-Feb-09 5:40
Brady Kelly26-Feb-09 5:40 
GeneralRe: Quotes of the day: Pin
Tony Pottier27-Feb-09 5:11
Tony Pottier27-Feb-09 5:11 
GeneralRe: Quotes of the day: Pin
Brady Kelly27-Feb-09 5:33
Brady Kelly27-Feb-09 5:33 
GeneralRe: Quotes of the day: Pin
Jeremy Tierman2-Mar-09 5:19
Jeremy Tierman2-Mar-09 5:19 
GeneralRe: Quotes of the day: Pin
yassir hannoun1-Mar-09 11:27
yassir hannoun1-Mar-09 11:27 
GeneralRe: Quotes of the day: Pin
Megidolaon4-Mar-09 2:00
Megidolaon4-Mar-09 2:00 
GeneralUseless for Pin
Oscar Luis Vera Pérez20-Feb-09 11:31
Oscar Luis Vera Pérez20-Feb-09 11:31 
JokeRe: Useless for PinPopular
BadKarma20-Feb-09 12:13
BadKarma20-Feb-09 12:13 
Your are correct, he/she should have used a switch instead of the if statements. Like this:
for(int i= 0; i < 2; i++)
{
  switch(i)
  {
    case 0:
      // do something
      break;
    case 1:
      // do something else
      break;
  };
}


Learn from the mistakes of others, you may not live long enough to make them all yourself.

GeneralRe: Useless for Pin
«_Superman_»20-Feb-09 15:53
professional«_Superman_»20-Feb-09 15:53 
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 
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 

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.