Click here to Skip to main content
12,448,059 members (91,261 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, 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: DateTime.Now vs. GetSystemTime Pin
Pete O'Hanlon2-Jun-14 0:32
protectorPete O'Hanlon2-Jun-14 0:32 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Jörgen Andersson2-Jun-14 21:11
professionalJörgen Andersson2-Jun-14 21:11 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Bernhard Hiller2-Jun-14 21:35
professionalBernhard Hiller2-Jun-14 21:35 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Jörgen Andersson2-Jun-14 21:56
professionalJörgen Andersson2-Jun-14 21:56 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
BobJanova2-Jun-14 0:51
memberBobJanova2-Jun-14 0:51 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Rob Philpott10-Jun-14 5:20
professionalRob Philpott10-Jun-14 5:20 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Eddy Vluggen6-Jun-14 5:11
professionalEddy Vluggen6-Jun-14 5:11 
GeneralSuccessfully writing to a string literal Pin
Indivara18-May-14 23:44
professionalIndivara18-May-14 23:44 
GeneralRe: Successfully writing to a string literal Pin
Freak3019-May-14 1:45
memberFreak3019-May-14 1:45 
GeneralRe: Successfully writing to a string literal Pin
Indivara19-May-14 5:17
professionalIndivara19-May-14 5:17 
GeneralRe: Successfully writing to a string literal Pin
newton.saber19-May-14 1:45
membernewton.saber19-May-14 1:45 
GeneralRe: Successfully writing to a string literal Pin
Indivara19-May-14 5:15
professionalIndivara19-May-14 5:15 
GeneralRe: Successfully writing to a string literal Pin
newton.saber19-May-14 5:34
membernewton.saber19-May-14 5:34 
GeneralThe Exception to the C# Rules PinPopular
Brady Kelly15-May-14 18:55
memberBrady Kelly15-May-14 18:55 
get
{
    try
    {
        XTime.OL.UserObj myUserObj = (XTime.OL.UserObj)(HttpContext.Current.Session["UserObj"]);
 
        //If Session has not been created, go to catch
        if (myUserObj.USER_CODEID == 0) { }
 
        return myUserObj;
    }
    catch
    {
        XTime.OL.UserObj myUserObj = new XTime.OL.UserObj();
 
        if (HttpContext.Current.Session != null)
            HttpContext.Current.Session["UserObj"] = myUserObj;
 
        return myUserObj;
    }
}
Go to catch is worse than using goto to go to catch.
GeneralRe: The Exception to the C# Rules Pin
Bernhard Hiller15-May-14 21:54
professionalBernhard Hiller15-May-14 21:54 
GeneralRe: The Exception to the C# Rules Pin
Shameel16-May-14 0:53
professionalShameel16-May-14 0:53 
GeneralRe: The Exception to the C# Rules Pin
Keith Barrow19-May-14 6:28
mentorKeith Barrow19-May-14 6:28 
GeneralRe: The Exception to the C# Rules Pin
Bernhard Hiller19-May-14 22:46
professionalBernhard Hiller19-May-14 22:46 
GeneralRe: The Exception to the C# Rules Pin
cpkilekofp19-Jun-14 9:50
membercpkilekofp19-Jun-14 9:50 
GeneralVB6 code that emits VB6 code Pin
MrChug7-May-14 16:12
memberMrChug7-May-14 16:12 
GeneralI can't set title for this post!!! Pin
Meysam Tolouee2-May-14 18:45
memberMeysam Tolouee2-May-14 18:45 
GeneralRe: I can't set title for this post!!! <- then what's that? You trying to confuse me? Pin
Eddy Vluggen3-May-14 8:25
professionalEddy Vluggen3-May-14 8:25 
GeneralRe: I can't set title for this post!!! Pin
PIEBALDconsult3-May-14 12:14
memberPIEBALDconsult3-May-14 12:14 
GeneralRe: I can't set title for this post!!! Pin
cpkilekofp19-Jun-14 11:05
membercpkilekofp19-Jun-14 11:05 
GeneralSome useful extension methods Pin
Brisingr Aerowing2-May-14 13:41
professionalBrisingr Aerowing2-May-14 13:41 
GeneralRe: Some useful extension methods Pin
PIEBALDconsult2-May-14 14:50
memberPIEBALDconsult2-May-14 14:50 
GeneralRe: Some useful extension methods Pin
robocodeboy13-May-14 21:52
memberrobocodeboy13-May-14 21:52 
QuestionRe: Some useful extension methods Pin
Matt T Heffron5-May-14 14:45
professionalMatt T Heffron5-May-14 14:45 
AnswerRe: Some useful extension methods Pin
Brisingr Aerowing5-May-14 15:30
professionalBrisingr Aerowing5-May-14 15:30 
GeneralRe: Some useful extension methods Pin
BobJanova6-May-14 0:43
memberBobJanova6-May-14 0:43 
GeneralThinking Inside the Box PinPopular
kmoorevs24-Apr-14 12:11
memberkmoorevs24-Apr-14 12:11 
GeneralRe: Thinking Inside the Box Pin
ahmed zahmed28-Apr-14 7:35
memberahmed zahmed28-Apr-14 7:35 
GeneralRe: Thinking Inside the Box PinPopular
Nagy Vilmos29-Apr-14 11:05
professionalNagy Vilmos29-Apr-14 11:05 
GeneralRe: Thinking Inside the Box Pin
kmoorevs29-Apr-14 11:51
memberkmoorevs29-Apr-14 11:51 
GeneralRe: Thinking Inside the Box Pin
OriginalGriff30-Apr-14 8:13
protectorOriginalGriff30-Apr-14 8:13 
GeneralRe: Thinking Inside the Box Pin
Argonia30-Apr-14 5:00
professionalArgonia30-Apr-14 5:00 
GeneralRe: Thinking Inside the Box Pin
RyanDev29-Apr-14 12:52
mvpRyanDev29-Apr-14 12:52 
Generalconscious perma-coupling Pin
Duncan Edwards Jones20-Apr-14 12:17
professionalDuncan Edwards Jones20-Apr-14 12:17 
GeneralRe: conscious perma-coupling PinPopular
Shameel21-Apr-14 0:53
memberShameel21-Apr-14 0:53 
GeneralRe: conscious perma-coupling Pin
BobJanova21-Apr-14 23:58
memberBobJanova21-Apr-14 23:58 
GeneralRe: conscious perma-coupling Pin
Duncan Edwards Jones22-Apr-14 0:10
professionalDuncan Edwards Jones22-Apr-14 0:10 
GeneralRe: conscious perma-coupling Pin
Jacek Gajek30-Apr-14 22:18
memberJacek Gajek30-Apr-14 22:18 
GeneralRtf -WTF: why is it different? Pin
Bernhard Hiller15-Apr-14 4:56
professionalBernhard Hiller15-Apr-14 4:56 
GeneralRe: Rtf -WTF: why is it different? Pin
ledtech315-Apr-14 5:11
memberledtech315-Apr-14 5:11 
GeneralRe: Rtf -WTF: why is it different? Pin
Bernhard Hiller15-Apr-14 20:55
professionalBernhard Hiller15-Apr-14 20:55 
GeneralRe: Rtf -WTF: why is it different? Pin
ledtech316-Apr-14 4:28
memberledtech316-Apr-14 4:28 
GeneralRe: Rtf -WTF: why is it different? Pin
Rob Grainger16-Apr-14 0:08
memberRob Grainger16-Apr-14 0:08 
GeneralRe: Rtf -WTF: why is it different? Pin
Manikandan1011-Jun-14 3:31
professionalManikandan1011-Jun-14 3:31 
General#region Pin
Bernhard Hiller11-Apr-14 2:51
professionalBernhard Hiller11-Apr-14 2:51 
GeneralRe: #region Pin
tgrt11-Apr-14 3:58
membertgrt11-Apr-14 3:58 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160811.3 | Last Updated 25 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid