Search code examples
coding-styleconventiontodo

Where does the TODO convention come from?


I suspect this question has been asked before, but it's not easy to Google for.

I am a fairly new coder and I see a lot of code, in a lot of different languages, with comments beginning "TODO".

Questions:

  • Is there a practical reason why people write TODO in all these different languages, or is it merely a convention?
  • If the latter, where did the convention come from?

I can see why it's useful to be able to grep for TODO, I'm just curious about the history behind it.


Solution

  • Programming is a world-wide activity; conventions to help smooth the process of working with people who are not native speakers of each other's languages are worth their weight in gold. TODO, XXX and FIXME are often highlighted by IDEs, which provides an excellent incentive to stick with these options.

    • XXX suggests a danger or hazard that maintenance programmers must be aware of;
    • FIXME insinuates that something is wrong with some implentation which needs to be changes;
    • TODO explains shortcomings that would be nice to address.