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.

 
GeneralThe best refactoring I have ever seen Pinmembermatt_taws17-Jan-13 2:29 
GeneralRe: The best refactoring I have ever seen PinmemberSuper Lloyd17-Jan-13 3:42 
GeneralRe: The best refactoring I have ever seen PinmemberJonathan C Dickinson17-Jan-13 4:22 
GeneralRe: The best refactoring I have ever seen PinmemberPIEBALDconsult17-Jan-13 4:48 
GeneralRe: The best refactoring I have ever seen PinmemberRob Grainger1-Feb-13 4:17 
GeneralWhat was I thinking Pinmemberdjj5516-Jan-13 2:15 
GeneralRe: What was I thinking PinmemberDavid Goebet16-Jan-13 2:40 
GeneralRe: What was I thinking PinmemberMatt U.16-Jan-13 2:56 
I've done something similar to this recently. It was like this:
 
SELECT CASE
    WHEN Field1 = 'Something #1' THEN 'Result #1'
    WHEN Field1 = 'Something #2' THEN 'N/A'
    WHEN Field1 = 'Something #3' THEN '(Empty)'
    ELSE 'N/A'
    END
 
And I continued to wonder why even when 'Something #1' was not met, I was seeing 'N/A' in the results. Took me a bit to figure it out. D'Oh! | :doh:
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.

GeneralRe: What was I thinking Pinmemberpeterchen16-Jan-13 4:24 
GeneralRe: What was I thinking PinmemberG James16-Jan-13 10:57 
JokeRe: What was I thinking PinadminChris Maunder16-Jan-13 19:02 
GeneralRe: What was I thinking Pinmember33deepak16-Jan-13 19:13 
GeneralRe: What was I thinking PinadminChris Maunder16-Jan-13 19:14 
GeneralRe: What was I thinking PinmemberJames Lonero19-Jan-13 12:08 
JokeRe: What was I thinking PinmemberAndrew Rissing17-Jan-13 6:48 
GeneralRe: What was I thinking PinadminChris Maunder17-Jan-13 10:43 
GeneralRe: What was I thinking PinmemberAndrew Rissing17-Jan-13 10:55 
JokeRe: What was I thinking PinmemberJecc23-Jan-13 0:56 
GeneralRe: What was I thinking PinmemberNagy Vilmos23-Jan-13 1:33 
GeneralRe: What was I thinking PinmemberJonathan C Dickinson16-Jan-13 22:21 
GeneralRe: What was I thinking PinmemberSentenryu16-Jan-13 23:23 
GeneralRe: What was I thinking PinmemberJonathan C Dickinson16-Jan-13 23:26 
GeneralRe: What was I thinking PinmemberRanjan.D17-Jan-13 12:32 
GeneralRe: What was I thinking PinmemberRob Grainger1-Feb-13 4:21 
GeneralRe: What was I thinking PinmemberTomz_KV17-Jan-13 3:58 

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