9 ms·
The origins of XXX as FIXME
- ISL 9y agoI learned XXX as a placeholder for FIXME from a scientist who learned to write physics papers in the 1980s. I believe he learned it from someone trained in the early 70s. It flows well in text: "The measurement performed by XXX in 1985 observed the same effect, but at the XXX-confidence level." I solve the XXX-as-stand-in-for-foo degeneracy by adding priorities to my XXXs: XXXRC, XXXMA, XXXMI, for release-critical, major, and minor bugs. A simple grep | wc shell script allowed rudimentary but extremely flexible bug-tracking when I was writing up my thesis.
- lionyo 9y agoFor journalists, the placeholder typically taught is "TK" for fact-checking later, as in "The youngest president was TK years old."
- jwilk 9y agoWhy "TK"?
- jwilliams 9y agoStands for "to come" https://en.m.wikipedia.org/wiki/To_come_(publishing) https://en.m.wikipedia.org/wiki/To_come_(publishing) Theory is that TK was a less common letter combination than TC.
- random_comment 9y ago(The agony of using 'TC' when you code in tcl, use tcpip, or are working with terminal control code)
- jcheng 9y agoIn case anyone is curious, like I was: $ grep -i tc /usr/share/dict/words | wc -l 1055 $ grep -i tk /usr/share/dict/words | wc -l 40
- 33degrees 9y agoI've always interpreted XXX to be the same as HACK rather than FIXME, as per Java's coding standards: "Use XXX in a comment to flag something that is bogus but works. Use FIXME to flag something that is bogus and broken."
- rb808 9y agoI hadn't heard this before, I found a doc here - is there something more recent? http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-137265.html http://www.oracle.com/technetwork/java/javase/documentation/...
- 33degrees 9y agoNot that I know of, that's where I found the exact quote I used...
- veddox 9y agoYeah, that's the way I've been using it too: FIXME - something is there, but it doesn't work TODO - something that needs to be there but isn't yet XXX - something is there and works, but should be cleaned up.
- tesseract 9y agoDitto, to me XXX is a near synonym of HACK. But they have slightly different connotations. I'd use HACK for something that works, and is maybe even elegant, but potentially fragile due to a lack of generality. XXX on the other hand is something that works, but is inelegant or violates good design principles - basically a "clean this up if you get a chance" marker.
- dahart 9y agoI'm pretty sure that use of 'xxx' predates computers as a stand-in for "some stuff". Like a Kleene star before regex existed. To me it seems uninteresting, and perhaps even misleading, to try and find the 'first use of xxx' on computers. I started using "XXX TODO" in college 20 years ago and I don't remember ever seeing it anywhere, it was a natural thing to do. I occasionally had "todo" in comments and code I wanted to fix very soon, and adding the 'XXX' was the easiest thing to add to make it searchable with no false positives. For whatever reason it seemed like an obvious thing to do. It's possible I picked it up somewhere, but I wasn't reading much code, there was nowhere near the access to public repos then that there is now. I'm pretty sure I invented it independently along with many other people. > Why he chose to switch to the rather inconvenient XXX from ### is unclear. I don't understand this comment... XXX is easier to type than ###. Caps lock works for X's and not for #'s. Even when using the shift key, X is a shorter throw than #.
- evgen 9y agoXXX is also easy to recognize visually in printed text. It stands out well and through convention it has become clearly recognizable as such a placeholder.
- mikerg87 9y agoI first saw as a it in drafts of memos and reports when such items were circulated on paper through cubby holes. This was Long before I saw it applied to source code - say '73-75 time frame.
- jsnell 9y agoThe inconvenient part of XXX are the false positives when searching. I don't buy the independent discovery idea (despite also thinking at one point that XXX was just my personal convention). When you pick up something through osmosis, you don't remember the exact source where you learn from. If this really was something that programmers just do naturally rather than learn, the programmers of the '60s and '70s would have been doing it too, and there should be some traces of it in the record. But at least I can't find those traces.
- COMPUTERLOSER 9y agoIt's a coding meme.
- luckydude 9y agoI'm with the author on XXX being a crappy thing to grep for, too many false positives. When I got to Sun and was hacking the kernel, I settled on LMXXX, that was fairly unique. Haven't looked in a while, but there used to still be some in the Solaris UFS code (not exactly proud of that). tl;dr: use your initials plus xxx and you can find 'em.
- cpeterso 9y agoGoogle's coding style guide calls for TODO comments to include the author's username, like `TODO(username)`, for future blame attribution: https://google.github.io/styleguide/cppguide.html#TODO_Comments https://google.github.io/styleguide/cppguide.html#TODO_Comme...
- QuercusMax 9y agoInternally this is now discouraged; preferred is TODO(b/12345678), where b/ is the shortcut for our internal bugtracking system.
- bluejekyll 9y agoI hate XXX as a placeholder for FIXME or TODO. There is no indication about its importance or meaning: XXX temporary variable Doesn't tell me, "hey, you should replace this temporary variable". If it did have a better comment, then it would be better, but still doesn't literally say FIXME! I use TODO for things that are potential performance, memory utilization, or design issues. FIXME I reserve for things that really should or must be fixed prior to a release. These include security issues, rare bugs, or improperly handled exceptions. Most editors now have plugins that also match on TODO and FIXME which draws your attention to them in the code.
- cpburns2009 9y agoI prefer to use an XXX comment to mark temporary code when debugging a specific issue. It's an easy reminder to myself that it should be removed when I'm done.
- escape_goat 9y agoMy own habits leave me wondering if the use of C-s as a search command in text editors is related to the semantic consolidation that Snellman sees of 'XXX' as a 'FIXME' synonym. In a lengthy file where I will repeatedly need to jump back to a particular spot, I tend to leave a 'xxx' comment in that place until I'm done. I believe I ended up doing so largely because `xxx` is unlikely to appear anywhere else, and thus, with a habit of pressing C-s as a left-handed chord, it becomes efficient to hit `x` three times and then C-s through instances as needed. Any place where such a reference marker was left in the code would indicate that the code editor knew he needed to return to that point, making it likely that a verifiable but non-fatal flaw could be found in the code there, reinforcing the association with a 'FIXME' semantic.
- diminish 9y agoAnother reason why I put XXX, FIXME or TODO is to be able to rgrep later easier - I want to avoid any kind of subtext which may occur inside variable names etc. so XXX satisfies this.
- the_mitsuhiko 9y agoFrom my experience and use XXX is not FIXME. XXX means something requires attention but does not necessarily imply it being broken. For instance an important line could be marked at that. Often it does imply that something should be refactored however.
- eddieh 9y agoPersonally, I can't stand XXX as a comment prefix. It is semantically null as far as I am concerned. Just looking through the comments here shows several different possible meanings: FIXME, HACK, TODO. But I've seen it alongside all of FIXME, HACK, NOTE, TODO, BUG, ATTN, as a complete separate and distinct type of comment prefix. Is it an actionable indicator or a explanatory indicator? What is its relative priority or importance among the others? At least with all the other prefixes I listed it is dead clear what is actionable and what is explanatory. Better still there is an obvious priority albeit slightly ambiguous. Is TODO a higher priority than FIXME? But that can be addressed in a section of the README if necessary. The other problem is allowing XXX in the code base allows for a catchall cop-out. Instead of giving the comment some semantic meaning just use XXX and let somebody else figure it out. That somebody could even be you in a few years. In one particular code base that had a few other prefixes the XXX were by far the dominate prefix, presumable because of a catchall cop-out slippery slope. In any case, I think XXX should be dropped in favor of prefixes with some semantic meaning.
- eriknstr 9y agoI use XXX to mean note/attention. I do so because "NOTE" on it's own does not "scream loudly enough" to me when I read it, and as for "ATTN" I associate that with the writing on a letter when you want to send it to a specific person in an organization. Here are a couple of examples from my own code: https://github.com/eriknstr/TEMPer2-getdegs/blob/cfde4306623dd79606bd983251b8e8cbace9c316/getdegs.c#L223 https://github.com/eriknstr/TEMPer2-getdegs/blob/cfde4306623... // XXX: Feels a bit stupid to check user_set_iterations each iteration. https://github.com/eriknstr/klondike/blob/d33accd6965d8d2476ed06601f7a7e4dc97e56b8/src/client/html/klondike.js#L277 https://github.com/eriknstr/klondike/blob/d33accd6965d8d2476... // XXX: https://bugs.chromium.org/p/chromium/issues/detail?id=615638 https://github.com/eriknstr/interweb/blob/6c2985f8d8a9d63d084d8a3688151ddbe20a22b9/tools/cfipaddr.bash#L51 https://github.com/eriknstr/interweb/blob/6c2985f8d8a9d63d08... # # Domain and records to update with the current WAN address of the router # # XXX: First record must expose origin server's IP address. # This is by design because I need to be able to # log onto my machine remotely using SSH # so having a DNS name for the IP of the host # makes more sense than not having it. # # If this is not acceptable to you, then this script # is not suitable for your use-case. #
- jampa 9y agoCant find the source now, but I read a theory that the origin of XXX is due to old movies and cartoons that shows poison in a flask with the "XXX" label, and it was used in programming to mark "poisonous code".
- zck 9y agoFor some reason, I use "zck" (my initials) for meta-comments in code, mainly instead of "TODO", but also for TODOs that aren't just code, as in (https://bitbucket.org/zck/zpresent.el/src/08ae558834c25ebca867e8885f1a0628684c823b/zpresent.el?at=default&fileviewer=file-view-default#zpresent.el-605 https://bitbucket.org/zck/zpresent.el/src/08ae558834c25ebca8...): After a comment explaining some math: ;;Add one here so that we round away from zero. We want to have more whitespace on the left than the right side. I then have a comment to think about if that makes sense to do: ;;zck is this what's wanted? I haven't set up the rules for doing this explicitly, but have a pretty intuitive understanding as to when I should do this. In some ways, this is instead of using a real issue system -- which I also do, but not for everything.
- veddox 9y agoI use my initials when I'm getting to grips with a new code base. It's not for committing, just as an aid when I'm jumping around following the code.
- GunlogAlm 9y agoProbably a silly question, but what's the "obvious reason" for using XXXYYY in this paragraph? "Some DEC code seems to have gone really overboard with this, with single source files having half a dozen different XXXYYY identifiers. (Sorry, had to use YYY as the placeholder there for obvious reasons)."
- eriknstr 9y agoPerhaps XXX001, XXX002, XXX003 and so on?
- tene 9y agoBy my reading, that parenthetical comment is implying that the author initially considered "XXX" as a placeholder for the letters coming after a literal "XXX" in the DEC source code, but couldn't use "XXX" as a placeholder because it's also being used literally as the prefix, so "XXXXXX" would not demonstrate what the author was trying to communicate (that the DEC code in question had many instances of the letters "XXX" followed by three other letters).
- uiri 9y agoThe standard placeholder would be to use "XXX" instead of "YYY" but "XXXXXX" is semantically ambiguous in this context.
- thinkingkong 9y agoIve always treated XXX like a sentinel that should be grepped for before committing code. Its really just temporary garbage that shouldnt pollute the repo. The fact that my editor highlights XXX by default is the reason I keep using it.
- wruza 9y agoI'm using it like that too. Another reason is that typing /XXX is faster than /FIXME.
- twic 9y agoThis is also what i do (although only as of a few weeks ago!). I've added the check into my standard Git pre-commit hook: https://bitbucket.org/twic/devtools/src/762878a5f3d9c83ffa2ad9a8534e6978a55833ec/git/commit-msg.messagepattern https://bitbucket.org/twic/devtools/src/762878a5f3d9c83ffa2a...
- random_comment 9y agoI have used XXX (and ZZZ) in my own code because they are the only tokens that satisfy these 3 things. 1. It stands out clearly visually in the code. 2. It is not normally a keyword, variable or string in my code. 3. I can type it quickly and comfortably using only my left hand and two fingers, while my right hand controls the cursor to navigate (or is moving to the keyboard after cursor navigation). I usually start typing it during the interval as my right hand begins moving left over the keyboard to prepare to type the comment that will follow. I suspect XXX and ZZZZ are not simply conventions that are picked up by exposure to other people's code, I think they represent a local maximum of convenience for these three criteria. Try typing any other token (e.g. TODO) and see if it satisfies these criteria as well as XXX or ZZZ.
- amichal 9y agoFor me: XXX is for putting into log messages you want to grep for while debugging. They get commented or turned into useful log messages before committing/merging. Edit: I have never used them for comments... Those either have TODO/FIXME or are (hopefuly) useful explanation of the high level task the code is trying to accomplish
- syncsynchalt 9y agoPersonal anecdote: I use "XXX" as a marker for "you must clean this up before committing/publishing", similar to "DO NOT PUBLISH" in a CMS. The reason I do this is because it visually stands out well when scanning through the output of `git add -p`. When used in that form it satisfies all the author's concerns, as it's just a marker to myself that presumably needs no other context (as I usually mark and resolve within a few hours).
- pacaro 9y agoIn older windows NT code — within the OS itself, not applications — doubling was common, so comments would have BUGBUG, HACKHACK, CHECKCHECK or similar. IIRC these were globally cleaned up in the Longhorn (vista) timeframe Maybe this was part of Cutler Normal Form, but it's been over 10 years, so my memory is hazy
- jcoffland 9y agoLike "Built on Windows NT Technology" which expands to "Built on Windows New Technology Technology." I believe this appears during the install of XP.
- tajen 9y agoI personally use NO_RELEASE and TODO, the former can't pass the release script (such as isLicensed=true), and both are brightly colored keywords in IntelliJ. Am I alone?
- optimuspaul 9y agoYou are not alone. I've never even seen XXX used in the 20+ years I've been slinging code. TODO is by far the most common, FIXME once in a while. I like NO_RELEASE as a concept, but I haven't seen that.
- mwfunk 9y agoSame here. 20+ years professional experience with a bunch of different companies, industries, languages, and locales. TODO/FIXME are the only ones I'd consider universal, and I have literally never seen anyone use XXX. I don't doubt that people use it or even that it's common, I'm just confused as to how I could've missed it. Maybe it's not as common as everyone here thinks? Or maybe it's common in corners of the industry that I haven't spent much time in (like web development). No idea.
- cpeterso 9y ago"See Page XX" was such a common typo in early D&D books, where someone forgot to update a page number reference, that there is a RPG blog called "See Page XX": http://site.pelgranepress.com/seepagexx/ http://site.pelgranepress.com/seepagexx/
- bartc 9y agoWhen you make a mistake on a typewriter with no delete key and no white-out handy, you could back up to the beginning of the error and type "XXXXX" over everything and start anew on the following word or line. Someone likely carried this forward as an indicator of a mistake (ie. "hacky") and then it stuck from there.
- phlakaton 9y agoI would never willingly use XXX in code, for one simple reason: it's an abbreviation for pornography. All other arguments against it (and I think they're good arguments) would be dwarfed by the brief but squicky feeling I've gotten whenever I've encountered one of these tags in a codebase. I don't have any particular issue against other sequences of X's run together, but that particular one is off-limits as far as I'm concerned.
- optimuspaul 9y agohaha, yes!
- Animats 9y agoI use ***TEMP***, ***NEEDS WORK***, etc. Those you can find with grep. (HN needs less broken Markdown.)
- mark4o 9y agoI suspect that the reason for switching from ### to XXX is that grep ### requires quoting in the shell.
- jsnell 9y agoI like that theory!
- SwellJoe 9y agoFWIW, I use XXX, and I've never come across an instance where XXX was anything but a FIXME/TODO. It doesn't show up in any project I've worked on, in the ways the author exhibited. e.g. IP addresses usually use lowercase xxx, if they use letters at all. I see a lot of network-related code, and XXX is just not a thing I see, outside of comments. But, really, I don't have strong opinions. My editor can highlight anything I want to use for this purpose, and I think they're all (XXX, FIXME, TODO) pretty universally recognized as meaning "This code is kinda ugly, and we ought to do something about it." which is maybe enough granularity in the code itself when we already have ticket trackers, source control, unit tests, etc.
- wink 9y agoInteresting, I've never seen any XXX that was deliberately put into code and not just forgotten to be removed before a commit. I'm equally likely to put asdf or www or aaa or yyy. Just to grep in debug output when doing println debugging.
- smnplk 9y agoIf we want our kids to grow up as good coders, we need to remove all the XXX content from our codebases.
- DownSyndrome 9y agoXXX is very offensive to people who can read rot13...
- avidal 9y agoI personally use XXX all the time; but I tend to use it in places where perhaps ATTN or NOTE would be more explicit. It may be simply an artifact of other code in the past; when I switched to vim ~10 years ago I noticed XXX was specifically highlighted along with FIXME and TODO and so I used it as a third option: here's something that doesn't need to be fixed, isn't really a todo, but you should read and understand. Interestingly, I just did a quick check in vim to see which prefixes were highlighted and ATTN / HACK were not, but the usual suspects (BUG, FIXME, TODO, NOTE, XXX) were. I should probably use NOTE in most places that I currently use XXX...
- kbob 9y agoI wonder how old the author is. I "knew" the XXX convention was from CSRG, and Bill Joy would have been my first guess. I expect most people who worked with Unix in the '70s or early '80s would have guessed the same. I read a lot of Bell Labs Unix source, never saw XXX, and immediately noticed it when I got my first BSD tapes, especially in areas where Joy had worked. (BSD 4.1c, I think.) In another 30 years, this would be interesting archaeology, since hackers of that generation will all be dead. But today, it's just "ask somebody over 60 if they remember."
- gonzo 9y agoOver 50 will do. I also "knew".
- gonzo 9y agoAsked wnj about this (pointed him to the original post and this thread). His response: 'XXX doesn’t mean TODO, it means “should be better, fix it later”'