Click here to Skip to main content
15,902,635 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: Clever Coder or Annoying SmartAss? Pin
Caslen29-Jul-11 0:09
Caslen29-Jul-11 0:09 
GeneralRe: Clever Coder or Annoying SmartAss? Pin
StM0n28-Jul-11 20:40
StM0n28-Jul-11 20:40 
GeneralRe: Clever Coder or Annoying SmartAss? PinPopular
Caslen29-Jul-11 0:10
Caslen29-Jul-11 0:10 
GeneralRe: Clever Coder or Annoying SmartAss? Pin
StM0n29-Jul-11 0:32
StM0n29-Jul-11 0:32 
GeneralRe: Clever Coder or Annoying SmartAss? Pin
Caslen29-Jul-11 0:49
Caslen29-Jul-11 0:49 
GeneralRe: Clever Coder or Annoying SmartAss? Pin
StM0n29-Jul-11 0:55
StM0n29-Jul-11 0:55 
GeneralRe: Clever Coder or Annoying SmartAss? Pin
BobJanova29-Jul-11 5:43
BobJanova29-Jul-11 5:43 
GeneralRe: Clever Coder or Annoying SmartAss? Pin
richard_k3-Aug-11 16:53
richard_k3-Aug-11 16:53 
Ok.. so far I can buy smart.. although I'm not fond of HOW the code is formatted.. I try to format more complex if statements so that its obvious what is going on.. ergo:

C#
for (                           ; 
           (Var1 < Var2) 
        && (Var3 == FALSE) 
        && (    ( Var4 < 0 ) 
             || (Var5 <= Var6) ); 
     Var7++)
{
   .
   .
   //700 lines of code
   .
   .
}


I used to do PLC programming and loved how ladder logic read.. so this is a hold over from those days for me.. I'm ALL about readability..

On 700 lines.. idiot for sure.

Now.. my question to determine if this guys is a TRUE idiot.. does he re-use any of those test variables for other purposes in his massive 700 line pile of spaghetti? If so.. then he gets promoted to 'Principle Idiot'.

The reason I ask this is.. I've seen that.. a 3000 line function that re-used control and locally declared variables for complete different purposes.. trying to debug that mess was like messing with a wierd 3-dimensional puzzle. The guy that wrote it, god bless his soul, at least wasn't a CS guy.. he was a business analyst. Give a child a pistol....
GeneralRe: Clever Coder or Annoying SmartAss? Pin
Caslen5-Aug-11 2:09
Caslen5-Aug-11 2:09 
GeneralRe: Clever Coder or Annoying SmartAss? Pin
thoiness1-Sep-11 5:09
thoiness1-Sep-11 5:09 
GeneralComma operator considered harmful Pin
o m n i27-Jul-11 12:42
o m n i27-Jul-11 12:42 
GeneralRe: Comma operator considered harmful Pin
Al_Brown27-Jul-11 22:06
Al_Brown27-Jul-11 22:06 
GeneralRe: Comma operator considered harmful Pin
oggenok6428-Jul-11 0:08
oggenok6428-Jul-11 0:08 
GeneralRe: Comma operator considered harmful Pin
BillW3328-Jul-11 4:03
professionalBillW3328-Jul-11 4:03 
GeneralRe: Comma operator considered harmful Pin
BobJanova29-Jul-11 5:39
BobJanova29-Jul-11 5:39 
GeneralHall of Shame Pin
VE226-Jul-11 3:52
VE226-Jul-11 3:52 
GeneralRe: Hall of Shame Pin
Peter_in_278026-Jul-11 14:50
professionalPeter_in_278026-Jul-11 14:50 
GeneralRe: Hall of Shame Pin
Dalek Dave27-Jul-11 23:01
professionalDalek Dave27-Jul-11 23:01 
GeneralRe: Hall of Shame Pin
Peter_in_278028-Jul-11 0:02
professionalPeter_in_278028-Jul-11 0:02 
GeneralRe: Hall of Shame Pin
TorstenFrings28-Jul-11 3:23
TorstenFrings28-Jul-11 3:23 
GeneralHow to generate a menu [modified] PinPopular
Keith Barrow24-Jul-11 21:50
professionalKeith Barrow24-Jul-11 21:50 
GeneralRe: How to generate a menu Pin
StM0n29-Jul-11 9:44
StM0n29-Jul-11 9:44 
GeneralRe: How to generate a menu Pin
the headless nick3-Aug-11 23:39
professionalthe headless nick3-Aug-11 23:39 
GeneralRedundancy Pin
Rob Grainger20-Jul-11 0:08
Rob Grainger20-Jul-11 0:08 
GeneralRe: Redundancy Pin
RobCroll20-Jul-11 2:16
RobCroll20-Jul-11 2:16 

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.