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: 42 PinmemberAdam R Harris11-Dec-12 11:13 
GeneralWould you like to buy an IsNull ? PinmemberPIEBALDconsult5-Dec-12 9:04 
GeneralRe: Would you like to buy an IsNull ? Pinmember d@nish 5-Dec-12 9:22 
GeneralRe: Would you like to buy an IsNull ? PinmemberPIEBALDconsult5-Dec-12 10:31 
GeneralRe: Would you like to buy an IsNull ? PinprotectorAspDotNetDev5-Dec-12 11:07 
GeneralRe: Would you like to buy an IsNull ? PinmemberPIEBALDconsult5-Dec-12 13:10 
GeneralRe: Would you like to buy an IsNull ? Pinmember d@nish 5-Dec-12 22:06 
GeneralRe: Would you like to buy an IsNull ? PinmemberKP Lee5-Dec-12 13:36 
There are plenty of dumb things done in SQL. Could be the coder never heard of ISNULL. Could be he came from a programming background. Could be he doesn't realize ISNULL is more efficient than a case statement. Could be a misapplication of "don't execute a function in a where clause" rule. Could be he forgot about ISNULL. Could be he's in the "Let's obsfucate this code as much as possible" club.
 
At least it isn't SUM(CASE WHEN cTT.Total IS NOT NULL THEN cTT.Total ELSE 0 END) as 'Total_Total'
GeneralRe: Would you like to buy an IsNull ? PinmemberPIEBALDconsult5-Dec-12 14:11 
GeneralRe: Would you like to buy an IsNull ? PinmemberJörgen Andersson6-Dec-12 22:12 
GeneralWhy do engineers insist on complexity? PinmemberJoe Woodbury4-Dec-12 8:33 
GeneralRe: Why do engineers insist on complexity? PinmemberAndrew Rissing4-Dec-12 9:11 
JokeRe: Why do engineers insist on complexity? PinmemberZac Greve4-Dec-12 9:12 
GeneralRe: Why do engineers insist on complexity? PinmemberChris Meech4-Dec-12 10:10 
GeneralRe: Why do engineers insist on complexity? PinmemberYvesDaoust4-Dec-12 21:57 
GeneralRe: Why do engineers insist on complexity? PinmemberSeattleC++5-Dec-12 8:00 
GeneralRe: Why do engineers insist on complexity? PinmemberFran Porretto5-Dec-12 1:50 
GeneralRe: Why do engineers insist on complexity? PinmemberPSM_300E5-Dec-12 3:16 
GeneralRe: Why do engineers insist on complexity? PinmemberFran Porretto5-Dec-12 3:17 
GeneralRe: Why do engineers insist on complexity? PinmemberPSM_300E5-Dec-12 3:19 
GeneralRe: Why do engineers insist on complexity? PinmemberMark H25-Dec-12 9:13 
GeneralRe: Why do engineers insist on complexity? PinmemberBC @ CV5-Dec-12 6:05 
GeneralRe: Why do engineers insist on complexity? PinmemberSeattleC++5-Dec-12 8:12 
GeneralRe: Why do engineers insist on complexity? PinmemberFran Porretto5-Dec-12 8:31 
GeneralRe: Why do engineers insist on complexity? Pinmembersatovey5-Dec-12 12:16 

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
Web02 | 2.8.1411023.1 | Last Updated 24 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid