[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PG: Hackers and Painters

While on this topic, I really hate, loathe, despise having revision control
information in a file.  I have seen *so* much code where the CVS or RCS log
messages took up 50% or more of the entire file that it makes me want to
cry when I see that.  Don't get me wrong; I like CVS and I use it.  But
there is no need to have the information in the file; "cvs log" will
retrieve it for you.


P.S. I've heard of some great "sad code" examples.  One (I think I read it
in Dr. Dobbs Journal) was a situation where a company required all their
employees to write test scripts for their code.  One employee wrote
something like this:

    printf("beginning tests of code...\n");
    printf("all tests passed!\n");

I-am-not-making-this-up-ly y'rs,


> Date: Wed, 14 May 2003 16:11:06 -0400
> From: Russ Ross <russ@russross.com>
> Okay, I may have exaggerated a bit.  The pair programming idea
> actually intrigues me for some kinds of code (as you indicate--the
> really gritty stuff).  What I really don't like is when I get a
> drive-by bug fix that makes something like:
> for(int i = 0; foo(i); i++)
> look more like:
> for(int i = 0; /* 5/14/03 RGR: hmm.. i think this mite be the right plaece to do this but I'm not really sure */ foo(bar(i)) /* end of change */; i++)
> This is based loosely on a real example.  Besides the typos and line
> wrap, the presence of the comment is annoying (put a change record
> in the version control system marking the change, and contact me
> before making it to clear up the uncertainty).
> Leaving that as it is will distract me every time I open the file.
> The visual flow of the code is disrupted and for some reason that
> really bothers me in code that I've written carefully.
> To return to the article that prompted all this, some people write
> code that is beautiful and artfully subtle (some of the code I've
> seen from Ken Shan--a participant on this list--qualifies).  I don't
> claim to be at that level, but it still bothers me when someone
> leans over my shoulder and splatters paint all over a canvas that
> I'm still working on.
> - Russ
> On Wed, May 14, 2003 at 03:33:55PM -0400, Zachery Bir wrote:
> > On Wednesday, May 14, 2003, at 02:40 PM, Russ Ross wrote:
> > 
> > >I hate it when other people touch my code.  It seems like they
> > >always get it wrong.  I always have to go and clean it up again
> > >before I can stand to look at it.  Even if I'm not making any
> > >changes, I've been known on more than one occasion to check out a
> > >file that someone has modified, fix all the formatting, rewrite
> > >all the comments, restructure the control flow, and check it
> > >back in.
> > >
> > >By "fix" I mean change it to meet my normal style, not to correct
> > >some actual bug.  Even if they get the formatting right (which is
> > >surprisingly rare) I'm not content until it looks and feels exactly
> > >like my code, both at a casual glance and on a careful read-through.
> > 
> > So, by fix, you mean, "not really fix"?
> > 
> > >I agree with Paul on this one--I'm just way too crabby about my own
> > >code to cooperate at that level.  I'm like a bitter old man who
> > >doesn't think anyone can get anything right and I'm still in my 20s.
> > >I pity anyone who has to share code with me in a few years after
> > >I've really had a chance to get set in my ways.
> > 
> > Well, thank goodness you've warned us in advance :)
> > 
> > We try to embrace XP here at Zope Corp, and it works amazingly well. I 
> > haven't yet encountered any territorialist coders. I think that's 
> > because we espouse a fundamentally different philosophy towards the 
> > code: We don't own the code. Our customers do. Us Communistical Open 
> > Sourcers and all...
> > 
> > Personally, I think the lone wolf cowboy attitude needs a trip through 
> > a refactoring browser. But that's me. Perhaps it's a matter of 
> > experience. Maybe all my old-timer colleagues would really prefer for 
> > the young'ns to just get the hell out.
> > 
> > Zac
> >