Who needs it anyway?

Have you ever left comments in your code like:

# TODO
# Add something...
# Remove something...

I was always wondering what to do with them. But thats what I found previuos developers on the project were doing and I just continued. I took is a way to document my technical debt with the good intention of repaying it some day.

Find them all

Today I saw an awesome way of coming back to all my TODOs while reading Clean Ruby by Jim Gay.

Just run

rake notes

and you will get a nice list of your TODOs broken down by files with exact locations. This is how it looks like:

app/models/ability.rb:
  * [ 46] [TODO] Reactivate the Operator role by fixing the following, broken permissions

app/models/asset.rb:
  * [ 87] [TODO] Should take computed energy target but there is none - why?
  * [169] [TODO] 30/28 day months?

app/models/bid.rb:
  * [183] [TODO] Refactor auction acceptance to be between 0 and 1

lib/daily_schedule_generator.rb:
  * [ 10] [TODO] remove 'if' when sending to all pools

Outlook

I don’t know if I will ever use it, but will try to find a procedure for at least reviewing it keeping an eye on them.