DEV Community

Discussion on: TODO in code

Collapse
 
razbakov profile image
Aleksey Razbakov

But when it goes to 'master/mainline/trunk' there should be no such thing.

There should be no such thing as a technical dept, but it exists in each project.
And as you noticed your old project there are a lot of todos, it doesn't mean that without those
todo comments the project would have more functionality. But I think it is better to write todos and ideas of what could be done rather than nothing. The solution not to have todos is to get it done. For this there should be a scheduled time to work on refactoring.

Collapse
 
voins profile image
Alexey Voinov

There are much better and much more reliable ways to track tasks you want to do on your code, that the code itself. :)

In the code you think you're in context of the surrounding code and everyone will understand what you're trying to say. Unfortunately, that's not true. The code tend to change and so does the context. When you enter the task in some external system (jira, trello, bugzilla, you name it), you need to provide all the details of what you have in mind. And yes, you can track it.

Still, there should be no TODOs in the code, they belong elsewhere.

BTW, I never though before, that putting TODO comments in the code is actually a way to hide what's need to be done. I believe no manager will look into the source code for the tasks to plan. :)