Click here to Skip to main content
15,887,822 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: IsNullOrEmpty Pin
AspDotNetDev3-Jan-11 6:09
protectorAspDotNetDev3-Jan-11 6:09 
GeneralRe: IsNullOrEmpty Pin
fjdiewornncalwe3-Jan-11 15:03
professionalfjdiewornncalwe3-Jan-11 15:03 
GeneralRe: IsNullOrEmpty Pin
PIEBALDconsult6-Jan-11 2:34
mvePIEBALDconsult6-Jan-11 2:34 
GeneralRe: IsNullOrEmpty Pin
_Erik_6-Jan-11 4:31
_Erik_6-Jan-11 4:31 
GeneralRe: IsNullOrEmpty Pin
PIEBALDconsult6-Jan-11 15:35
mvePIEBALDconsult6-Jan-11 15:35 
GeneralSubmission for the Guiness book of world records Pin
Michael Agroskin29-Dec-10 5:38
Michael Agroskin29-Dec-10 5:38 
QuestionRe: Submission for the Guiness book of world records Pin
AspDotNetDev29-Dec-10 7:08
protectorAspDotNetDev29-Dec-10 7:08 
AnswerRe: Submission for the Guiness book of world records [modified] Pin
Michael Agroskin29-Dec-10 10:22
Michael Agroskin29-Dec-10 10:22 
Yes, it is case-sensitive C#.

I forgot to mention that all "instrument" variables are of various "xxxAccessor" types, and all "accessor" variables are of "xxxInstrument" types, so the code is way way worse than it seems.

I swear, the variables are declared something like this:

C#
aaaAccessor Instrument;
bbbInstrument Accessor;
cccAccessor instrument;
dddInstrument accessor;

Instrument = instrument.Accessor;
Accessor = GetAccessorForInstrument(instrument.Accessor);
Accessor.Instrument = instrument.Accessor;


I won't even mention there are also InstrumentFactory class, and AccessorFactory class, and InstrumentWrapper class, and AccessorWrapper class, and IInstrument interface, and IAccessor interface, and InstrumentHelper, and AccessorHelper, and ...

Do you think that deserves the Guinness book? I mean, this is probably the only program where not the values but THE MEANINGS of variables are being swapped all the time. This is not programming, this is meta-programming.

modified on Wednesday, December 29, 2010 4:31 PM

GeneralRe: Submission for the Guiness book of world records Pin
TorstenH.3-Jan-11 4:35
TorstenH.3-Jan-11 4:35 
GeneralRe: Submission for the Guiness book of world records [modified] Pin
Michael Agroskin3-Jan-11 15:35
Michael Agroskin3-Jan-11 15:35 
GeneralRe: Submission for the Guiness book of world records Pin
Rob Grainger7-Jan-11 4:13
Rob Grainger7-Jan-11 4:13 
GeneralRe: Submission for the Guiness book of world records Pin
Michael Agroskin7-Jan-11 7:10
Michael Agroskin7-Jan-11 7:10 
GeneralCoded by an Expectional person Pin
senny28-Dec-10 22:30
senny28-Dec-10 22:30 
GeneralRe: Coded by an Expectional person Pin
AspDotNetDev29-Dec-10 7:02
protectorAspDotNetDev29-Dec-10 7:02 
GeneralRe: Coded by an Expectional person Pin
senny30-Dec-10 0:41
senny30-Dec-10 0:41 
GeneralRe: Coded by an Expectional person Pin
AspDotNetDev30-Dec-10 6:50
protectorAspDotNetDev30-Dec-10 6:50 
GeneralProgramming Hell Pin
Affan Saied28-Dec-10 20:53
Affan Saied28-Dec-10 20:53 
GeneralRe: Programming Hell Pin
_Erik_29-Dec-10 5:07
_Erik_29-Dec-10 5:07 
GeneralRe: Programming Hell Pin
AspDotNetDev29-Dec-10 6:42
protectorAspDotNetDev29-Dec-10 6:42 
GeneralRe: Programming Hell Pin
fjdiewornncalwe29-Dec-10 10:45
professionalfjdiewornncalwe29-Dec-10 10:45 
GeneralRe: Programming Hell Pin
fjdiewornncalwe3-Jan-11 16:28
professionalfjdiewornncalwe3-Jan-11 16:28 
GeneralRe: Programming Hell Pin
Bernhard Hiller29-Dec-10 19:27
Bernhard Hiller29-Dec-10 19:27 
GeneralRe: Programming Hell Pin
_Maxxx_6-Feb-11 19:14
professional_Maxxx_6-Feb-11 19:14 
GeneralRe: Programming Hell Pin
Michael Agroskin3-Jan-11 15:40
Michael Agroskin3-Jan-11 15:40 
RantMagic Numbers Pin
Adrian.Tawse28-Dec-10 6:39
Adrian.Tawse28-Dec-10 6:39 

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.