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

Re: PG: Hackers and Painters



Paul Graham writes:
>
> I've heard of this agile programming thing.  (Surely "agile" isn't
> the best word, btw; surely one hacker is at least more *agile* than
> two.)  There may well be cases where several people can work on
> code.  I don't think I could, though.  It's fine to have code
> reviews.  Such code reviews could even take the form of presenting
> someone with a rewritten version for them to adopt if they
> chose. But I don't think I could stand more than that.  Nor would I
> presume to do more than that to code someone else owned.
> 
> Maybe I'm just an old crab though.  Does anyone on LL1 have
> any opinions about this?

I have tried XP, and I found it tremendously liberating. It's like
coming up for air after a long dive underwater. I think it feels like
this because it makes fixing API misdesign bugs much easier -- the
cases when the existing API does not expose the correct (simplest,
most beautiful) interface.

IMO, having a clean API is one of the most important features for
having an elegant program. A bad API can make even simple operations
opaque and kludgy, and a good one can make even complex operations
lucid and clear. But I am simply not a good enough programmer to get
an API right on the first try. Fred Brooks wanted to build one to
throw away. Me, I need to throw two and sometimes three away before I
can really produce an interface I am proud of.

With strong code ownership, fixing this kind of bug is painful,
because I'd have to get the permission of all my module's clients'
owners to change it. But in an XP setting, I can create the new,
better interface and then fix all the uses of the API. Of course, it's
only courteous to give the other programmers the same freedom, and now
you have weak code ownership.

-- 
Neel Krishnaswami
neelk@alum.mit.edu