Click here to Skip to main content
15,890,512 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: Code Optimize PinPopular
Vladimir Svyatski16-Jan-12 23:33
professionalVladimir Svyatski16-Jan-12 23:33 
GeneralRe: Code Optimize Pin
cpkilekofp27-Jan-12 7:05
cpkilekofp27-Jan-12 7:05 
GeneralRe: Code Optimize Pin
Rob Grainger26-Jan-12 12:36
Rob Grainger26-Jan-12 12:36 
RantRe: Code Optimize Pin
cpkilekofp27-Jan-12 8:47
cpkilekofp27-Jan-12 8:47 
GeneralRe: Code Optimize Pin
Rob Grainger30-Jan-12 6:08
Rob Grainger30-Jan-12 6:08 
GeneralRe: Code Optimize Pin
cpkilekofp30-Jan-12 8:28
cpkilekofp30-Jan-12 8:28 
GeneralRe: Code Optimize Pin
Rob Grainger30-Jan-12 11:01
Rob Grainger30-Jan-12 11:01 
GeneralRe: Code Optimize Pin
cpkilekofp30-Jan-12 12:41
cpkilekofp30-Jan-12 12:41 
I am also sorry for the descent of tone. Personally, I'm embarrassed as hell every time I commit that particular error, and I happened to be a regular Dr Dobb's reader at the very time someone in Dr Dobb's suggested moving any constant value to the left side of the equivalence operator to avoid at least some of these instances (1989, I believe). The business environment and our over-ambitious enterpreneur-president put us into Death March mode on a monthly basis (seemingly) by promising his clients delivery before we'd established we could write it, so 36- and 48-hour days occurred several times a year and 24-hour days were a common occurrence. Under those conditions, around the 22nd hour spelling your own name correctly can be an issue - thus, any technique that could help avoid any simply stupid error could help keep us from having a recall.

Note I never claimed that sane development conditions led to these errors Laugh | :laugh:

And again, sorry for the tone. I still have bad memories of a technical writer who could have been a stupendous programmer if he hadn't lied his way to a position way beyond his experience because he believed that teaching himself how to program in VB, he'd be able to duplicate and surpass the performance of any data access methods we'd written in the previous two years; by the end, two major data fixes and three failed releases later, he was pulled by his consulting company and put back to writing documentation, and he was visibly broken by the process. When, at the beginning, I'd tried to show him what we'd already done and why (two years development of a near-perfect cache load), he ignored me; when I called him on it in a meeting, my boss favored him (boss was new, he'd hired the company who'd provided this guy, etc.) and thus we sailed to near doom before upper management finally intervened.

As a result, nothing scares me worse than a developer who thinks he (1) knows everything and (2) does everything perfectly every time. Please pardon me if I mistook you for one of these, and please pardon me if I went "over the top."
GeneralRe: Code Optimize Pin
Rob Grainger30-Jan-12 13:40
Rob Grainger30-Jan-12 13:40 
GeneralRe: Code Optimize Pin
cpkilekofp31-Jan-12 5:14
cpkilekofp31-Jan-12 5:14 
GeneralRe: Code Optimize PinPopular
Peter_in_278016-Jan-12 12:02
professionalPeter_in_278016-Jan-12 12:02 
GeneralRe: Code Optimize Pin
Mohibur Rashid16-Jan-12 16:13
professionalMohibur Rashid16-Jan-12 16:13 
GeneralRe: Code Optimize Pin
Florin Jurcovici16-Jan-12 22:07
Florin Jurcovici16-Jan-12 22:07 
GeneralRe: Code Optimize Pin
YvesDaoust29-Jan-12 21:19
YvesDaoust29-Jan-12 21:19 
GeneralRe: Code Optimize Pin
the Kris17-Jan-12 1:15
the Kris17-Jan-12 1:15 
GeneralRe: Code Optimize Pin
loctrice18-Jan-12 17:38
professionalloctrice18-Jan-12 17:38 
JokeRe: Code Optimize Pin
AspDotNetDev18-Jan-12 18:00
protectorAspDotNetDev18-Jan-12 18:00 
GeneralRe: Code Optimize Pin
cpkilekofp27-Jan-12 8:48
cpkilekofp27-Jan-12 8:48 
GeneralRe: Code Optimize Pin
Snorri Kristjansson17-Jan-12 2:02
professionalSnorri Kristjansson17-Jan-12 2:02 
GeneralRe: Code Optimize PinPopular
BobJanova17-Jan-12 3:25
BobJanova17-Jan-12 3:25 
GeneralRe: Code Optimize Pin
Snorri Kristjansson17-Jan-12 4:00
professionalSnorri Kristjansson17-Jan-12 4:00 
GeneralRe: Code Optimize Pin
BobJanova17-Jan-12 4:27
BobJanova17-Jan-12 4:27 
GeneralRe: Code Optimize Pin
Harley L. Pebley17-Jan-12 4:58
Harley L. Pebley17-Jan-12 4:58 
GeneralMessage Removed Pin
17-Jan-12 23:17
professionalSnorri Kristjansson17-Jan-12 23:17 
GeneralRe: Code Optimize Pin
Nagy Vilmos18-Jan-12 2:23
professionalNagy Vilmos18-Jan-12 2:23 

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.