Day 2 - Nuke TODO comments

I had just one which was not relevant anymore so deleted it.

Lucky me, I didn’t find many TODO to do in the project I’m working on.
There’s 2 TODO but I create it myself friday to work on it and I could find 5 pending tests to write !
I’ve started to work on my “personal TODO” and I will go for the pending tests after !

lucky you :slight_smile:

In my project we have like 131 todo’s

Feels really weird to create issues for todo’s :slight_smile:

Although it does makes sense

1 Like

Well I think it’s mostly because the team used to create card and issues for the TODO until now… Or they’re trying to !

It is actually good practise come to think of it

1 Like

The guide does not mention this shortcut, but it actually is there since the times it was a rake task: you could check for todos with rails notes:todo or rake notes:todo

We actually only had, 16 todo’s across our whole codebase.

Great job team

Following Day 2 task I removed old TODOs from work project and replaced it with actual fix :slight_smile:

I looked through a large number of my code bases and wasn’t actually able to find any todos. I was very surprised about this because I’ve inherited projects over the years which are pretty ick.

Ouff, forgot to post an update here yesterday, however, I did manage to nuke a very old TODO from our production application yesterday.

Great idea of moving the TODO’s into our tracking application :+1:

Deleted few outdated comments. Found a file as well which was not getting used at all which had a TODO comment so deleted it as well :slight_smile:

Tracked down a sneaky one, it was clearly a TODO masquerading as a comment. Something to the effect of

# temporary hack, to be removed

It was created back in Jan 22, 2019.

Nuked 9 TODO comments. They were all 9+ months old

Late to this, but the repo I’ve been using for the CQC challenge (my dotfiles repo on Github only had a single TODO, from a script I didn’t write, so nothing for me to do here.

My oldest one, so far, was 2 years old.
I was amazed at how much effort it is to delete a TODO comment. I only managed about three in 20 minutes, because:

  • I had to hunt through our issue tracker to see if it was already there before adding a duplicate
  • The issue was very sparsely documented in the comment and takes a long time to figure out what I clearly had in my head when I wrote it. A full description on a issue card would have been so much quicker.
  • FOMO: it was agonising to decide if this was never going to happen / or needed anyway

Wayyyy better to never allow them in from now on. Thanks!

2 Likes

This turned out to be more difficult than I first thought.
I found plenty of TODO comments, but I’m new at this company/code base so it was really difficult to understand what the TODO comments are in place for (which again speaks probably for just deleting them. The person creating many of the ones I found doesnt even work here anymore)
And this early in the morning, not many colleagues around to give answers :wink:

The oldest which I inspected for date was from March 2019.

2 Likes

Nice challenge today. I put a few TODOs in my code just last week when I was pushing through a spike, and took an hour this morning to go ahead and properly set up logging and error handling. Two tasks crossed of the list :slight_smile:

2 Likes

This was an interesting one. I found about 70 TODO’s excluding a few vendor JS files that are in our codebase.

The oldest one goes back to March 2014, which looks to be the initial commit for the repo :face_vomiting: :man_facepalming: I only managed to remove a few of them as I inherited this codebase 3 months ago and I spent some of my 20 minutes creating an issue template specifically for this. Sharing it below!

This Issue is removing a TODO from the codebase as part of the [CQC challenge](https://tuple.app/code-quality-challenge)

## Raw TODO

> File:
> Line:

## Work to be done

* Action items here...

### Checklist

- [ ] Will this affect other parts of the application?
- [ ] Check for duplicate tickets
- [ ] Assign to relevant epic

/label ~to-be-triaged
3 Likes

Good exercise.

Had a fun one where there was the todo to implement a thing… two lines later the thing was implemented, but the todo hadn’t been removed. A few less lines in the codebase now.

1 Like