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.
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.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.
TODO means "to do". Something that someone will need to do. Just guessing, but could this guess be wrong?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With