Click here to Skip to main content
15,900,258 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: how many seconds? Pin
peterchen8-Sep-08 11:29
peterchen8-Sep-08 11:29 
GeneralCoding Pin
mistyangel6-Sep-08 23:30
mistyangel6-Sep-08 23:30 
GeneralRe: Coding Pin
enhzflep7-Sep-08 1:39
enhzflep7-Sep-08 1:39 
GeneralRe: Coding Pin
Paul Conrad7-Sep-08 5:21
professionalPaul Conrad7-Sep-08 5:21 
GeneralTHIS QUESTION IS THE HORROR Pin
leckey7-Sep-08 6:57
leckey7-Sep-08 6:57 
GeneralRe: Coding Pin
Dan Neely8-Sep-08 2:22
Dan Neely8-Sep-08 2:22 
GeneralRe: Coding Pin
BillW338-Sep-08 5:08
professionalBillW338-Sep-08 5:08 
GeneralLooking at this math is making me num... Pin
AeonBlue4-Sep-08 8:29
AeonBlue4-Sep-08 8:29 
So, I'm sure this has happened to everyone but I'm pouring through a section of v1.0 of a program I am updating. There's a section where some decent algebra is involved and all of the variables used were num1, num2, num3 etc. down the line. This is in several pages of code and it goes up to num26, but at least they are all declared locally. There is no consistency between in-line if statements and general if statements; they are used intermittently and in no semblance of order whatsoever. In two separate places, the math that is used conflicts with the documentation that was provided so now I have to figure out which is correct so I can rewrite this correctly and accurately. They had code for a dropdown box that said
if (NumOfConveyors >= 3) && (NumOfConveyors <= 4)
     //do stuff


...so...if your dropdown box only gives me the option of whole numbers, why even check to see if there will be a number in between 3 and 4? You are never going to have .25 of a conveyor. D'Oh! | :doh:

And there's an if instead of an elseif in a block of code which sets one of the num variables to a totally wrong number. Good times finding that one out. Wink | ;)

"The shortest distance between two points is under construction"
-Noelie ALtito

GeneralRe: Looking at this math is making me num... Pin
Pete O'Hanlon4-Sep-08 9:12
mvePete O'Hanlon4-Sep-08 9:12 
GeneralRe: Looking at this math is making me num... Pin
AeonBlue4-Sep-08 9:33
AeonBlue4-Sep-08 9:33 
GeneralRe: Looking at this math is making me num... Pin
dighn4-Sep-08 11:02
dighn4-Sep-08 11:02 
GeneralRe: Looking at this math is making me num... Pin
BillW338-Sep-08 4:56
professionalBillW338-Sep-08 4:56 
GeneralRe: Looking at this math is making me num... Pin
CPallini7-Sep-08 21:43
mveCPallini7-Sep-08 21:43 
JokeRe: Looking at this math is making me num... Pin
Perspx4-Sep-08 9:36
Perspx4-Sep-08 9:36 
GeneralRe: Looking at this math is making me num... Pin
Pete O'Hanlon4-Sep-08 10:43
mvePete O'Hanlon4-Sep-08 10:43 
GeneralRe: Looking at this math is making me num... Pin
ClementsDan4-Sep-08 18:24
ClementsDan4-Sep-08 18:24 
JokeRe: Looking at this math is making me num... Pin
AeonBlue5-Sep-08 4:07
AeonBlue5-Sep-08 4:07 
GeneralWhy is the app so slow Pin
BadKarma3-Sep-08 3:11
BadKarma3-Sep-08 3:11 
GeneralRe: Why is the app so slow Pin
Paul Conrad3-Sep-08 6:24
professionalPaul Conrad3-Sep-08 6:24 
GeneralRe: Why is the app so slow Pin
Graham Bradshaw3-Sep-08 6:28
Graham Bradshaw3-Sep-08 6:28 
GeneralRe: Why is the app so slow Pin
BadKarma3-Sep-08 7:53
BadKarma3-Sep-08 7:53 
GeneralRe: Why is the app so slow Pin
Graham Bradshaw3-Sep-08 9:36
Graham Bradshaw3-Sep-08 9:36 
GeneralRe: Why is the app so slow Pin
BadKarma3-Sep-08 20:35
BadKarma3-Sep-08 20:35 
GeneralRe: Why is the app so slow Pin
PIEBALDconsult3-Sep-08 8:06
mvePIEBALDconsult3-Sep-08 8:06 
GeneralRe: Why is the app so slow Pin
Graham Bradshaw3-Sep-08 9:31
Graham Bradshaw3-Sep-08 9:31 

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.