Click here to Skip to main content
15,887,135 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: Interesting technique used in some Legacy code! Pin
DeathByChocolate16-Jun-14 4:02
professionalDeathByChocolate16-Jun-14 4:02 
GeneralRe: Interesting technique used in some Legacy code! Pin
Kornfeld Eliyahu Peter16-Jun-14 4:01
professionalKornfeld Eliyahu Peter16-Jun-14 4:01 
GeneralRe: Interesting technique used in some Legacy code! Pin
DeathByChocolate16-Jun-14 4:22
professionalDeathByChocolate16-Jun-14 4:22 
GeneralRe: Interesting technique used in some Legacy code! Pin
Kornfeld Eliyahu Peter16-Jun-14 4:25
professionalKornfeld Eliyahu Peter16-Jun-14 4:25 
GeneralRe: Interesting technique used in some Legacy code! Pin
DeathByChocolate16-Jun-14 4:30
professionalDeathByChocolate16-Jun-14 4:30 
GeneralRe: Interesting technique used in some Legacy code! Pin
OriginalGriff16-Jun-14 4:39
mveOriginalGriff16-Jun-14 4:39 
GeneralRe: Interesting technique used in some Legacy code! Pin
Marco Bertschi16-Jun-14 5:10
protectorMarco Bertschi16-Jun-14 5:10 
GeneralRe: Interesting technique used in some Legacy code! Pin
OriginalGriff16-Jun-14 5:25
mveOriginalGriff16-Jun-14 5:25 
No, that implies the wrong thing.
The compiler stored all it's constant values in memory locations, so it could happily pass a reference (or more accurately in those days a machine code pointer) to a constant value and it would act like a variable.

Total PITA to debug when you met it for the first time: and a hanging offence to leave in production code...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

GeneralRe: Interesting technique used in some Legacy code! Pin
Freak3017-Jun-14 2:33
Freak3017-Jun-14 2:33 
GeneralRe: Interesting technique used in some Legacy code! Pin
OriginalGriff17-Jun-14 2:40
mveOriginalGriff17-Jun-14 2:40 
GeneralRe: Interesting technique used in some Legacy code! Pin
cpkilekofp19-Jun-14 7:35
cpkilekofp19-Jun-14 7:35 
GeneralRe: Interesting technique used in some Legacy code! Pin
OriginalGriff19-Jun-14 8:10
mveOriginalGriff19-Jun-14 8:10 
GeneralRe: Interesting technique used in some Legacy code! Pin
Kornfeld Eliyahu Peter16-Jun-14 5:15
professionalKornfeld Eliyahu Peter16-Jun-14 5:15 
GeneralRe: Interesting technique used in some Legacy code! Pin
OriginalGriff16-Jun-14 5:26
mveOriginalGriff16-Jun-14 5:26 
GeneralRe: Interesting technique used in some Legacy code! Pin
Bernhard Hiller16-Jun-14 21:23
Bernhard Hiller16-Jun-14 21:23 
GeneralRe: Interesting technique used in some Legacy code! Pin
OriginalGriff16-Jun-14 21:42
mveOriginalGriff16-Jun-14 21:42 
GeneralRe: Interesting technique used in some Legacy code! Pin
mikepwilson18-Jun-14 8:29
mikepwilson18-Jun-14 8:29 
GeneralRe: Interesting technique used in some Legacy code! Pin
Bernhard Hiller16-Jun-14 21:29
Bernhard Hiller16-Jun-14 21:29 
GeneralRe: Interesting technique used in some Legacy code! Pin
phil.o16-Jun-14 21:35
professionalphil.o16-Jun-14 21:35 
GeneralRe: Interesting technique used in some Legacy code! Pin
DeathByChocolate16-Jun-14 21:59
professionalDeathByChocolate16-Jun-14 21:59 
GeneralRe: Interesting technique used in some Legacy code! Pin
phil.o16-Jun-14 22:06
professionalphil.o16-Jun-14 22:06 
AnswerRe: Interesting technique used in some Legacy code! Pin
Super Lloyd18-Jun-14 20:35
Super Lloyd18-Jun-14 20:35 
GeneralRe: Interesting technique used in some Legacy code! Pin
Stefan_Lang20-Jun-14 4:34
Stefan_Lang20-Jun-14 4:34 
GeneralRe: Interesting technique used in some Legacy code! Pin
Super Lloyd20-Jun-14 5:26
Super Lloyd20-Jun-14 5:26 
GeneralCodeProject Daily News - The only newsletter I would, deliberately, subscribe to PinPopular
Adam Tibi10-Jun-14 23:25
professionalAdam Tibi10-Jun-14 23:25 

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.