3 ms·
The 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 wa
by jsnell 10y ago
The 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.
- dahart 10y ago> I don't buy the independent discovery idea That's fair -- and like I said it could have happened. If I did pick it up, I'd be willing to bet it came from print sources and not computer sources. Using Xs as a placeholder is absolutely commonplace. But I remember sitting at my computer and searching for TODO, and then trying a few things before settling on XXX TODO. I tried "TODO TODO" and "(asterisk)(asterisk)TODO(asterisk)(asterisk)" and stuff like that... XXX TODO was simpler to type and easier to see. What I don't really buy is that this is a "discovery" at all. This doesn't seem worthy of attribution as a thing, not as a meme or as something that stands out as particularly useful or particularly widespread either. There are a bunch of conventions for TODO comments, and XXX isn't everywhere by any stretch. The kind of thing that I know I picked up elsewhere is 0xDEADBEEF, and that's the kind of thing that feels more worthy of investigation & attribution to me.
- pvg 10y agoI'm actually pretty convinced of multiple independent 'discovery'. The available annotated historical record we get to look at is tiny and drawing conclusions from it seems almost as problematic as doing the same from personal memory.
- JCzynski 10y agoI didn't read much existing codebases and started doing it myself. I probably stuck with it because vim does visual highlighting of TODO/XXX/FIXME/etc., but I definitely picked it as a searchable "I'm not going to reuse this string of characters" marker.
- slizard 10y ago> The inconvenient part of XXX are the false positives when searching. Would you mind elaborating what kind of source code contains numerous triplets of the uppercase character "X" and why? I have never seen such code other than produced by extremely inexperienced programmers/students with no imagination to naming symbols and ending up with "x", "xx", "xxx" variable names; even those cases will most likely not be all uppercase.
- pcmonk 10y agoThere's several good examples early in the article. Mostly, they end up in comments, where they're used as templates (e.g. "a social security number is of the form XXX-XX-XXXX").
- slavik81 10y agomkstemp - http://man7.org/linux/man-pages/man3/mkstemp.3.html http://man7.org/linux/man-pages/man3/mkstemp.3.html
- donarb 10y agoWhen defining fields in COBOL, you use a series of 'X' or '9' to denote the field type (alpha or numeric) and the length.