Click here to Skip to main content
15,914,894 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: Unnecessary try / catch block Pin
GWB@s1c6-Mar-07 7:58
GWB@s1c6-Mar-07 7:58 
GeneralRe: Unnecessary try / catch block Pin
David Rush6-Mar-07 9:43
professionalDavid Rush6-Mar-07 9:43 
GeneralRe: Unnecessary try / catch block Pin
Brian R6-Mar-07 13:33
Brian R6-Mar-07 13:33 
GeneralUse Appropriate Development Tools Pin
Brian Leach5-Mar-07 10:16
Brian Leach5-Mar-07 10:16 
GeneralRe: Use Appropriate Development Tools Pin
Chris Losinger5-Mar-07 11:25
professionalChris Losinger5-Mar-07 11:25 
GeneralRe: Use Appropriate Development Tools [modified] Pin
PIEBALDconsult5-Mar-07 12:54
mvePIEBALDconsult5-Mar-07 12:54 
GeneralRe: Use Appropriate Development Tools Pin
Dan Neely6-Mar-07 2:18
Dan Neely6-Mar-07 2:18 
GeneralEver experienced this Pin
Rama Krishna Vavilala5-Mar-07 9:37
Rama Krishna Vavilala5-Mar-07 9:37 
In the last company I worked (about 8 years back), I was asked to fix a bug in some invoice processing module. The main code was in a single function which had about 30,000 (hyperbole, don't remember the xact no but it was enormous) lines which is a WTF in itself. It was a common practice in the whole application. When looking at the issue to solve, I also found that there was a major issue that caused the code database to rollback even when the processing was successful. Believe it or not the issue was that braces did not match properly in that 30000 lines of code. I wish I kept the original code but after struggling for about a day I finally re factored the code and separated into various functions and made it work.

It did not here. Some people working at a client's place found the issue of Rollback and notified the team leader. The team leader compared the code and thought that it was my changes that lead to this issue. I debated with him for lot of time but apparently he did not like the idea of clean code. He (who also happened to like me) had worked with the app for about 5 years and was probably not used to the clean code. Finally, the QA tests revealed that my code was the one which was working properly. However, I still had to remove all the refactorings I did to my code (mostly function extractions) and put back in that one large function.

Needless to say that I left the company in another 2 months.

GeneralRe: Ever experienced this Pin
pbraun5-Mar-07 10:00
pbraun5-Mar-07 10:00 
GeneralRe: Ever experienced this Pin
Christian Graus6-Mar-07 0:09
protectorChristian Graus6-Mar-07 0:09 
GeneralRe: Ever experienced this Pin
David Rush6-Mar-07 9:59
professionalDavid Rush6-Mar-07 9:59 
GeneralVB.NET Pin
Shog94-Mar-07 11:51
sitebuilderShog94-Mar-07 11:51 
GeneralRe: VB.NET Pin
#1234-Mar-07 12:56
#1234-Mar-07 12:56 
GeneralRe: VB.NET Pin
Shog94-Mar-07 14:24
sitebuilderShog94-Mar-07 14:24 
GeneralRe: VB.NET Pin
#1234-Mar-07 14:47
#1234-Mar-07 14:47 
GeneralRe: VB.NET Pin
Shog94-Mar-07 15:22
sitebuilderShog94-Mar-07 15:22 
GeneralRe: VB.NET Pin
Christian Graus5-Mar-07 1:13
protectorChristian Graus5-Mar-07 1:13 
GeneralRe: VB.NET Pin
Shog95-Mar-07 3:25
sitebuilderShog95-Mar-07 3:25 
GeneralRe: VB.NET Pin
Duncan Edwards Jones5-Mar-07 4:03
professionalDuncan Edwards Jones5-Mar-07 4:03 
GeneralRe: VB.NET Pin
Shog95-Mar-07 4:22
sitebuilderShog95-Mar-07 4:22 
GeneralRe: VB.NET Pin
pbraun5-Mar-07 9:26
pbraun5-Mar-07 9:26 
GeneralRe: VB.NET Pin
Sam Loveridge5-Mar-07 11:33
Sam Loveridge5-Mar-07 11:33 
GeneralRe: VB.NET Pin
GWB@s1c6-Mar-07 10:41
GWB@s1c6-Mar-07 10:41 
GeneralVB.NET -> C# ? Pin
Christian Graus3-Mar-07 23:05
protectorChristian Graus3-Mar-07 23:05 
GeneralRe: VB.NET -> C# ? Pin
Bradml3-Mar-07 23:24
Bradml3-Mar-07 23:24 

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.