🔥 Burn Fat Fast. Discover How! 💪

​​TODOs you cannot forget! In the Bad Old Days , if you had | Opensource Findings

​​TODOs you cannot forget!

In the Bad Old Days , if you had a bit of code you knew you needed to change later, you might leave yourself a code comment to remind yourself to change it. For example, here's the real world code comment that inspired this method:

class UsersController < ApiController
# TODO: remember to delete after JS app has propagated
def show
redirect_to root_path
end
end

This was bad. The comment did nothing to remind myself or anyone else to actually delete the code. Because no one was working on this part of the system for a while, the continued existence of the redirect eventually resulted in an actual support incident (long story).

To use it, try replacing one of your TODO comments with something like this:

class UsersController < ApiController
TodoOrDie("delete after JS app has propagated", by: "2019-02-04")
def show
redirect_to root_path
end
end

Nothing will happen at all until February 4th, at which point the gem will raise an error whenever this class is loaded until someone deals with it.

#ruby: https://github.com/searls/todo_or_die
#rust: https://github.com/davidpdrsn/todo-or-die