Click here to Skip to main content
16,014,734 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: When normalization goes wrong. Horribly. Pin
chrishuff16-Jul-07 5:58
chrishuff16-Jul-07 5:58 
GeneralRe: When normalization goes wrong. Horribly. Pin
peterchen15-Jul-07 13:15
peterchen15-Jul-07 13:15 
GeneralRe: When normalization goes wrong. Horribly. Pin
martin_hughes15-Jul-07 13:35
martin_hughes15-Jul-07 13:35 
GeneralRe: When normalization goes wrong. Horribly. Pin
peterchen15-Jul-07 14:01
peterchen15-Jul-07 14:01 
GeneralRe: When normalization goes wrong. Horribly. Pin
Paul Conrad15-Jul-07 14:03
professionalPaul Conrad15-Jul-07 14:03 
JokeRe: When normalization goes wrong. Horribly. Pin
PIEBALDconsult15-Jul-07 15:41
mvePIEBALDconsult15-Jul-07 15:41 
GeneralRe: When normalization goes wrong. Horribly. Pin
Tristan Rhodes16-Jul-07 2:03
Tristan Rhodes16-Jul-07 2:03 
GeneralRe: When normalization goes wrong. Horribly. Pin
PaulPrice16-Jul-07 7:17
PaulPrice16-Jul-07 7:17 
Hell I just rewrote a function I found that was calculating a Spot Date (2 Working days forwrd from the Deal date in FX trading).

It worked on an Exclusive set as you say, but instead of getting all of the holidays for the specific currencies (of which there is always 2 and always known in advance) and working with that. It looped adding a day until it did not get a count > 0 from an SQL statement like this and it is a weekday.

Select count(CurrencyId) from Holiday Where holidayDate = '2007/01/01'

where it changed the date forward.

To work out one spot date over the christmas period it would open, query close anything up to 4 or 5 times per confirmation. Crazy I tell ya.

You will be pleased to note that it no longer does this Wink | ;-)
GeneralRe: When normalization goes wrong. Horribly. Pin
Glen Murtagh16-Jul-07 11:57
Glen Murtagh16-Jul-07 11:57 
GeneralRe: When normalization goes wrong. Horribly. Pin
Bert delaVega20-Jul-07 7:48
Bert delaVega20-Jul-07 7:48 
GeneralProgrammed Developers to Enrage Us Pin
Vasudevan Deepak Kumar12-Jul-07 22:47
Vasudevan Deepak Kumar12-Jul-07 22:47 
JokeRe: Programmed Developers to Enrage Us Pin
Mike Dimmick12-Jul-07 23:37
Mike Dimmick12-Jul-07 23:37 
GeneralRe: Programmed Developers to Enrage Us Pin
WillemM13-Jul-07 6:20
WillemM13-Jul-07 6:20 
GeneralRe: Programmed Developers to Enrage Us Pin
Dan Neely13-Jul-07 2:20
Dan Neely13-Jul-07 2:20 
GeneralRe: Programmed Developers to Enrage Us Pin
Vasudevan Deepak Kumar13-Jul-07 7:01
Vasudevan Deepak Kumar13-Jul-07 7:01 
GeneralRe: Programmed Developers to Enrage Us Pin
Dan Neely13-Jul-07 12:25
Dan Neely13-Jul-07 12:25 
GeneralRe: Programmed Developers to Enrage Us Pin
Vasudevan Deepak Kumar13-Jul-07 22:46
Vasudevan Deepak Kumar13-Jul-07 22:46 
GeneralRe: Programmed Developers to Enrage Us Pin
Dan Neely14-Jul-07 3:11
Dan Neely14-Jul-07 3:11 
AnswerRe: Programmed Developers to Enrage Us Pin
pbraun20-Jul-07 9:31
pbraun20-Jul-07 9:31 
GeneralRe: Programmed Developers to Enrage Us Pin
jcdevnet13-Jul-07 4:26
jcdevnet13-Jul-07 4:26 
GeneralRe: Programmed Developers to Enrage Us Pin
PhilDanger13-Jul-07 4:32
PhilDanger13-Jul-07 4:32 
GeneralRe: Programmed Developers to Enrage Us Pin
jcdevnet13-Jul-07 4:39
jcdevnet13-Jul-07 4:39 
GeneralRe: Programmed Developers to Enrage Us Pin
Vasudevan Deepak Kumar13-Jul-07 7:09
Vasudevan Deepak Kumar13-Jul-07 7:09 
JokeRe: Programmed Developers to Enrage Us Pin
MidwestLimey13-Jul-07 4:40
professionalMidwestLimey13-Jul-07 4:40 
GeneralRe: Programmed Developers to Enrage Us Pin
WillemM13-Jul-07 6:21
WillemM13-Jul-07 6:21 

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.