Click here to Skip to main content
11,480,021 members (65,107 online)

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, embarrasing 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
SoMad7-Mar-13 2:13
memberSoMad7-Mar-13 2:13 
GeneralRe: Comments in a foreign language Pin
Marco Bertschi7-Mar-13 2:23
memberMarco Bertschi7-Mar-13 2:23 
GeneralRe: Comments in a foreign language Pin
SoMad7-Mar-13 2:43
memberSoMad7-Mar-13 2:43 
GeneralRe: Comments in a foreign language Pin
szukuro7-Mar-13 3:08
memberszukuro7-Mar-13 3:08 
GeneralRe: Comments in a foreign language Pin
Mike Marynowski8-Mar-13 5:40
memberMike Marynowski8-Mar-13 5:40 
GeneralRe: Comments in a foreign language Pin
Marco Bertschi12-Mar-13 1:32
memberMarco Bertschi12-Mar-13 1:32 
GeneralRe: Comments in a foreign language Pin
Jacek Gajek24-May-13 13:29
memberJacek Gajek24-May-13 13:29 
GeneralEnhancing the bugs Pin
Shameel5-Mar-13 4:33
memberShameel5-Mar-13 4:33 
GeneralRe: Enhancing the bugs Pin
Dave Kreskowiak5-Mar-13 4:57
mvpDave Kreskowiak5-Mar-13 4:57 
GeneralRe: Enhancing the bugs Pin
szukuro5-Mar-13 5:04
memberszukuro5-Mar-13 5:04 
GeneralRe: Enhancing the bugs Pin
S Houghtelin8-Mar-13 3:27
memberS Houghtelin8-Mar-13 3:27 
GeneralRe: Enhancing the bugs Pin
Pualee5-Mar-13 5:47
memberPualee5-Mar-13 5:47 
GeneralRe: Enhancing the bugs Pin
Walt Fair, Jr.5-Mar-13 8:02
subeditorWalt Fair, Jr.5-Mar-13 8:02 
GeneralSomeone is sure that availability check is performed no matter what [modified] Pin
krumia28-Feb-13 19:15
memberkrumia28-Feb-13 19:15 
Of course, variables changed, methods renamed, and parameters omitted to protect the (not so) innocent.
// 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 21:23
memberKevin Drzycimski28-Feb-13 21:23 
GeneralRe: Someone is sure that availability check is performed no matter what Pin
Bernhard Hiller28-Feb-13 21:41
memberBernhard Hiller28-Feb-13 21:41 
GeneralRe: Someone is sure that availability check is performed no matter what Pin
Lee Venkatsamy9-Apr-13 5:13
memberLee Venkatsamy9-Apr-13 5:13 
GeneralREMOVED [modified] Pin
Brisingr Aerowing24-Feb-13 8:59
memberBrisingr Aerowing24-Feb-13 8:59 
GeneralRe: Well then. Pin
PIEBALDconsult25-Feb-13 13:59
memberPIEBALDconsult25-Feb-13 13:59 
GeneralRe: Well then. Pin
Max_Power_Up26-Feb-13 7:35
memberMax_Power_Up26-Feb-13 7:35 
GeneralRe: Well then. Pin
d@nish 12-Mar-13 20:52
member d@nish 12-Mar-13 20:52 
GeneralMessage Removed Pin
Brisingr Aerowing13-Mar-13 4:09
memberBrisingr Aerowing13-Mar-13 4:09 
GeneralRe: Well then. Pin
d@nish 13-Mar-13 4:23
member d@nish 13-Mar-13 4:23 
GeneralSometimes I wonder about code comments Pin
Marco Bertschi19-Feb-13 2:49
memberMarco Bertschi19-Feb-13 2:49 
GeneralRe: Sometimes I wonder about code comments Pin
PIEBALDconsult19-Feb-13 4:36
memberPIEBALDconsult19-Feb-13 4:36 
GeneralRe: Sometimes I wonder about code comments Pin
Marco Bertschi19-Feb-13 4:41
memberMarco Bertschi19-Feb-13 4:41 
GeneralRe: Sometimes I wonder about code comments Pin
PIEBALDconsult19-Feb-13 4:57
memberPIEBALDconsult19-Feb-13 4:57 
GeneralRe: Sometimes I wonder about code comments Pin
Marco Bertschi19-Feb-13 5:12
memberMarco Bertschi19-Feb-13 5:12 
GeneralRe: Sometimes I wonder about code comments Pin
Collin Jasnoch19-Feb-13 5:16
memberCollin Jasnoch19-Feb-13 5:16 
GeneralRe: Sometimes I wonder about code comments Pin
Marco Bertschi19-Feb-13 5:36
memberMarco Bertschi19-Feb-13 5:36 
GeneralRe: Sometimes I wonder about code comments Pin
Collin Jasnoch19-Feb-13 5:39
memberCollin Jasnoch19-Feb-13 5:39 
GeneralRe: Sometimes I wonder about code comments Pin
SoMad19-Feb-13 10:56
memberSoMad19-Feb-13 10:56 
GeneralRe: Sometimes I wonder about code comments Pin
PIEBALDconsult19-Feb-13 13:59
memberPIEBALDconsult19-Feb-13 13:59 
GeneralRe: Sometimes I wonder about code comments Pin
Bernhard Hiller19-Feb-13 23:04
memberBernhard Hiller19-Feb-13 23:04 
GeneralRe: Sometimes I wonder about code comments Pin
Marco Bertschi20-Feb-13 10:56
memberMarco Bertschi20-Feb-13 10:56 
GeneralRe: Sometimes I wonder about code comments Pin
BobJanova20-Feb-13 5:12
memberBobJanova20-Feb-13 5:12 
GeneralRe: Sometimes I wonder about code comments Pin
krumia3-Mar-13 6:35
memberkrumia3-Mar-13 6:35 
RantRe: Sometimes I wonder about code comments Pin
Super Lloyd4-Mar-13 14:32
memberSuper Lloyd4-Mar-13 14:32 
GeneralRe: Sometimes I wonder about code comments Pin
wout de zeeuw6-Mar-13 15:31
memberwout de zeeuw6-Mar-13 15:31 
GeneralThis is the kind of productivity you get when you pay by lines of code Pin
Rob Grainger18-Feb-13 2:18
memberRob Grainger18-Feb-13 2:18 
JokeRe: This is the kind of productivity you get when you pay by lines of code Pin
AspDotNetDev18-Feb-13 10:32
protectorAspDotNetDev18-Feb-13 10:32 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
Naerling18-Feb-13 21:45
memberNaerling18-Feb-13 21:45 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
OriginalGriff19-Feb-13 5:59
mvpOriginalGriff19-Feb-13 5:59 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
Bernhard Hiller19-Feb-13 6:05
memberBernhard Hiller19-Feb-13 6:05 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
Marcus Kramer20-Feb-13 4:13
mvpMarcus Kramer20-Feb-13 4:13 
GeneralRe: This is the kind of productivity you get when you pay by lines of code Pin
wout de zeeuw6-Mar-13 15:31
memberwout de zeeuw6-Mar-13 15:31 
GeneralIF-free codes Pin
SarK0Y15-Feb-13 13:34
memberSarK0Y15-Feb-13 13:34 
GeneralRe: IF-free codes Pin
Paul Conrad15-Feb-13 13:54
memberPaul Conrad15-Feb-13 13:54 
GeneralRe: IF-free codes Pin
SarK0Y15-Feb-13 14:06
memberSarK0Y15-Feb-13 14:06 
GeneralRe: IF-free codes Pin
Gary Wheeler19-Feb-13 1:17
memberGary Wheeler19-Feb-13 1:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 23 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid