News for hackers. Stuff that matters.
Re:The origins of XXX as FIXME by eddieh on Monday April 17, 2017 @12:15PM (#14132035)
Personally, 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.

Re:The origins of XXX as FIXME by mirekrusin on Monday April 17, 2017 @04:35PM (#14134187)
IMHO it didn't mean anything, just like when you're logging to console a lot and you want to quickly mark/separate something quickly, you're maybe adding bunch of '======', similarly XXX is just a quick mark to go back - so it's easy to find it - and sort something out there.

I think it was used more in days when we didn't have meta-comments - comments that ide is smart about now (FIXME is highlighted, indexed etc).

Novadays I'd use it in the code that really needs to be fixed because it smells. I wouldn't get offended when team member would say - don't use XXX, use FIXME or TODO only - because XXX'es shouldn't leak to commits anyway.

That's my opinion/gut feeling.

Re:The origins of XXX as FIXME by eriknstr on Monday April 17, 2017 @12:49PM (#14132397)
I 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/cfde4306623...

    // XXX: Feels a bit stupid to check user_set_iterations each iteration.
https://github.com/eriknstr/klondike/blob/d33accd6965d8d2476...

    // XXX: https://bugs.chromium.org/p/chromium/issues/detail?id=615638
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.
    #
Re:The origins of XXX as FIXME by thrilleratplay on Monday April 17, 2017 @09:59PM (#14135961)
I do the same with XXX. There is no sense of urgency but still acts as a placeholder that stands out. I use it to record a thought:

   // XXX: There must be a cleaner way to implement this
or call on someone (most likely myself) to replace with a NOTE clarifying why an out of place snippet of code is needed or verify it came be removed completely

    // XXX: Is this check still relevant?
Re:The origins of XXX as FIXME by mst on Monday April 17, 2017 @07:20PM (#14135283)
Interestingly, I've seen XXX used as the attention marker before a semantic prefix (and on its own when there isn't really one), i.e. as a sort of 'NB:' - so

    # XXX FIXME - blows up if $x is negative

    # XXX HACK - don't even ask
etc. etc. and then XXX on its own to mean "if you're skimming this code you really should read this comment but it doesn't fit a specific semantic category very well"
Re:The origins of XXX as FIXME by foobarian on Monday April 17, 2017 @08:27PM (#14135600)
I use it as a bookmark. It's a lot easier to type than FIXME or HACK. Like when I have to jump to the top to copy paste a block of code; type 'XXX' at current spot, jump elsewhere and do whatever, then Ctrl-S and 'XXX'.

I'm sure someone will point out that there are proper bookmarking commands in their favorite environment but I like not having to remember those, and this works in pretty much any editor/IDE.

Re:The origins of XXX as FIXME by Apocryphon on Monday April 17, 2017 @01:56PM (#14132988)
Maybe YYY as in, "Why, why, why did you implement it in this way?!"
Re:The origins of XXX as FIXME by paulddraper on Monday April 17, 2017 @02:39PM (#14133299)
Faces stiff competition from the more standard WTF
Re:The origins of XXX as FIXME by Florin_Andrei on Monday April 17, 2017 @03:33PM (#14133740)
YOY is sometimes appropriate.
Re:The origins of XXX as FIXME by eddieh on Monday April 17, 2017 @04:41PM (#14134232)
YOLO for "I have no idea how or why this works (it might not even work for all cases)"
Re:The origins of XXX as FIXME by Apocryphon on Monday April 17, 2017 @04:54PM (#14134333)
That's more for a Do Not Fix label: http://catb.org/jargon/html/magic-story.html
Re:The origins of XXX as FIXME by pnathan on Monday April 17, 2017 @02:25PM (#14133202)
FIXME and TODO are my preferred greppable comment prefixes. One denotes a problem, one denotes a lacuna.

And I'd agree: XXX deserves to be dropped due to lack of semantics.

Re:The origins of XXX as FIXME by MrTonyD on Monday April 17, 2017 @05:12PM (#14134460)
Most of my comments while I'm developing aren't FIXMEs or TODOs - sometimes just state, sometimes just tracing, ...

Trying to figure out semantics for all those scenarios seems like a waste of brain cells - I'll stick to XXX since it is both grep-able and easy to see.

I'm a big believer in Developer autonomy - so I hope everybody can do whatever works for them.

Re:The origins of XXX as FIXME by Shish2k on Monday April 17, 2017 @03:58PM (#14133926)
I use XXX as a temporary thing to grep for in my working copy of the code, representing a note to myself while I'm working on a feature; explicitly distinct from TODO / FIXME which I might commit to the repository with a more coherent comment for other people to read
Re:The origins of XXX as FIXME by stable-point on Tuesday April 18, 2017 @03:41AM (#14137083)
I do the same, as do others on my team. If we see an XXX in code-review, then we know someone commited something they didn't mean to.
Re:The origins of XXX as FIXME by wahern on Monday April 17, 2017 @08:24PM (#14135587)

  In any case, I think XXX should be dropped in favor of prefixes with some semantic meaning.
I use XXX when there's no obvious tag. Some things require attention or consideration at some indeterminate point in the future, but aren't bugs or hacks, and might not necessarily even need to be changed. They're just... a big fat question mark that you or somebody else might want to circle back around to.

Every programmer knows that naming things can be a tremendous tarpit. The only thing more tedious than choosing the best name for something is choosing a subtly misleading name which subsequently leads you or someone else on a wild good chase or possibly to fixing things (and accidentally breaking things) that never really needed to be fixed as long as the situation didn't change.

XXX is just the right convention precisely because it's so nebulous. NOTE doesn't work because something marked XXX isn't just locally descriptive, it's also a global marker that deserves to standout. WARNING doesn't work because that signals danger and hints that you may have done something suspect. But XXX doesn't necessarily mean code is suspect, it can be that it _might_ be suspect or that it _might_ be unnecessarily complex. ATTN is maybe the closest fit, but 1) isn't sufficiently loud and 2) lost out to XXX anyhow as a convention.

IME XXX is usually either 1) something that deserves reconsideration, and here's why ..., or 2) I'm too busy writing correct code to worry about the best description here, but here's a marker and possibly a sketch of a description for your future benefit.

Other than NOTE, I use XXX far more often than BUG or TODO. Committing a BUG comment is, I think, just poor discipline. If you know there's a bug, fix it or disable it.[1] I rarely use TODO inside code, but rather usually only in header files. That is, I use TODO to mark planned extension points. Inside implementation code I personally find TODO to be not much better than BUG, though reasonable people can certainly disagree on that point.

[1] I understand that sometimes neither fixing nor disabling is a realistic short-term option, especially in the corporate world. That doesn't make it any more excusable, though, especially if its your bug. And if you can actually get the BUG comment committed upstream one must wonder exactly how difficult it would have been to get an actual fix or mitigation upstream.

Re:The origins of XXX as FIXME by manicdee on Monday April 17, 2017 @06:50PM (#14135100)
Symbolic tags

grep -r '\bXXX\b' corporate_code_base

Versus semantic tags

grep -r '\b(FIXME|TODO|NOTE)\b' corporate_code_base

And that is before you discover two new semantic tags in a single bug fixing dive.

Premature categorisation is a fundamental error, which will have repercussions down the track.

Re:The origins of XXX as FIXME by Sunset on Tuesday April 18, 2017 @03:32AM (#14137063)
Clearly, we need to use header files to define our semantic comments as types with inheritance.
Re:The origins of XXX as FIXME by emmelaich on Monday April 17, 2017 @07:18PM (#14135269)
Is \b a new thing to grep? I think you'll need egrep anyway for the alternation pipe symbol. And I'm surprised \b works too.

Rather than \b you can just use -w (whole word option).

If those fail, then traditionally grep used \< and \> to mark beginning and end of word respectively.

Re:The origins of XXX as FIXME by warbiscuit on Monday April 17, 2017 @06:00PM (#14134804)
At my company we tend to use "NOTE:" just to be aware of something, "XXX:" when something's functional, but has room for improvement, "TODO:" when functionality's missing, and "FIXME:" when it's plain broken.

In that context the XXX's are kinda nice to have... we can mark there's something to work on; but only search for TODO/FIXME when looking for things that will actually impact currently needed operations.

Re:The origins of XXX as FIXME by Buge on Monday April 17, 2017 @11:42PM (#14136283)
Instead of XXX I just write YOLO. I've only done that a couple times.
Re:The origins of XXX as FIXME by iamacynic on Monday April 17, 2017 @05:07PM (#14134437)
the point is that it's all of the above, and when doing housekeeping, can be referenced in a single grep/search.

it condenses the efficiency of action.

always be lazy.