I'm doing the same. When there is something "to-do" in my code, I write //TODO .... But I'm curious to know when this started and if there is a reason for writing "to-dos" in all capital letters?

  • 20
    Because we really MEAN IT (we just never actually get around to it) – Anthony Pegram Dec 23 '11 at 23:16
  • 3
    so editors can mark them and let you search through them (eclipse's task list for example) – ratchet freak Dec 24 '11 at 0:54
  • 6
    Since you couldn't actually make text bold inside the code you needed some way to make important things stand out. Hence... – Karlson Dec 24 '11 at 3:44
  • 4
    Why does it matter? – Rook Dec 24 '11 at 3:59
  • 3
    I write //todo:... – BЈовић Dec 24 '11 at 13:18

Also, it's great to have a way to easily search for code sections you glossed over and want to get back to. You can do a case-sensitive search for "TODO" to immediately find what you skipped before.

"todo" (lower-case) could potentially be part of a larger word/function/variable, but "TODO" (upper-case) is probably not going to be.

  • 4
    It also allows editors to highlight this. gedit does it, for instance, and it only does it for all upper-case TODO. Whatever the reason, it's enough incentive for me to write it in upper case. – user7043 Dec 23 '11 at 23:49
  • 4
    @delnan: That's a tautology. It was done to stick out, so people used it, so somebody added the syntax highlighting in vim to stand out more, so people use it to stand out. People don't use it because the editor makes it stand out they use it because it is common to do so and thus the editor makes it stand out. You can make anything stand out in vim just change the syntax highlighting appropriately it is just as easy to make todo stand out but there is little point in that as the convention is to use TODO. – Martin York Dec 25 '11 at 9:06
  • 1
    @LokiAstari: As I said, I for one spell it in capitals because more editors highlight that by default. But perhaps I'm an exception: Quite young (so I couldn't have done it before editors supported it) and (sadly) too much of a whimp and lazy bum to adjust syntax highlighting manually. – user7043 Dec 25 '11 at 9:43
  • Also nice for the poor guy who needs to clean up after you, and for anyone who needs to look over your code before it's complete. They can see at a glance what's not yet done because of this convention. – sq33G Dec 25 '11 at 12:25
  • 2
    I have encountered mixed-case TODO within a variable name like filesToDownload. Of course, "whole words only" search fixes that problem. – dan04 Jan 20 '12 at 3:25

I'm curios to know when this started and if there is a reason for writing to-dos all capital?

The idea with comments like TODO and FIXME is to make them stick out. You generally don't want to ship code that has such markers in the code -- they mark things to be done before the project can be considered complete. Using ALL CAPS makes them a little easier to spot, provided you don't use ALL CAPS for a lot of other things in your code too.


Both Eclipse and Visual Studio have Task List features that automatically give you lists of comment lines that have TODO in them.

  • Visual Studio started doing the // TODO: comments when it first added the code generators for MFC boilerplate stuff. That was version 2.0, iirc. – mjfgates Dec 24 '11 at 5:05
  • at least for Visual studio this search is not case sensitive - it will pull //todo foo into the task list too – jk. Jun 11 '12 at 13:39

I just stands out and is easy to catch... nothing complicated!

  • 1
    that and its easy to find via grep or the like – Zachary K Jan 20 '12 at 7:43
  • @ZacharyK: Exactly! – Dynamic Mar 3 '12 at 20:35

It calls attention to the fact that there exists a todo.

It is important that it be obvious all the time that someone needs to come back to the code. The particulars only need to be known by the person coming back to address whatever the issue is.


If you are a vi user use:


It will get you there very fast.

  • Other editors have search features and you can just as easily search for todo. – Karlson Dec 24 '11 at 3:48
  • Except 'todo' might appear in something else like a variable name, or other comment text... – sevenseacat Dec 24 '11 at 9:38
  • 1
    vi is case-sensitive. Since caps are used sparingly in most modern languages (in things like named constants), the search has a high probability of success. – ncmathsadist Dec 24 '11 at 22:19

Some editors only highlight uppercase TODO items, so it's safer to always use uppercase.


Visually ALL CAPS stands out, but isn't very legible. When reading code they scan as a block of a particular size. It doesn't really matter what the letters are. They just stand out and can be seen very quickly. Once you have been working with the tags for a while, your brain will recognize the word by shape.

From a tools (IDE/Editor) standpoint, case sensitive search will have a very low false positive rate on all caps versions. In some coding styles there is a small risk that a constant will be matched. Case sensitive whole word search makes false positives even less likely.

Once the tool gets it on screen the format clearly says look HERE. Once you are focused on the location, the legible part will be the related comment.

Not the answer you're looking for? Browse other questions tagged or ask your own question.