35

What if I told you..

..the //TODO comment you just added to your code will never get done?

Comments
  • 5
    I wonder what's the oldest todo comment in an active project
  • 7
    That's why it's a guilty pleasure.

    I tend to add them as an "I know someone will want a thing but it's not really needed right now, so this makes the code review faster"
  • 4
    You are lying! LYING!!
    *crawls into a corner and cries*
  • 2
    For vs code, I use the Error lens plugin which highlights/lists TODOs inline in the editor, as it would do for errors and warnings..which is good enough to trigger one's OCD and make them go back and fix those TODOs or just delete them before proceeding further.
  • 1
    @cygnus try Comment Anchors for vscode - different styles for multiple keywords and creates a list/overview for the codebase too
  • 4
    add ci/cd step, that lets the build fail, when //ToDo comments are found

    The resulting chaos will be hilarious
  • 2
    Meanwhile, some random manager is telling dev to make a pipeline that cuts out TODO comments "because they are uncool".

    I'm afraid it doesn't come as a surprise to me after several similar stories I saw here.
  • 0
    often i don't look at them.
  • 5
    Some will be removed in the future. Some will actually be implemented. And some will just tell future me or someone else that the bug or feature is known but wasn't deemed important enough to do back then.

    Also there are the eternal todos that are basically comments about regular or irregular manual maintainance tasks (mostly updating legislation-defined parameters). They are todos, because you have to do them and they aren't finally done yet (and never will be until the software is abandoned). These are pretty important and when they get neglected, someone will come to serach for why the software isn't working as expected. The todos will tell him what to do to make it work again.
  • 2
    Delete this rant. I beg you.
  • 0
    Nice too meet you
  • 0
    That's useful
  • 0
    We all know they’ll never get done, don’t we?
  • 2
    @thebiochemic oooh the chaos. I cherish the idea. Tho honestly, that would probably just lead to removing the comments and never doing what they are reminders of…
  • 2
    when i started working on my masters project (based on an open source project) i looked through the code and thought "lets just add some TODOs for things that i might need to implement later, so i can find them again"

    after adding multiple TODOs for me i realised that there where already over 12k TODO in this project
  • 2
    Git blame helps here as it instantly reveals its age. Some todos are indeed like that.
    Others do get fixed naturally.

    I once worked in a team that had a rule: every todo/fixme requires a ticket and it's handle has to be added to the todo comment.
    That organized it well but a bit overkill on todos that where temporary during the development of a new feature.
  • 0
    well at least you're admitting more could be done, in case you ever happen to be bored and visiting the same code again :P
Add Comment