Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meaning of XXX in Comments FIXME/TODO/XXX #279

Open
robinbaeurle opened this issue Jul 18, 2022 · 2 comments
Open

Meaning of XXX in Comments FIXME/TODO/XXX #279

robinbaeurle opened this issue Jul 18, 2022 · 2 comments
Labels
Adjustment Of Rule The issue or PR proposes an adjustment of a rule or set of rules

Comments

@robinbaeurle
Copy link

In the Comments section, the styleguide states that:

  • FIXME points to errors that are too small or too much in-the-making for internal incidents.
  • TODOs are places where you want to complete something in the near(!) future.
  • XXX marks code that works but could be better.

My question: what exactly does XXX stand for? Is it an abbreviation of some sort?

It would be nice if this category ("code works but could be better") were to be documented consistently throughout the code. But XXX does not seem all that descriptive to me, causing some unaware developer to maybe even delete these comments, mistaking them for typos!

As per the character of this category, I would most likely see it as a definition of Technical Debt. With that, I would propose an abbreviation that is more telling than XXX, for instance one of the below:

  • TD marks technical debt (the way it is also defined in literature)
  • TEDE marks technical debt (harder to be mistaken for ToDo than the above)
@HrFlorianHoffmann
Copy link
Contributor

HrFlorianHoffmann commented Jul 22, 2022

For the archaeologists among us, the article https://www.snellman.net/blog/archive/2017-04-17-xxx-fixme/ provides some interesting insights into the possible origin of the XXX comment.

In short:

  • Probably popularized by a developer called Bill Joy in 1971, working on the Berkley Software Distribution (BSD)
  • Seems to have emerged for unknown reasons as a variant for "fixme" and "###"
  • Later mostly used as a weaker, not so urgent, or more uncertain alternative to "fixme"

We didn't come up with this abbreviation. We took it over from other projects who used it. This makes me worried a bit whether it's a good idea to mess with it?

@jordao76
Copy link
Contributor

jordao76 commented Jul 22, 2022

I think the XXX codetag is not self-evident. We should drop it. We should go a step further and have broader recommendations for these kinds of comments (codetags), like making them easy to read and understand, which is the essence of clean code. They should also be used rarely.

I don't think TD or TEDE help as well, but each team should be able to decide. We should not dictate which codetags to use (apart from the widespread TODO), but how to use them.

@KlausHaeuptleSAP KlausHaeuptleSAP added the Adjustment Of Rule The issue or PR proposes an adjustment of a rule or set of rules label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Adjustment Of Rule The issue or PR proposes an adjustment of a rule or set of rules
Projects
None yet
Development

No branches or pull requests

4 participants