Click here to Skip to main content
15,885,216 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: Comments in a foreign language Pin
Lutosław24-May-13 12:29
Lutosław24-May-13 12:29 
GeneralEnhancing the bugs Pin
Shameel5-Mar-13 3:33
professionalShameel5-Mar-13 3:33 
GeneralRe: Enhancing the bugs Pin
Dave Kreskowiak5-Mar-13 3:57
mveDave Kreskowiak5-Mar-13 3:57 
GeneralRe: Enhancing the bugs Pin
szukuro5-Mar-13 4:04
szukuro5-Mar-13 4:04 
GeneralRe: Enhancing the bugs Pin
S Houghtelin8-Mar-13 2:27
professionalS Houghtelin8-Mar-13 2:27 
GeneralRe: Enhancing the bugs PinPopular
Pualee5-Mar-13 4:47
Pualee5-Mar-13 4:47 
GeneralRe: Enhancing the bugs Pin
Dr.Walt Fair, PE5-Mar-13 7:02
professionalDr.Walt Fair, PE5-Mar-13 7:02 
GeneralSomeone is sure that availability check is performed no matter what Pin
krumia28-Feb-13 18:15
krumia28-Feb-13 18:15 
Of course, variables changed, methods renamed, and parameters omitted to protect the (not so) innocent.
C#
// some code here

if (condition_a)
{
    if (condition_b)
    {
        // do something here
        if (AlertBox("Something wrong here. You wanna continue?"))
        {
            CheckAvailability();
        }
    }
    else if (condition_c)
    {
        // do something else here
        if (AlertBox("Some other thing wrong here. You wanna continue?"))
        {
            CheckAvailability();
        }
    }
    else
    {
        CheckAvailability();
    }

    CheckAvailability();
}
else
{
    CheckAvailability();
}

// more code here


modified 3-Mar-13 11:32am.

GeneralRe: Someone is sure that availability check is performed no matter what Pin
Kevin Drzycimski28-Feb-13 20:23
Kevin Drzycimski28-Feb-13 20:23 
GeneralRe: Someone is sure that availability check is performed no matter what Pin
Bernhard Hiller28-Feb-13 20:41
Bernhard Hiller28-Feb-13 20:41 
GeneralRe: Someone is sure that availability check is performed no matter what Pin
Lee Venkatsamy9-Apr-13 4:13
Lee Venkatsamy9-Apr-13 4:13 
GeneralREMOVED Pin
Brisingr Aerowing24-Feb-13 7:59
professionalBrisingr Aerowing24-Feb-13 7:59 
GeneralRe: Well then. Pin
PIEBALDconsult25-Feb-13 12:59
mvePIEBALDconsult25-Feb-13 12:59 
GeneralRe: Well then. Pin
Shaheed Legion26-Feb-13 6:35
Shaheed Legion26-Feb-13 6:35 
GeneralRe: Well then. Pin
dan!sh 12-Mar-13 19:52
professional dan!sh 12-Mar-13 19:52 
GeneralMessage Closed Pin
13-Mar-13 3:09
professionalBrisingr Aerowing13-Mar-13 3:09 
GeneralRe: Well then. Pin
dan!sh 13-Mar-13 3:23
professional dan!sh 13-Mar-13 3:23 
GeneralSometimes I wonder about code comments PinPopular
Marco Bertschi19-Feb-13 1:49
protectorMarco Bertschi19-Feb-13 1:49 
GeneralRe: Sometimes I wonder about code comments Pin
PIEBALDconsult19-Feb-13 3:36
mvePIEBALDconsult19-Feb-13 3:36 
GeneralRe: Sometimes I wonder about code comments Pin
Marco Bertschi19-Feb-13 3:41
protectorMarco Bertschi19-Feb-13 3:41 
GeneralRe: Sometimes I wonder about code comments Pin
PIEBALDconsult19-Feb-13 3:57
mvePIEBALDconsult19-Feb-13 3:57 
GeneralRe: Sometimes I wonder about code comments Pin
Marco Bertschi19-Feb-13 4:12
protectorMarco Bertschi19-Feb-13 4:12 
GeneralMessage Removed Pin
19-Feb-13 4:16
professionalN_tro_P19-Feb-13 4:16 
GeneralRe: Sometimes I wonder about code comments Pin
Marco Bertschi19-Feb-13 4:36
protectorMarco Bertschi19-Feb-13 4:36 
GeneralRe: Sometimes I wonder about code comments Pin
SoMad19-Feb-13 9:56
professionalSoMad19-Feb-13 9:56 

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.