On Jan 21, 2008 11:13 AM, Dave Smith <[EMAIL PROTECTED]> wrote:

> I respectfully disagree. If your code is difficult to read and maintain,
> you may have solved one problem, but you've created a new one. And it
> will cost you and your company in the medium and long term. It has
> nothing to do with micro-managing bosses or school assignments (in fact,
> in school I never had anyone review my code for readability). I hope I'm
> not arguing out of place here. I'm talking about readability, and not so
> much performance or efficiency.
>
> I've had to maintain people's sloppy code in the past, and it is very
> expensive, both in terms of the time I spend on it, and the frustration
> levels I reach trying to understand it and modify it without introducing
> new bugs. I've also maintained well-written code, and the difference is
> approximately one order of magnitude in effort. That is to say, it is 10
> times more expensive in my experience to fix bugs and add features in
> code that is sloppily written and poorly documented.
>
> In my experience, this may not be as important on small projects, but on
> medium-sized and large projects, it is crucial to the success of the
> project.
>
> This discussion reminds me of Joel Spolsky's article where he describes
> a good programmer as "smart and gets things done" [1]. According to
> Joel, people who "get things done" (ie, solve the problem) but aren't
> "smart" (ie, write crappy code) tend to solve problems in the short
> term, but they create huge problems down the road. I'm not suggesting
> that you're one of those people. Based on your posts in the past, I'm
> confident you are both smart and get things done, so hopefully no
> offense is taken.
>
Dave,
No offense taken.  I've been called much worse by friends and everything
turned out fine.

I wasn't really talking about sloppy code either.  I would hope we can all
raise our levels of expertise to a point where we can give ourselves the
"unsloppy" certification.  I agree it's a nightmare to work in code that has
not been properly maintained.  I am currently working on a C++ project with
code that is 15 years old.  It has been "maintained" by some 20 programmers
over the years each with his/her own style and way of doing things.
Obviously doing anything in this code is very expensive.  Actually the point
I was trying to make was that sometimes we get so worried about what others
will think of our code that we never really get anything done.  Also there
is the time thing.  Sometimes we just don't have time to make everything
just right.  One could argue that we have to take the time now or we will
pay down the road.  I agree with this and hold to it as much as possible.
However, when someone is dangling a check in front of us and we are under
pressure to pay bills or make a payroll or whatever, it's easy to throw
something together that is neither elegant nor efficient with the firm
resolution to return at a later date and make things right.  Well, most of
the time no one ever gets back to it.  As evidence look at the hordes of
sites with code that make us all cringe.  At this point in the post I am
probably arguing just to be arguing but I hope I have been able to get my
point across.  If we can get things done and do it with flare, then I'm sure
Joel would be proud.  If we can't, hopefully we can improve on the next
project.

-- 
Scott Hill

Food for thought:
An eagle may soar but a weasel will never get sucked into a jet engine.
A closed mouth gathers no foot.
Never squat with your spurs on.

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to