More XP
The Extreme Programming FAQ has a good answer for “[how] can you know one approach is simpler than another?” if you’re looking for a more concrete answer than you might find elsewhere. Further in the realm of concrete rules is OnlyWearOneOfFourHats, which tells you to separate adding new functionality from refactoring, and modifying interfaces from modifying implementations (in summary). On a similar topic, there’s some discussion about WhenToStopRefactoring. Then there’s CodeSmell.
SoloXpProjects is a simple implementation of an idea I had with low participation. Maybe I should get in on this?
Harsh words for RefactoringWithRelationalDatabases. I think Philip Greenspun has some things to say about this, like keeping SQL scripts in CVS, etc. It does strike me as a sticky topic, though.
SimplestThingReplyFromRonJeffries has Ron Jeffries (I think) saying “reuse external to our project is not an project value.” Also, “reuse rarely happens.” Doesn’t this seem kind of pessimistic? I understand that he’s doing what’s best for the customer, but shouldn’t we sometimes look ahead and say “you know, I’ve written this class ten times; maybe I should stop writing it.” This should hold with the idea of “don’t repeat yourself” from The Pragmatic Programmer and “once and only once” from XP. IMHO, of course. I do, of course, understand that this goes against XP’s “you aren’t going to need it” and “do the simplest thing that could possibly work.” SimplestThingReplyFromJamesCollins is a little more kind to reuse.
More in the vein of KISS (keep it simple stupid) is SitOnOneCard which suggests you not work on more than one XP engineering task at a time — even if the two tasks are similar. I think I like this as well; I don’t trust myself enough to go and combine two tasks.
YouAreGonnaNeedIt lays out some nice contrary points to YouArentGonnaNeedIt. Much of what he says, particularly WRT frameworks, rings true to me. Ron Jeffries’ comments about not having a customer are interesting as well. Here is some good discussion about when YAGNI fails, and still more YagniExceptions. Supposedly “once and only once” balances YAGNI. This one also has some information along the lines of the “do the simplest thing possible” from the XP FAQ (above). Thinking about some of the examples (YAGNI and Y2K too) it occurs to me that there should probably be some user stories for the lifetime of the system and how it is to be deployed and used.
For example, of the exceptions to YAGNI had to do with some versioning concerns in a Macromedia application (Shockwave, I think). If there were a user story that specified that versions in the wild were not to be revoked but newer versions need to remain compatible or some such, this would have led to some engineering tasks — and possibly would have been done very early on. I think this was even mentioned as a possible route to avoid this. Same for Y2K: if it is known that a system is going to need to remain usable well into the future, things like this probably should be accounted for, and tests generated to check for compliance. With Y2K, of course, many people just never thought of this.
OneResponsibilityRule gives some good hard-and-fast sort of tips for deciding when your classes are overburdened… and in need of some refactoring! (How exciting to use that in a sentence. I feel silly.)
A few quick links to some Java refactoring software, that I finally understand the need for:
http://transmogrify.sourceforge.net/, though I can’t say this looks real useful.
http://www.eclipse.org, which I think is actually a whole IDE. Or something. Can I see a screenshot of… whatever it really is, please? Ah, http://c2.com/cgi/wiki?EclipseIde has some more information.
This CRC card example would be useful, perhaps… if I could figure out what a PIA is, and what the coffee maker represents (the entire machine? what are designing, again? a computer interface to a coffee machine?). Ah! In fact, this is part of a whole XP example where you make a coffee maker. Initially I didn’t bother with the code examples, but then I realized that there was a lot of coverage for refactoring, which I think I need help with, so I went back to check these out.
A good page on iteration planning. The library card catalog example is one of my favorites too. It reminds me to make user stories for things like performance and platforms, though the latter of those two gives me trouble when it comes time to break that in to tasks. FourVariables, while not applicable to my current project, is nonetheless interesting, chiefly in thinking about commercial projects I’ve worked on in the past.
Mozilla actually crashed so I lost some of the stuff I was going to read. For example, the stuff on picking a system metaphor. I caught up on the obvious sources for this one, but I’m not sure if I might not want to use the “naive metaphor” for what I’m doing. Maybe radio or some such?
I’ve been working on this page all day, which of course means I’ve been reading all day. I don’t think a good night’s sleep to let this sink in is what I need; I think I need to have another eight hours of alertness to sit down and apply it. Still, I foresee bed coming soon.
More (opt-in) spam flowing out one of our mail servers. It hasn’t locked up yet, even though I double the concurrent outbound connection limit. We’ll see if it’s still alive come tomorrow morning. Something like >19,000 messages still in the queue I think.