« Differences in behaviour between Hibernate delete queries and the old way | Main | I'm not a Hungarian Notation user »

Your code sucks because...

I rediscovered this article while doing some research. It gives an extensive list of reasons why your code sucks.

TrackBack

Listed below are links to weblogs that reference Your code sucks because...:

» Why software doesn't come cheap from Such Stuff

Software is too expensive to build cheaply...

...because most code sucks, to put it bluntly. Whether or not you agree it's definitely an interesting read. The article ...

[Read More]

Comments (2)

"have temporal duplication when the same work is done repeatedly when it doesn't have to be. "

That is more common then it sounds. Take a simple case of someone iterating through a DB resultset, populating a collection of model objects, and then the UI iterating throught the model collection to display it in a grid. It is not the system repeating "exactly" the same thing, but it is still repetition.

Of course, all the more reason for lazy loaded collections from hibernate, and keeping the session open until the UI has had its way with the model !

My very first programming job out of college I needed to start by fixing some code that was printing the footer of a report badly. I found the code, fixed the code, and ran the report. Bug still there. I was scratching my head over that one, staring at the code I'd just changed.

"Maybe that's not the only place in the code where the footer is generated," said the electrical engineer.

Took me awhile to grasp that concept, having freshly graduated from my academic world where everything is done by the book and one never cut and pastes one's code. I ended up finding 6 different instances of the exact same printFooter() method scattered throughout the source code.

Of course I never do that now. :)

Post a comment


About

This page contains a single entry from the blog posted on May 11, 2005 10:48 PM.

The previous post in this blog was Differences in behaviour between Hibernate delete queries and the old way.

The next post in this blog is I'm not a Hungarian Notation user.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.35