Click here to Skip to main content
11,492,385 members (63,028 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: They grow up so fast.. Pin
Marcus Kramer20-Sep-12 5:55
memberMarcus Kramer20-Sep-12 5:55 
GeneralRe: They grow up so fast.. Pin
BobJanova20-Sep-12 6:24
memberBobJanova20-Sep-12 6:24 
GeneralRe: They grow up so fast.. Pin
AspDotNetDev21-Sep-12 7:37
protectorAspDotNetDev21-Sep-12 7:37 
GeneralRe: They grow up so fast.. Pin
jim lahey21-Sep-12 8:10
memberjim lahey21-Sep-12 8:10 
GeneralRe: They grow up so fast.. Pin
Naerling21-Sep-12 23:04
memberNaerling21-Sep-12 23:04 
GeneralRe: They grow up so fast.. Pin
zenwalker19859-Oct-12 19:07
memberzenwalker19859-Oct-12 19:07 
GeneralRe: They grow up so fast.. Pin
jim lahey9-Oct-12 22:49
memberjim lahey9-Oct-12 22:49 
GeneralC# properties and type safety Pin
Julien Villers19-Sep-12 23:31
memberJulien Villers19-Sep-12 23:31 
Apparently, my predecessor didn't trust in the C# typing system and... there's more that's wrong with this:
[XmlIgnore]
public DateTime? SomeProperty
{
    get;set;
}
 
public String SomePropertyXml
{
    get
    {
        return SomeProperty.HasValue ? XmlConvert.ToString(SomeProperty.Value) : null;
    }
    set
    {
        if (String.IsNullOrEmpty(value as String))
            SomeProperty = null;
        else
            SomeProperty = XmlConvert.ToTimeSpan(value);
    }
}

Oh, and I have removed identifiable identifiers, but I haven't removed any comments Frown | :-(
'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail

GeneralRe: C# properties and type safety Pin
Andrei Straut19-Sep-12 23:44
memberAndrei Straut19-Sep-12 23:44 
GeneralRe: C# properties and type safety Pin
Julien Villers20-Sep-12 4:29
memberJulien Villers20-Sep-12 4:29 
GeneralRe: C# properties and type safety Pin
Eddy Vluggen20-Sep-12 6:45
memberEddy Vluggen20-Sep-12 6:45 
GeneralRe: C# properties and type safety Pin
Julien Villers20-Sep-12 9:30
memberJulien Villers20-Sep-12 9:30 
GeneralRe: C# properties and type safety Pin
BobJanova20-Sep-12 7:29
memberBobJanova20-Sep-12 7:29 
GeneralRe: C# properties and type safety [modified] Pin
CIDev20-Sep-12 4:57
memberCIDev20-Sep-12 4:57 
GeneralRe: C# properties and type safety Pin
Zac Greve20-Sep-12 6:35
memberZac Greve20-Sep-12 6:35 
GeneralRe: C# properties and type safety Pin
SimulationofSai29-Sep-12 14:42
memberSimulationofSai29-Sep-12 14:42 
GeneralC# Exception handling 101 Pin
Julien Villers19-Sep-12 23:26
memberJulien Villers19-Sep-12 23:26 
GeneralRe: C# Exception handling 101 Pin
Andrei Straut19-Sep-12 23:48
memberAndrei Straut19-Sep-12 23:48 
GeneralRe: C# Exception handling 101 Pin
CIDev20-Sep-12 4:10
memberCIDev20-Sep-12 4:10 
GeneralRe: C# Exception handling 101 Pin
Naerling21-Sep-12 23:01
memberNaerling21-Sep-12 23:01 
GeneralRe: C# Exception handling 101 Pin
Julien Villers23-Sep-12 23:55
memberJulien Villers23-Sep-12 23:55 
GeneralRe: C# Exception handling 101 Pin
Naerling24-Sep-12 9:09
memberNaerling24-Sep-12 9:09 
GeneralRe: C# Exception handling 101 Pin
Jonathan C Dickinson30-Sep-12 22:51
memberJonathan C Dickinson30-Sep-12 22:51 
GeneralRe: C# Exception handling 101 Pin
Julien Villers30-Sep-12 23:23
memberJulien Villers30-Sep-12 23:23 
QuestionWhy? Pin
AspDotNetDev18-Sep-12 16:27
protectorAspDotNetDev18-Sep-12 16:27 

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 28 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid