Click here to Skip to main content
15,884,986 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.

 
AnswerRe: Austin Danger Powers Pin
AspDotNetDev12-Apr-11 6:31
protectorAspDotNetDev12-Apr-11 6:31 
GeneralRe: Austin Danger Powers Pin
Paladin200012-Apr-11 9:35
Paladin200012-Apr-11 9:35 
GeneralRe: Austin Danger Powers Pin
G-Tek13-Apr-11 3:33
G-Tek13-Apr-11 3:33 
GeneralRe: Austin Danger Powers Pin
AspDotNetDev13-Apr-11 3:38
protectorAspDotNetDev13-Apr-11 3:38 
GeneralRe: Austin Danger Powers Pin
G-Tek13-Apr-11 3:45
G-Tek13-Apr-11 3:45 
GeneralRe: Austin Danger Powers Pin
AspDotNetDev13-Apr-11 3:50
protectorAspDotNetDev13-Apr-11 3:50 
GeneralRe: Austin Danger Powers Pin
G-Tek13-Apr-11 5:27
G-Tek13-Apr-11 5:27 
GeneralRe: Austin Danger Powers Pin
Paladin200013-Apr-11 6:32
Paladin200013-Apr-11 6:32 
Dim firstEmpty As String = String.IsNullOrEmpty(firstName)

...

If firstEmpty Then


What's really horrible is that it's not only doing an unnecessary implicit conversion, it's converting it back implicitly with each "If" statement. That may not be a big performance hit here, but put this in an iteration for a few thousand/million loop cycles and I'm sure it would add up (unless maybe the compiler corrects for this mistake, I'm not certain).

That gets *my* vote...
GeneralRe: Austin Danger Powers Pin
Paladin200013-Apr-11 4:13
Paladin200013-Apr-11 4:13 
GeneralRe: Austin Danger Powers Pin
G-Tek13-Apr-11 4:29
G-Tek13-Apr-11 4:29 
AnswerRe: Austin Danger Powers Pin
DragonsRightWing22-Apr-11 7:16
DragonsRightWing22-Apr-11 7:16 
GeneralRe: Austin Danger Powers Pin
_Erik_13-Apr-11 5:16
_Erik_13-Apr-11 5:16 
GeneralRe: Austin Danger Powers Pin
AspDotNetDev13-Apr-11 6:46
protectorAspDotNetDev13-Apr-11 6:46 
GeneralRe: Austin Danger Powers Pin
TorstenFrings13-Apr-11 23:09
TorstenFrings13-Apr-11 23:09 
GeneralRe: Austin Danger Powers Pin
AspDotNetDev20-Apr-11 7:08
protectorAspDotNetDev20-Apr-11 7:08 
GeneralRe: Austin Danger Powers Pin
TorstenFrings20-Apr-11 23:32
TorstenFrings20-Apr-11 23:32 
GeneralRe: Austin Danger Powers Pin
AspDotNetDev21-Apr-11 7:56
protectorAspDotNetDev21-Apr-11 7:56 
GeneralRe: Austin Danger Powers Pin
Jassim Makki16-Apr-11 5:43
Jassim Makki16-Apr-11 5:43 
GeneralRevolutionary new way to iterate indexable collections. Who needs to know how many elements they have? PinPopular
Vladimir Svyatski9-Apr-11 2:24
professionalVladimir Svyatski9-Apr-11 2:24 
GeneralRe: Revolutionary new way to iterate indexable collections. Who needs to know how many elements they have? PinPopular
Uros Calakovic9-Apr-11 6:55
Uros Calakovic9-Apr-11 6:55 
GeneralRe: Revolutionary new way to iterate indexable collections. Who needs to know how many elements they have? Pin
BillW3312-Apr-11 3:06
professionalBillW3312-Apr-11 3:06 
GeneralLong Post! Re: Revolutionary new way to iterate indexable collections. Who needs to know how many elements they have? [modified] Pin
Keith Barrow16-Apr-11 6:34
professionalKeith Barrow16-Apr-11 6:34 
GeneralRe: Long Post! Re: Revolutionary new way to iterate indexable collections. Who needs to know how many elements they have? Pin
Vladimir Svyatski18-Apr-11 5:54
professionalVladimir Svyatski18-Apr-11 5:54 
GeneralRe: Long Post! Re: Revolutionary new way to iterate indexable collections. Who needs to know how many elements they have? Pin
Keith Barrow18-Apr-11 6:43
professionalKeith Barrow18-Apr-11 6:43 
GeneralRe: Revolutionary new way to iterate indexable collections. Who needs to know how many elements they have? Pin
DragonsRightWing22-Apr-11 7:44
DragonsRightWing22-Apr-11 7:44 

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.