SAP / styleguides

This repository provides SAP style guides for coding and coding-related topics.
Other
1.68k stars 445 forks source link

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

Open robinbaeurle opened 2 years ago

robinbaeurle commented 2 years ago

In the Comments section, the styleguide states that:

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:

HrFlorianHoffmann commented 2 years ago

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:

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 commented 2 years ago

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.