Click here to Skip to main content
15,879,348 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: Brings back memories Pin
Michael Sadlon7-Jun-07 8:18
Michael Sadlon7-Jun-07 8:18 
GeneralRe: Brings back memories Pin
CPallini7-Jun-07 9:02
mveCPallini7-Jun-07 9:02 
GeneralRe: Brings back memories Pin
Emil - Gabriel11-Jun-07 4:18
Emil - Gabriel11-Jun-07 4:18 
GeneralRe: Brings back memories Pin
CPallini11-Jun-07 5:15
mveCPallini11-Jun-07 5:15 
GeneralRe: Brings back memories Pin
Michael Sadlon7-Jun-07 8:20
Michael Sadlon7-Jun-07 8:20 
GeneralNot the same Pin
Xiangyang Liu 刘向阳7-Jun-07 16:44
Xiangyang Liu 刘向阳7-Jun-07 16:44 
GeneralRe: Not the same Pin
PIEBALDconsult8-Jun-07 3:28
mvePIEBALDconsult8-Jun-07 3:28 
GeneralRe: Not the same Pin
PIEBALDconsult9-Jun-07 7:03
mvePIEBALDconsult9-Jun-07 7:03 
the original code has a "bug". If maxValue is less than minValue


That may be true if the intent is to determine whether or not the test value "is between" the other two values; which is likely, but may not be the case.


As to improving the efficiency of the routine...

I've had bosses who would say, "It's always been that way, don't change it."
And colleagues who would say, "It ain't broke, don't fix it."

In one memorable case I bloody well did fix it, and the result was that the program took ten minutes to run rather than forty... and I was out of a job. Yes, I'd do it again.
GeneralRe: Brings back memories Pin
Pete O'Hanlon7-Jun-07 8:25
mvePete O'Hanlon7-Jun-07 8:25 
GeneralRe: Brings back memories Pin
Ravi Bhavnani7-Jun-07 19:51
professionalRavi Bhavnani7-Jun-07 19:51 
GeneralRe: Brings back memories Pin
John R. Shaw8-Jun-07 22:38
John R. Shaw8-Jun-07 22:38 
GeneralRe: Brings back memories Pin
Russell Jones13-Jun-07 3:45
Russell Jones13-Jun-07 3:45 
GeneralRe: Brings back memories Pin
DynV21-Jun-07 18:38
DynV21-Jun-07 18:38 
GeneralObviously Pin
Judah Gabriel Himango6-Jun-07 13:02
sponsorJudah Gabriel Himango6-Jun-07 13:02 
JokeRe: Obviously Pin
Chris Meech6-Jun-07 14:44
Chris Meech6-Jun-07 14:44 
GeneralRe: Obviously Pin
Pete O'Hanlon6-Jun-07 23:01
mvePete O'Hanlon6-Jun-07 23:01 
JokeRe: Obviously Pin
DavidNohejl6-Jun-07 23:40
DavidNohejl6-Jun-07 23:40 
GeneralRe: Obviously Pin
Sylvester george6-Jun-07 23:48
Sylvester george6-Jun-07 23:48 
GeneralRe: Obviously Pin
Judah Gabriel Himango7-Jun-07 4:13
sponsorJudah Gabriel Himango7-Jun-07 4:13 
GeneralRe: Obviously Pin
Paul Conrad7-Jun-07 3:56
professionalPaul Conrad7-Jun-07 3:56 
GeneralRe: Obviously Pin
PIEBALDconsult7-Jun-07 7:29
mvePIEBALDconsult7-Jun-07 7:29 
Generalhe he Pin
Sylvester george5-Jun-07 1:46
Sylvester george5-Jun-07 1:46 
GeneralRe: he he Pin
Optimus Chaos5-Jun-07 2:04
Optimus Chaos5-Jun-07 2:04 
GeneralRe: he he Pin
DavidNohejl5-Jun-07 2:11
DavidNohejl5-Jun-07 2:11 
GeneralRe: he he Pin
Emil - Gabriel11-Jun-07 4:09
Emil - Gabriel11-Jun-07 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.