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

 
GeneralRe: Worst practise - asking a question without searching... Pin
Lutosław27-Mar-11 11:27
Lutosław27-Mar-11 11:27 
GeneralUltimate Database Fail [updated] Pin
wizardzz1-Mar-11 5:05
wizardzz1-Mar-11 5:05 
GeneralRe: Ultimate Database Fail Pin
musefan1-Mar-11 6:22
musefan1-Mar-11 6:22 
GeneralRe: Ultimate Database Fail Pin
wizardzz1-Mar-11 6:25
wizardzz1-Mar-11 6:25 
GeneralRe: Ultimate Database Fail Pin
musefan1-Mar-11 6:36
musefan1-Mar-11 6:36 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev1-Mar-11 7:26
protectorAspDotNetDev1-Mar-11 7:26 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev1-Mar-11 7:38
protectorAspDotNetDev1-Mar-11 7:38 
GeneralRe: Ultimate Database Fail Pin
wizardzz1-Mar-11 7:59
wizardzz1-Mar-11 7:59 
The open_quantity is never a search criteria. Its value is 0 99.99% of the time, and we never search by open_quantity or order_type, if we did, the order_id and date would be included as well. Have you ever inserted large sets of data into a table that had a clustered index, while the inserted data would have to be physically stored into the middle of the table because of the index? It's quite ugly.

I'm not suggesting eliminating the clustered index, but there's no reason the data need be physically stored in order according to open quantity and order type.
"Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!"
— Hunter S. Thompson

GeneralRe: Ultimate Database Fail Pin
AspDotNetDev1-Mar-11 8:35
protectorAspDotNetDev1-Mar-11 8:35 
GeneralRe: Ultimate Database Fail Pin
wizardzz1-Mar-11 8:37
wizardzz1-Mar-11 8:37 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev3-Mar-11 11:23
protectorAspDotNetDev3-Mar-11 11:23 
GeneralRe: Ultimate Database Fail Pin
Andy Brummer3-Mar-11 10:37
sitebuilderAndy Brummer3-Mar-11 10:37 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev3-Mar-11 11:22
protectorAspDotNetDev3-Mar-11 11:22 
GeneralRe: Ultimate Database Fail Pin
Andy Brummer3-Mar-11 11:40
sitebuilderAndy Brummer3-Mar-11 11:40 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev3-Mar-11 12:02
protectorAspDotNetDev3-Mar-11 12:02 
GeneralRe: Ultimate Database Fail Pin
Andy Brummer3-Mar-11 12:22
sitebuilderAndy Brummer3-Mar-11 12:22 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev3-Mar-11 12:51
protectorAspDotNetDev3-Mar-11 12:51 
GeneralRe: Ultimate Database Fail Pin
wizardzz3-Mar-11 11:55
wizardzz3-Mar-11 11:55 
GeneralRe: Ultimate Database Fail Pin
AspDotNetDev3-Mar-11 12:09
protectorAspDotNetDev3-Mar-11 12:09 
GeneralRe: Ultimate Database Fail Pin
Andy Brummer3-Mar-11 12:32
sitebuilderAndy Brummer3-Mar-11 12:32 
GeneralRe: Ultimate Database Fail Pin
wizardzz22-Mar-11 4:35
wizardzz22-Mar-11 4:35 
GeneralStrings: the perfect way to compare numbers. Pin
OriginalGriff27-Feb-11 23:30
mveOriginalGriff27-Feb-11 23:30 
GeneralRe: Strings: the perfect way to compare numbers. Pin
fjdiewornncalwe28-Feb-11 3:25
professionalfjdiewornncalwe28-Feb-11 3:25 
GeneralRe: Strings: the perfect way to compare numbers. Pin
OriginalGriff28-Feb-11 3:30
mveOriginalGriff28-Feb-11 3:30 
GeneralRe: Strings: the perfect way to compare numbers. Pin
fjdiewornncalwe28-Feb-11 8:08
professionalfjdiewornncalwe28-Feb-11 8:08 

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.