Is "remove commented out code" correct English?
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?
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."
Commit summaries (the single first line of a commit, and often the entire message) are a defined genre of technical speech because they have a specific role of identifying changes in a big list of changes and are limited to a certain number of characters. In particular, they are usually written in imperative ("Remove" vs. "Removed") and in headlinese for the same goal of fitting information into a limited space. Thus these are all considered helpful commit summaries:
- Remove commented-out code
- Refactor foo service
- Add new SMS implementation for Bar Mobile
As noted elsewhere, "commented-out" should be hyphenated as it's a phrasal adjective; otherwise, the way you're phrasing it is stylistically preferred for this specific context.