Richard
Richard

Reputation: 32929

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:

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

Upvotes: 18

Views: 24449

Answers (4)

sarnold
sarnold

Reputation: 104080

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 implementation which needs to be changed;
  • TODO explains shortcomings that would be nice to address.

Upvotes: 17

JPI93
JPI93

Reputation: 1557

In addition to the comments about grepping, editor/IDE identification etc. I would think that a big reason as to why TODO became the standard, instead of say todo or ToDo, is simply that TODO is a big todo.

Upvotes: 2

John
John

Reputation: 23

Just a quick follow up to the original answer: This feature is mainly a reference and you'll find it in Frameworks if there are items that aren't detrimental to the code still running, but that the developers would like to address.

The nice thing about modern IDE's, for example I use JetBrains PHPStorm, they actually highlifht TODOs and place them into a Toolbar for your entire project so you can see all the TODOs for all your files differentiated by their directory and file name.

Anyway, just thought this may add further light as to why you may see it throughout code.

Upvotes: 1

Jarekczek
Jarekczek

Reputation: 7876

TODO means "to do". Something that someone will need to do. Just guessing, but could this guess be wrong?

Upvotes: 5

Related Questions