The Code Is the To-Do List
executeprogram.com
The Code Is the To-Do List
1–10 of 80 posts
Re: The Code Is the To-Do List
#2Re: The Code Is the To-Do List
#3Re: The Code Is the To-Do List
#4How could such a linter rule be enforced with python? does such a linter rule exist here, too?
When I was at Google as a new grad, I used to put comments with the wrong number of slashes for my internal todos, which would cause the regular linter to pick it up before review. You can piggyback on any such linter rule very easily.
Re: The Code Is the To-Do List
#5Re: The Code Is the To-Do List
#6 // todo 2022-06-09 something
^ on that date, it'd fail the linter, and print the comment. Every TODO needed a date.Got a failure and need to get past it for now? No problem: bump the date for a week or something. Now at least two people are aware that it exists (author+reviewer)... and one is in the git history for that line. Makes it rather easy to trace back who wrote a TODO / who put it off / etc. Though we fairly quickly started adding usernames to the comments for who-to-contact.
Sometimes they're just stuff to do "soon", sometimes they're no longer necessary, there are lot of reasons to delay or delete todos. But oh boy did it work. We resolved or removed about 90% of them in 2 months, and the remaining ones quickly got tasks attached and had bigger plans built around them.
Re: The Code Is the To-Do List
#7This fits my workflow because
1) Github and pull requests
2) our normal commit messages start with an emoji (:+1: or :wrench:)
3) there's rarely more than 10 commits per PR so you can't miss it
Re: The Code Is the To-Do List
#8How could such a linter rule be enforced with python? does such a linter rule exist here, too?
This technique is pretty trivial, and thus very generalizable. When I was at Google as a new grad, I used to put comments with the wrong number of slashes for my internal todos, which would cause the regular linter to pick it up before review. You can piggyback on any such linter rule very easily.