Click here to Skip to main content
15,886,873 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: Gem code Pin
zenwalker198528-Dec-11 15:02
zenwalker198528-Dec-11 15:02 
GeneralRe: Gem code Pin
ekolis29-Dec-11 11:52
ekolis29-Dec-11 11:52 
GeneralRe: Gem code Pin
zenwalker198529-Dec-11 18:37
zenwalker198529-Dec-11 18:37 
GeneralRe: Gem code Pin
krumia14-Feb-12 19:20
krumia14-Feb-12 19:20 
GeneralCool bitwise trick page PinPopular
Lutosław28-Dec-11 0:46
Lutosław28-Dec-11 0:46 
GeneralRe: Cool bitwise trick page Pin
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 
I recently started working at a large corporation that transitioned from a waterfall to an agile approach to software development about 2 years ago. As a part of the transition, developers who never fully understood test-driven development decided to start writing unit tests for their code to make it feel more agile.

The results of their efforts are hundreds of unit tests with no clear purpose, goal, naming conventions, or coding standards. While trying to wrap my head around what possible benefit the unit tests offer, the best thing I can say about them is that they prove that random chunks of production code in private and public methods do the same thing as the unit tests which duplicate their logic whenever the constants specified in the unit tests match the values that haven't changed in the DEV database that they never mocked and the database connections and web services don't time out on them.

I guess, in some abstract sense, running these unit tests could provide some benefit to the system, but we could improve the benefits by ignoring the unit tests and hiring a witch doctor to stand next to the source control server, sense the code's ethereal energy, and tell us if the code feels cursed or not.

Know any witch doctors looking for employment?
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 Pin
CDP180228-Dec-11 11:57
CDP180228-Dec-11 11:57 
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 

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.