[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PG: Hackers and Painters
I think that an XP advocate would say that's why you have coding standards, so that everyone can agree what code should look like. Kent Beck's book explicitly says that there is no code ownership in an XP environment, but that you have to have continuous integration, continuous testing, pair programming, and adherence to coding standards to make that work. Pair programming is something like an "extreme code review", in that there's always another pair of eyes looking at code. Of course, getting agreement on the coding standards is always the difficult part. And you have to be careful that Pair Programming doesn't devolve into mentoring, or dictation, or "road crew syndrome" (one guy working, the rest goofing off).
As far as PG's original question, the book "Pragmatic Programmer" talks about the "broken window theory" which basically says that neglect encourages decay, i.e. code that's got known problems tends to recieve shoddy treatment from programmers, thereby creating more problems. I've definitely observed this on some projects. Prag Prog doesn't offer a silver bullet, just the admonition to "fix broken windows", i.e. don't let known problems go unfixed. But again, that's difficult if you can't agree on whether a window's broken or not.
-----Original Message-----
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.
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.
- Russ