Click here to Skip to main content

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: Enabling backwards compatibility Pinmembertecgoblin1-Feb-12 0:27 
GeneralRe: Enabling backwards compatibility PinmemberGamleKoder1-Feb-12 7:56 
GeneralRe: Enabling backwards compatibility Pinmembertecgoblin1-Feb-12 8:10 
GeneralRe: Enabling backwards compatibility PinmemberStefan_Lang1-Feb-12 1:42 
GeneralRe: Enabling backwards compatibility PinmemberGarry Lowther1-Feb-12 1:42 
GeneralRe: Enabling backwards compatibility Pinmembercharlieg1-Feb-12 5:52 
GeneralRe: Enabling backwards compatibility PinmemberJeremy David Thomson1-Feb-12 10:37 
GeneralStrictly Short Circuit PinprotectorAspDotNetDev26-Jan-12 15:02 
Names changed to protect the innocent...
 
I'm working with some VB.net projects and I decided to turn on Option Strict. It threw an error for this line:
If someProp Is Nothing OrElse String.IsNullOrEmpty(someProp.Value OrElse someProp.Value = "0") Then
This is what was intended:
If someProp Is Nothing OrElse String.IsNullOrEmpty(someProp.Value) OrElse someProp.Value = "0" Then
Big Grin | :-D for option explicit! Cry | :(( for the fact that I have several projects to go and I'm working in the order of best code to worst code.

GeneralRe: Strictly Short Circuit Pinmemberryanb3127-Jan-12 5:25 
GeneralRe: Strictly Short Circuit Pinmembercpkilekofp27-Jan-12 6:40 
GeneralRe: Strictly Short Circuit PinprotectorAspDotNetDev27-Jan-12 7:03 
GeneralRe: Strictly Short Circuit Pinmemberryanb3127-Jan-12 8:15 
GeneralRe: Strictly Short Circuit PinprotectorAspDotNetDev27-Jan-12 8:33 
GeneralRe: Strictly Short Circuit Pinmemberryanb3127-Jan-12 8:47 
GeneralRe: Strictly Short Circuit PinprotectorAspDotNetDev27-Jan-12 8:59 
GeneralRe: Strictly Short Circuit Pinmemberryanb3127-Jan-12 9:06 
GeneralRe: Strictly Short Circuit Pinmemberdawmail33330-Jan-12 0:41 
GeneralRe: Strictly Short Circuit PinprotectorAspDotNetDev30-Jan-12 4:37 
GeneralRe: Strictly Short Circuit PinmemberLetMeFinclOut30-Jan-12 12:36 
GeneralRe: Strictly Short Circuit Pinmembercpkilekofp27-Jan-12 9:09 
GeneralRe: Strictly Short Circuit PinmemberJan Steyn29-Jan-12 23:16 
GeneralRe: Strictly Short Circuit PinmemberK Quinn30-Jan-12 1:51 
GeneralRe: Strictly Short Circuit Pinmemberagolddog30-Jan-12 3:54 
GeneralRe: Strictly Short Circuit PinmemberPatrick Fox30-Jan-12 6:07 
GeneralRe: Strictly Short Circuit Pinmemberekolis30-Jan-12 10:28 

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
Web04 | 2.8.140916.1 | Last Updated 16 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid