Click here to Skip to main content
15,897,334 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: top this Pin
imagiro5-Aug-10 1:05
imagiro5-Aug-10 1:05 
GeneralRe: top this Pin
CDP18025-Aug-10 1:11
CDP18025-Aug-10 1:11 
GeneralRe: top this Pin
Michael Eber10-Aug-10 9:09
Michael Eber10-Aug-10 9:09 
JokeRe: top this Pin
Yusuf4-Aug-10 13:31
Yusuf4-Aug-10 13:31 
GeneralRe: top this Pin
CDP18024-Aug-10 21:20
CDP18024-Aug-10 21:20 
GeneralRe: top this Pin
mr_lasseter8-Aug-10 3:55
mr_lasseter8-Aug-10 3:55 
GeneralRe: top this Pin
CDP18028-Aug-10 20:56
CDP18028-Aug-10 20:56 
GeneralRe: top this Pin
Richard A. Dalton12-Aug-10 0:26
Richard A. Dalton12-Aug-10 0:26 
I read that hand had to double check if I wrote it last night in my sleep.

Then I saw that your "Uberclass" had only 7000 lines of code.

Pffft.

I'm dealing with one class just like yours but with 14000 LOC.

The entire App is heading for 70,000 LOC and from what I can see it could be rewritten in less than 10,000 LOC.

As for why some people can "look good" writing this stuff. The people who pay them have no idea what the code looks like and what constitutes good code.

You can fix a bug and handle a new special case in 10 minutes by copying and pasting 500 lines of code and sticking them in the ELSE part of a new IF statement, perhaps nested inside 5 other levels of IF Statements.

Or you can spend half a day trying to refactor the code so that this new special case doesn't add more twisted logic and code bloat.

10 mins vs Half a day or more. Who do you think the Project Manager loves?

Granted the bloated twisted version spends forever in testing and goes live full of bugs, but most project managers seem to think that's how software works, which is why they love guys who can fix bugs in 10 minutes.
GeneralRe: top this Pin
CDP180212-Aug-10 0:35
CDP180212-Aug-10 0:35 
GeneralRe: top this Pin
Richard A. Dalton12-Aug-10 1:03
Richard A. Dalton12-Aug-10 1:03 
GeneralRe: top this Pin
CDP180212-Aug-10 1:36
CDP180212-Aug-10 1:36 
GeneralRe: top this Pin
Richard A. Dalton12-Aug-10 5:16
Richard A. Dalton12-Aug-10 5:16 
GeneralRe: top this Pin
Yusuf4-Aug-10 13:32
Yusuf4-Aug-10 13:32 
GeneralRe: top this Pin
bleedingfingers4-Aug-10 21:41
bleedingfingers4-Aug-10 21:41 
GeneralRe: top this Pin
devvvy5-Aug-10 15:57
devvvy5-Aug-10 15:57 
GeneralRe: top this Pin
sameerazazi877-Aug-10 1:21
sameerazazi877-Aug-10 1:21 
GeneralRe: top this Pin
Bigdeak12-Aug-10 21:40
Bigdeak12-Aug-10 21:40 
GeneralHow to read a file completely? PinPopular
Bernhard Hiller29-Jul-10 2:22
Bernhard Hiller29-Jul-10 2:22 
GeneralRe: How to read a file completely? Pin
Single Step Debugger29-Jul-10 3:35
Single Step Debugger29-Jul-10 3:35 
GeneralRe: How to read a file completely? Pin
Phil Martin29-Jul-10 13:15
professionalPhil Martin29-Jul-10 13:15 
GeneralRe: How to read a file completely? Pin
David Skelly29-Jul-10 22:34
David Skelly29-Jul-10 22:34 
GeneralRe: How to read a file completely? Pin
Luc Pattyn30-Jul-10 0:02
sitebuilderLuc Pattyn30-Jul-10 0:02 
GeneralRe: How to read a file completely? Pin
David Skelly30-Jul-10 2:29
David Skelly30-Jul-10 2:29 
GeneralRe: How to read a file completely? Pin
Luc Pattyn30-Jul-10 2:53
sitebuilderLuc Pattyn30-Jul-10 2:53 
GeneralRe: How to read a file completely? Pin
David Skelly30-Jul-10 4:18
David Skelly30-Jul-10 4:18 

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.