Tuesday, July 31, 2007

In a recent blog post, Larry O'Brien, points out that we need more varied types of tags in our code than the overworked TODO. He suggests one that enables you to mark code intended for a future feature (despite YAGNI). Which I understand, but would strongly tend to avoid. I think the XP folks have it right in hewing closely to YAGNI.

But Larry's larger theme comes up for me as well. There are some useful tags I can think of. The most urgent to me is one that you can put on suspected cruft. Something like: CRUFT. This would suggest that maintenance needs to be done to check if this code is in use anywhere, and if not then to delete it. Not just "in use" in the technical sense, but in the sense of doing anything that's still needed.

I've also been hankering for a more graded version of TODO. Such as TODO-NOW and then plain TODO. The latter would mean "todo sometime."

IntelliJ (and presumably other IDEs) enable you to do create these custom tags and have them recognized/processed by the IDE, which is a really helpful.

Jeff: This post got me experimenting. So no definitive answer, yet. But I like a new tag which I call CURR (for "current"). I tag things I gotta change as a result of what I'm doing right now. Then, when I get the current feature implemented and tested, I go back to all my CURR tags and finish the clean up. This makes it easier to take a break and pick up where I left off.(Got any CURR tags? Then that's what I do first.)

I will post more on this topic, if I find new tags that make it past a few months' use.