Click here to Skip to main content
15,886,919 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: Cool bitwise trick page PinPopular
harold aptroot28-Dec-11 1:35
harold aptroot28-Dec-11 1:35 
GeneralRe: Cool bitwise trick page Pin
Rajesh Anuhya30-Dec-11 2:10
professionalRajesh Anuhya30-Dec-11 2:10 
GeneralTest-driven voodoo magic PinPopular
jesarg27-Dec-11 7:09
jesarg27-Dec-11 7:09 
JokeRe: Test-driven voodoo magic Pin
Paladin200027-Dec-11 7:55
Paladin200027-Dec-11 7:55 
GeneralRe: Test-driven voodoo magic Pin
Slacker00727-Dec-11 8:02
professionalSlacker00727-Dec-11 8:02 
GeneralRe: Test-driven voodoo magic PinPopular
OriginalGriff27-Dec-11 8:28
mveOriginalGriff27-Dec-11 8:28 
GeneralRe: Test-driven voodoo magic Pin
Gary R. Wheeler27-Dec-11 9:44
Gary R. Wheeler27-Dec-11 9:44 
GeneralRe: Test-driven voodoo magic PinPopular
CDP180228-Dec-11 11:57
CDP180228-Dec-11 11:57 
I only know a lazy cargo cult Java team. They turn everything into a hollow useless ritual that's not worth the work you put into it. They also wanted me to write unit tests. The problem was that they were far too agile to provide any specifications about what might be correct and what is not correct. To be precise, they were not able to come up with any specifications at all.

So I was creative and tested everything that might possibly go wrong that came to my mind. The result was that practically all the tests failed, once I checked them in. Oh horror! The build ritual failed! And how did they 'fix' it? No, not by looking at the tests and sorting out where the tests might be too strict or where they might be pointing out some issues. They simply commented out all the code in the tests and checked them in again.

Now the build ritual does not fail anymore and the unit test ritual also has been sucessfully completed. Bravo! Now you can go back to sleep and hold up your build reports with 100% sucessful unit tests when somebody asks.
And from the clouds a mighty voice spoke:
"Smile and be happy, for it could come worse!"

And I smiled and was happy
And it came worse.



GeneralRe: Test-driven voodoo magic Pin
Bernhard Hiller28-Dec-11 20:20
Bernhard Hiller28-Dec-11 20:20 
JokeRe: Test-driven voodoo magic Pin
ii_noname_ii28-Dec-11 23:16
ii_noname_ii28-Dec-11 23:16 
GeneralRe: Test-driven voodoo magic Pin
ekolis29-Dec-11 11:50
ekolis29-Dec-11 11:50 
GeneralRe: Test-driven voodoo magic Pin
CDP18021-Jan-12 5:31
CDP18021-Jan-12 5:31 
GeneralRe: Test-driven voodoo magic Pin
BillW336-Jan-12 4:34
professionalBillW336-Jan-12 4:34 
GeneralRe: Test-driven voodoo magic Pin
Julien Villers2-Jan-12 5:50
professionalJulien Villers2-Jan-12 5:50 
GeneralRe: Test-driven voodoo magic Pin
prasun.r23-Jan-12 2:39
prasun.r23-Jan-12 2:39 
GeneralJava JDK Bug Pin
TorstenH.20-Dec-11 21:04
TorstenH.20-Dec-11 21:04 
GeneralRe: Java JDK Bug Pin
Lutosław25-Dec-11 23:19
Lutosław25-Dec-11 23:19 
GeneralWhat a gem. Pin
AaronM_NZ18-Dec-11 19:45
AaronM_NZ18-Dec-11 19:45 
GeneralRe: What a gem. Pin
smcnulty200018-Dec-11 20:38
smcnulty200018-Dec-11 20:38 
GeneralRe: What a gem. Pin
Mark AJA21-Dec-11 8:44
Mark AJA21-Dec-11 8:44 
GeneralRe: What a gem. Pin
smcnulty200021-Dec-11 14:00
smcnulty200021-Dec-11 14:00 
GeneralRe: What a gem. PinPopular
Paladin200022-Dec-11 10:07
Paladin200022-Dec-11 10:07 
GeneralRe: What a gem. Pin
Mark AJA23-Dec-11 1:30
Mark AJA23-Dec-11 1:30 
GeneralRe: What a gem. Pin
Paladin200027-Dec-11 3:52
Paladin200027-Dec-11 3:52 
GeneralRe: What a gem. Pin
Mark AJA27-Dec-11 8:40
Mark AJA27-Dec-11 8:40 

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.