Monday, May 16, 2011

Don't checkin ToDo

That's what I think, anyway.

ToDo markers generally shouldn't survive a commit.
If you commit code with ToDo markers in them, you're not done with your current, discrete piece of work yet.
Oh! The ToDo notes are for some other piece of work? OK, then I think it's best if they're entered into an issue tracker, and you delete the ToDo. Then you can check in.

Because ToDo work gets lost. How many times have you seen some ToDo marker in your code that's been there who knows how many months (years?)? Was it important? Is it still important? Is this what's been causing that weird bug?
The whole point of an issue tracking system is to make sure the work you want to get done gets done, and nothing else. If you're supposed to do it, it goes in the issue tracker. If it's just an ephemeral indicator of work to be done in this checkin, then ToDo is a perfect reminder.
The best IDEs offer a window in which you can see all your ToDo markers and go wrap them up before you check in. (Or make issues out of them)

Edit (May 17):
Intellij Idea just released v10.5. On their "What's new" page, I see they agree with me:

No comments:

Post a Comment