I’m loving the experience reports folks are posting on the form after completing the previous exercise. It’s super motivating to me to see you having success, so please keep sharing!
Today’s exercise is short and sweet: grep your codebase for TODO comments.
When you find one, I recommend you do one of the following:
Is it out of date? Delete it.
Is it still relevant? Delete it and add it to whatever system you use to track work to be done, like GitHub Issues or Trello or Asana.
Are you unsure? Do a little research and/or track down the comment’s author and get an answer. Then do 1 or 2 :).
Why do this? Because code is a lousy place to track todos. When a todo lives in your code, it can’t be prioritized or scheduled, and tends to get forgotten.
For extra points, submit a PR that deletes all the TODO comments and include links to the newly-created issue for each one. Should make for an easy review/approval.
Worth noting: spend 20 minutes on this task and then declare victory. Success is showing up and putting in the time, not necessarily deleting every comment. If you can only delete one comment in 20 minutes, you’ve still succeeded for the day (well done!)
Finally, when you’re done, please share how old the oldest TODO comment you found.
Other common tags to grep for (highlighted by most IDEs): “FIXME” and “XXX”
Total todo’s: 204.
Oldest: 2012. (Start of the project)
Added last month: 19. (We should stop doing this…)
-#- TODO: We need a dropdown of membership details's amounts that passes the membership_level_no to the backend
= f.hidden_field :membership_level_no, value: "#{@membership_page.membership_details.first.membership_level_no}"
this is what is making it work for me locally. I will not commit this and let you add the radio buttons in
I am expecting the params to come in as params[:membership][:membership_level_no]
please don't f it up
On our oldest/largest project I updated 187 files, removed 350 TODOs and only had to create 5 tickets. Our code base definitely needs some sprucing up.
Oldest TODO was from 11/13/07: //TODO: This is stupid
52->30 TODOs. Some were very easy to delete. Others, needed some thought… The oldest one is from 2010.
Will continue cleaning this on my pomodoro breaks… Also added an item in our release procedure (sadly no continuous integration on this project ) to make sure all the TODOs are removed from the code and added to JIRA.
The TODOs in my company project is there since around 2 years ago but the code was remain untouched since then, until recently I’ve been assigned to revamp the project and I realized that all TODOs mentioned are basically refactoring and optimization (and there’s one with something like “remove this line from Active Record” in Rails), I’m doing refactoring now but it’s on a macro basis instead of following the TODOs
Happy to announce, that there are no TODOs in my current project, I put them in todoist
The only place I found TODO, was in place of the app, which was never used, so I deleted the whole folder
I am sure I am going to have oldest TODO item as I make living maintaining old codebase: it is still Windows XP application, written in Delphi 5 and using Paradox (database from 80s). There was no git or any other kind of versioning used for majority of codebase lifespan, but luckily they like to date the comments (like // TODO: …, 9. 1. 2018)
The oldest TODO I was able to find is from 3. 7. 1997
There are few more that I suspect might be from 95 or so as they are at module that was not touched for decades, but they are not dated, so who knows.
When FIXME and TODO is not relevant I guess? (But you still want some extra emphasis)
Only time I used it myself was in some framework code, to make diffing a bit easier when updating the framework code by hand.
37 TODO’s, FIXME’s and derivatives removed. All that’s left are present on external libraries. Was a good exercise to get rid of some outdated code (talking about an app with around 6 years of legacy code). Oldest TODO dated back to 2013, obsolete by now.
For the trickiest ones, I’ve added them to our tracker to be handled on pomodoro breaks as these gonna need some research work…
I was never a fan of using such things, and I have to agree that TODO’s and FIXME’s are where actionable items go to die…