Click here to Skip to main content
15,894,540 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: Empty catches’ blocks Pin
Kevin McFarlane11-Jun-07 2:37
Kevin McFarlane11-Jun-07 2:37 
GeneralRe: Empty catches’ blocks Pin
Kevin McFarlane11-Jun-07 2:32
Kevin McFarlane11-Jun-07 2:32 
GeneralRe: Empty catches’ blocks Pin
Fabio Zanetta19-Jun-07 0:11
Fabio Zanetta19-Jun-07 0:11 
General"Clever" classic VB trick Pin
Paul Reynolds29-May-07 15:34
Paul Reynolds29-May-07 15:34 
GeneralRe: "Clever" classic VB trick Pin
Mike Dimmick29-May-07 23:12
Mike Dimmick29-May-07 23:12 
GeneralRe: "Clever" classic VB trick Pin
Ian MacLean31-May-07 9:06
Ian MacLean31-May-07 9:06 
GeneralRe: "Clever" classic VB trick Pin
Anton Afanasyev1-Jun-07 4:46
Anton Afanasyev1-Jun-07 4:46 
GeneralVintage code Pin
BadKarma29-May-07 3:52
BadKarma29-May-07 3:52 
A colleague of me retired and his code should be supported. Its old C code from an embedded system that has been ported from assembly.
BYTE Scan1, Scan2, Scan3, Scan4;

...

Err = ScanFunction(&Scan1);


That doesn't seems to be so bad, until i saw the Function declaration
int ScanFunction(unsigned long* pScan);

Later the data from the Scan bytes where placed in a long to work with the correct long value.

To be sure it would work even after changes a comment has been placed before the byte declaration
/*--------please keep the order of the following bytes as it is. !!!!!!!!!*/<br />
BYTE Scan1, Scan2, Scan3, Scan4



codito ergo sum

GeneralRe: Vintage code Pin
John R. Shaw29-May-07 4:27
John R. Shaw29-May-07 4:27 
GeneralRe: Vintage code Pin
Chris Losinger29-May-07 5:12
professionalChris Losinger29-May-07 5:12 
GeneralRe: Vintage code Pin
Jörgen Sigvardsson1-Jun-07 3:00
Jörgen Sigvardsson1-Jun-07 3:00 
GeneralRe: Vintage code Pin
Chris Losinger1-Jun-07 4:02
professionalChris Losinger1-Jun-07 4:02 
GeneralRe: Vintage code Pin
Jörgen Sigvardsson1-Jun-07 4:09
Jörgen Sigvardsson1-Jun-07 4:09 
GeneralRe: Vintage code Pin
leppie29-May-07 5:34
leppie29-May-07 5:34 
GeneralRe: Vintage code Pin
Stephen Hewitt29-May-07 17:31
Stephen Hewitt29-May-07 17:31 
GeneralRe: Vintage code Pin
Tim Carmichael30-May-07 5:28
Tim Carmichael30-May-07 5:28 
GeneralRe: Vintage code Pin
ScottM14-Jun-07 2:22
ScottM14-Jun-07 2:22 
GeneralSELECT * + datareader.getstring(0...100) = Nightmare Pin
Dave Herren25-May-07 16:09
Dave Herren25-May-07 16:09 
GeneralRe: SELECT * + datareader.getstring(0...100) = Nightmare Pin
PIEBALDconsult26-May-07 5:23
mvePIEBALDconsult26-May-07 5:23 
GeneralRe: SELECT * + datareader.getstring(0...100) = Nightmare Pin
Dave Herren26-May-07 9:03
Dave Herren26-May-07 9:03 
GeneralRe: SELECT * + datareader.getstring(0...100) = Nightmare Pin
John R. Shaw29-May-07 3:01
John R. Shaw29-May-07 3:01 
GeneralString in hands of dumb****s Pin
Cristian Amarie23-May-07 0:37
Cristian Amarie23-May-07 0:37 
GeneralRe: String in hands of dumb****s Pin
maz233123-May-07 10:01
maz233123-May-07 10:01 
GeneralRe: String in hands of dumb****s Pin
KarstenK23-May-07 22:56
mveKarstenK23-May-07 22:56 
AnswerRe: String in hands of dumb****s Pin
Leon Segal29-May-07 3:11
Leon Segal29-May-07 3:11 

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.