Click here to Skip to main content
15,889,462 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: Unreachable code detected Pin
ledtech33-Nov-14 9:50
ledtech33-Nov-14 9:50 
GeneralRe: Unreachable code detected Pin
TheGreatAndPowerfulOz3-Nov-14 10:06
TheGreatAndPowerfulOz3-Nov-14 10:06 
GeneralRe: Unreachable code detected Pin
Marc Clifton3-Nov-14 10:33
mvaMarc Clifton3-Nov-14 10:33 
GeneralRe: Unreachable code detected Pin
TheGreatAndPowerfulOz3-Nov-14 11:50
TheGreatAndPowerfulOz3-Nov-14 11:50 
GeneralRe: Unreachable code detected Pin
Rob Grainger20-Dec-14 2:41
Rob Grainger20-Dec-14 2:41 
GeneralRe: Unreachable code detected Pin
Gary R. Wheeler8-Nov-14 1:39
Gary R. Wheeler8-Nov-14 1:39 
GeneralRe: Unreachable code detected Pin
Rob Grainger20-Dec-14 2:42
Rob Grainger20-Dec-14 2:42 
RantWeird but not so wonderful Pin
kmoorevs29-Oct-14 8:28
kmoorevs29-Oct-14 8:28 
A customer called last week reporting a problem with a screen not updating properly. The screen in question uses a 3rd party grid control. I pulled out the laptop and start debugging. I found only one possible problem related to user input, that eventually will be fixed, but wanted to get her back working with an easy workaround. So, I called, thinking that it could all be resolved quickly with a remote. So I get connected, verify that everything is up to date, go to the problem screen, try a quick update to demonstrate that it works, and...it doesn't work! OMG | :OMG:

I pull up the code on my desktop and it misbehaves. I traced the problem back to one of the grid's events not firing. The code and executable work perfectly on the laptop and on at least one other test computer I have checked. There has to be a logical explanation for why this one component is behaving differently on different clients. I checked the grid's libraries on all three workstations and they are identical. It's probably going to be some obscure windows utility library that has been recently updated. Move to damage control mode and find another event that is reliable. Longer term, it's time to look for another component.

It's not often that I am able to replicate these kind of customer issues, and tracking this down without an environment that exhibited the oddity would have been extremely difficult.

Edit: Tried it again (code) on the desktop and it worked fine. The executable however fails to fire the event. I gave up trying to understand and identified a half-dozen places where I was using the faulty event and moved the code to another event that worked. Progress! Smile | :)
"Go forth into the source" - Neal Morse

GeneralRe: Weird but not so wonderful Pin
W Balboos, GHB3-Nov-14 8:49
W Balboos, GHB3-Nov-14 8:49 
GeneralHow not to do a countdown Pin
PIEBALDconsult28-Oct-14 12:28
mvePIEBALDconsult28-Oct-14 12:28 
GeneralRe: How not to do a countdown Pin
ZurdoDev31-Oct-14 1:54
professionalZurdoDev31-Oct-14 1:54 
GeneralRe: How not to do a countdown Pin
PIEBALDconsult31-Oct-14 3:23
mvePIEBALDconsult31-Oct-14 3:23 
GeneralRe: How not to do a countdown Pin
ZurdoDev31-Oct-14 3:25
professionalZurdoDev31-Oct-14 3:25 
GeneralRe: How not to do a countdown Pin
PIEBALDconsult31-Oct-14 3:32
mvePIEBALDconsult31-Oct-14 3:32 
GeneralRe: How not to do a countdown Pin
Brisingr Aerowing3-Nov-14 15:49
professionalBrisingr Aerowing3-Nov-14 15:49 
GeneralIt's Primes as far as the eye can see! PinPopular
OriginalGriff27-Oct-14 5:06
mveOriginalGriff27-Oct-14 5:06 
JokeRe: It's Primes as far as the eye can see! PinPopular
ZurdoDev27-Oct-14 5:13
professionalZurdoDev27-Oct-14 5:13 
GeneralRe: It's Primes as far as the eye can see! Pin
OriginalGriff27-Oct-14 5:27
mveOriginalGriff27-Oct-14 5:27 
GeneralRe: It's Primes as far as the eye can see! Pin
DaveAuld27-Oct-14 6:22
professionalDaveAuld27-Oct-14 6:22 
GeneralRe: It's Primes as far as the eye can see! Pin
ZurdoDev27-Oct-14 6:24
professionalZurdoDev27-Oct-14 6:24 
GeneralRe: It's Primes as far as the eye can see! Pin
PhilLenoir27-Oct-14 8:38
professionalPhilLenoir27-Oct-14 8:38 
GeneralRe: It's Primes as far as the eye can see! Pin
newton.saber27-Oct-14 9:26
newton.saber27-Oct-14 9:26 
GeneralRe: It's Primes as far as the eye can see! Pin
DaveAuld27-Oct-14 10:26
professionalDaveAuld27-Oct-14 10:26 
GeneralRe: It's Primes as far as the eye can see! Pin
Ian Shlasko27-Oct-14 10:31
Ian Shlasko27-Oct-14 10:31 
GeneralRe: It's Primes as far as the eye can see! Pin
DaveAuld27-Oct-14 10:48
professionalDaveAuld27-Oct-14 10:48 

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.