Expressions – Is “remove commented out code” Correct English?

expressions

As a programmer, I often use the term "Remove commented out code" as a commit message when checking in code. I wonder whether this is correct English.

To use an example outside the realm of programming, consider these two phrases for contrast:

"Help the poor people"

"Help the left behind people"

The first seems reasonable, while the second sounds clunky. Is it grammatically correct? I assume it could be said better.

What about my initial example? Is there a better way to phrase it or is it ok?

Best Answer

There is a better way to phrase it, but it's also OK. That is to say, in contexts other than a commit message, you would probably want to rewrite the sentence, but for an internal note, it's fine.

The main issue with the sentence is that you're using commented out as a compound adjective and so you should probably hyphenate the phrase: "Remove the commented-out code." Hyphenation would also improve your last example sentence: "Help the left-behind people" is better, but "Help the people who were left behind" is better still.

If I were trying to express the idea of your commit message in a more formal context, a context where prose style is important, or really any context without a strict and low character limit, I would write, "Remove the code which was commented out."

Related Topic