Where does the TODO convention come from?

Richard picture Richard · Feb 29, 2012 · Viewed 13.2k times · Source

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.

Answer

sarnold picture sarnold · Feb 29, 2012

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 and XXX 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; TODO explains shortcomings that would be nice to address.