views:

1030

answers:

5

I have seen this a lot in code, even vim marks it as a special case. #TODO and #FIXME are two other fix markers vim highlights but what does #XXX means?

+2  A: 
Nick D
Interesting plugin. My only problem with it is the assignment of priority via this!!!1!
Matthew Scharley
+17  A: 

XXX in a comment is usually a heads-up. It could be:

  • Something that's not implemented completely correctly.
  • Something that should be fixed later on.
  • Highlighting a possible problem spot.
  • Something you're not sure about, a question.

I've often preferred a more descriptive tag like FIXME or TODO or HACK. XXX is often used as a catch all for the above.

Searching for 'XXX' on the FreeBSD code cross reference is a good example of many of the uses. There are thousands...

Stef
What's funny is that I use this on my own. XXX or #XXX basically trips the compiler and reminds me to go back on something. Generally pointer references or a previously unknown value or variable name.
bobby
This confirmed my original guess, It's simply a catch all tag to indicate other programmers to highlight that comment as something to look at.
Jorge Vargas
+4  A: 

Some notes from a June 2005 Python Enhancement Proposal that was rejected.

Choosing between FIXME and XXX is difficult.
XXX seems to be more common, but much less descriptive.
Furthermore, XXX is a useful placeholder in a piece of code
having a value that is unknown.

Thus FIXME is the preferred spelling.
Sun says that `XXX and FIXME are slightly different, giving XXX higher severity.
However, with decades of chaos on this topic, and too many millions of
developers who won't be influenced by Sun, it is easy to rightly call them synonyms.


The PEP Starts with,

This PEP has been rejected. While the community may be interested,
there is no desire to make the standard library conform to this standard.

...

What Are Codetags?

Programmers widely use ad-hoc code comment markup conventions to serve as reminders of sections of code that need closer inspection or review. Examples of markup include FIXME, TODO, XXX, BUG, but there many more in wide use in existing software. Such markup will henceforth be referred to as codetags. These codetags may show up in application code, unit tests, scripts, general documentation, or wherever suitable.


The PEP is an interesting read.

nik
+1  A: 

A placeholder, usually implying the code it refers to is:

  • Ugly
  • Scary
  • Magic

or worse.

Michael Foukarakis
why is that? I think #hack is more appropriate. From my own experience and other answer it seems to be a "general look at me"
Jorge Vargas
+2  A: 

I use XXX because it's easier to type than TODO.

XXX is for when you're in a hurry and will get back to this yourself.

TODO is for when you have to hand it off to someone else.

S.Lott
that doesn't explains what it means :)
Jorge Vargas
XXX means "I'm in a hurry and will get back to this myself" TODO means "This is an official part of a future backlog request that will be assigned to someone else." Those are the literal meanings.
S.Lott