Is “remove commented out code” correct English? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Is “wait up!” considered correct English?“Toys out of the pram” expressionIs “very less” correct English?“Snapping out” vs “snapping out of it.”Why does “don't have a cow” mean “chill out” or “calm down” in American English?Is it correct to say “Getting out of schedule” or “Going out of schedule”Is “you best should run” correct English?Is 'waived it through' correct English?Phrase which means to “code in” a programming language“Out of respect” versus other “out of”
Why is std::move not [[nodiscard]] in C++20?
Does the Mueller report show a conspiracy between Russia and the Trump Campaign?
What would you call this weird metallic apparatus that allows you to lift people?
Why is a lens darker than other ones when applying the same settings?
I can't produce songs
How much damage would a cupful of neutron star matter do to the Earth?
Special flights
NERDTreeMenu Remapping
Simple Http Server
What is the difference between CTSS and ITS?
Can you force honesty by using the Speak with Dead and Zone of Truth spells together?
Delete free apps from library
Can an iPhone 7 be made to function as a NFC Tag?
Is CEO the "profession" with the most psychopaths?
Would color changing eyes affect vision?
Test print coming out spongy
Why weren't discrete x86 CPUs ever used in game hardware?
Relating to the President and obstruction, were Mueller's conclusions preordained?
How can I prevent/balance waiting and turtling as a response to cooldown mechanics
Putting class ranking in CV, but against dept guidelines
How do living politicians protect their readily obtainable signatures from misuse?
The test team as an enemy of development? And how can this be avoided?
White walkers, cemeteries and wights
A `coordinate` command ignored
Is “remove commented out code” correct English?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Is “wait up!” considered correct English?“Toys out of the pram” expressionIs “very less” correct English?“Snapping out” vs “snapping out of it.”Why does “don't have a cow” mean “chill out” or “calm down” in American English?Is it correct to say “Getting out of schedule” or “Going out of schedule”Is “you best should run” correct English?Is 'waived it through' correct English?Phrase which means to “code in” a programming language“Out of respect” versus other “out of”
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
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?
expressions
add a comment |
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?
expressions
Comments are not for extended discussion; this conversation has been moved to chat.
– Andrew Leach♦
Apr 5 at 14:15
In a commit message, you are defining the actions you took in that commit. Defining an action that has been completed, is done using the past tense. So "Remove" should be "Removed".
– Dylan
Apr 5 at 14:44
A simple hyphen would make "commented-out" a compound adjective - and then it's fine.
– TrevorD
Apr 5 at 22:39
add a comment |
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?
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?
expressions
expressions
asked Apr 3 at 14:09
CernoCerno
18816
18816
Comments are not for extended discussion; this conversation has been moved to chat.
– Andrew Leach♦
Apr 5 at 14:15
In a commit message, you are defining the actions you took in that commit. Defining an action that has been completed, is done using the past tense. So "Remove" should be "Removed".
– Dylan
Apr 5 at 14:44
A simple hyphen would make "commented-out" a compound adjective - and then it's fine.
– TrevorD
Apr 5 at 22:39
add a comment |
Comments are not for extended discussion; this conversation has been moved to chat.
– Andrew Leach♦
Apr 5 at 14:15
In a commit message, you are defining the actions you took in that commit. Defining an action that has been completed, is done using the past tense. So "Remove" should be "Removed".
– Dylan
Apr 5 at 14:44
A simple hyphen would make "commented-out" a compound adjective - and then it's fine.
– TrevorD
Apr 5 at 22:39
Comments are not for extended discussion; this conversation has been moved to chat.
– Andrew Leach♦
Apr 5 at 14:15
Comments are not for extended discussion; this conversation has been moved to chat.
– Andrew Leach♦
Apr 5 at 14:15
In a commit message, you are defining the actions you took in that commit. Defining an action that has been completed, is done using the past tense. So "Remove" should be "Removed".
– Dylan
Apr 5 at 14:44
In a commit message, you are defining the actions you took in that commit. Defining an action that has been completed, is done using the past tense. So "Remove" should be "Removed".
– Dylan
Apr 5 at 14:44
A simple hyphen would make "commented-out" a compound adjective - and then it's fine.
– TrevorD
Apr 5 at 22:39
A simple hyphen would make "commented-out" a compound adjective - and then it's fine.
– TrevorD
Apr 5 at 22:39
add a comment |
3 Answers
3
active
oldest
votes
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."
90
Your answer is grammatically correct, but it misses an important fact: "commented-out code" is idiomatic in the relevant domain of expertise. The phrase is widely used and well understood by programmers. I would not have a problem using it even in a formal context. Because "commented-out code" is idiomatic, "code which was commented out" is unnecessarily wordy and may intone smugness.
– jpmc26
Apr 3 at 18:40
14
@Juhasz "User login" is a synonym for "account," not a user in the logged in state. The idiomatic short phrase for "users who are logged in" would be "authenticated users." "Logged-in users" would be recognizable but not idiomatic. More relevant to this question, "users who are authenticated" would certainly sound strange in most contexts. I'm not sure what the rest has to do with reformulating the phrase into "the code which was commented out."
– jpmc26
Apr 3 at 19:30
14
Maybe it's just me, but for programming specifically, I'll agree and say "Remove the commented-out code" is better for a commit message. If the commit message was "Remove the code which was commented out" it leads me to sit and think, did mean that you removed code (for all practical purposes) by commenting it out? Or was there code, commented out, and was removed?
– BruceWayne
Apr 3 at 20:50
8
@jpmc26 Ack, be careful about universalizing your own dialect. Your criticisms are all correct, but "user login" is an event (a "user account" is just that), "logged-in users" is perfectly idiomatic (authentication can be performed in other ways, such as with OAuth), and using an adjective like "authenticated" in an adjective clause has more to do with the train of thought of the speaker than style.
– chrylis
Apr 3 at 21:25
5
Commit messages and idiomatic jargon are pretty far away from formal writing, there's no conflict here. Use "commented-out code" in your commits, tweets, and emails, use more formal language in your presentation to the Queen of Sweden.
– barbecue
Apr 3 at 21:43
|
show 13 more comments
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.
4
@CJDennis It's not really harmful to do that, but it's more important to keep to 72 characters than to add lubricant.
– chrylis
Apr 3 at 23:53
2
Who says that in the 21st century it's important to not go above 72 characters? My commit messages sometimes have single lines longer than 72 characters, and a total count of thousands of characters without issues.
– CJ Dennis
Apr 4 at 0:06
7
@CJDennis It's fine on commit messages; I sometimes write multiple paragraphs. The commit summary, on the other hand, is processed by tons of tooling, and GitHub, for example, will truncate it.
– chrylis
Apr 4 at 0:35
1
From what I've seen, GitHub doesn't truncate it (i.e. only store the first 72 characters), but in certain limited views it will show the first 72 characters as a preview. The full text is visible in a different view. My advice is that if you need more than 72 characters, use them! A 100 character commit summary (without irrelevancies) is unlikely to go under 72 characters by changing it to "headlinese".
– CJ Dennis
Apr 4 at 0:49
6
@CJDennis you can use as many characters as you want in a message but 72 is the standard for headings which is the first line. I don't want to go back and forth between views to know what the summary of the message is -FEAT1234: Making changes to the authentication procedure to allow for Single Sign-On users
is too long and it will cut of atallow for S
. OK, I made this a bit too word-y but the idea is that a descriptive doesn't really fit. A message of "Change authentication for SSO users" is enough as a heading - write an essay as the message, if you want.
– VLAZ
Apr 4 at 6:44
|
show 5 more comments
Just to add the pedantic view, 'out' is essentially redundant.
'Remove commented code' works, or to more accurately explain the commit 'Remove obsolete code' is probably better.
Having said that, 'commented out' is pretty much an industry term. If you wish to keep the 'out' (to differentiate from regular language comments that assist future readers, as opposed to comments that hide code from the compiler, I suppose), I see no need to hyphenate the term. It is common enough (especially among your target audience: commit log readers) to be immediately recognised and doesn't create ambiguity when left un-hyphenated.
15
'commented out' is pretty much an industry term — Right. And unfortunately for your first paragraph, so is 'commented code'! Commented code (especially well commented code) is a pro, not a con. "Gallant's code is commented. Goofus's code is commented out." (So "Remove commented code" would be less technically correct, but of course a human reader would supply the missing "out" from context.)
– Quuxplusone
Apr 4 at 5:59
27
Most people I know would consider "commented code" to refer to code that has comments in it, and "commented-out code" to refer to code that is put between comment markings in order to make the compiler/interpreter ignore it. They are not synonyms in the common usage that I know, so the "out" is not redundant. In fact, "comment out" is a phrasal verb modelled on "cross out", "scratch out", and "rub out", all of which have quite distinct meanings if "out" is omitted.
– Robert Furber
Apr 4 at 9:28
16
I agree with the other commenters. To me "commented-out code" has a very different meaning from "commented code". The latter meaning code that includes comments, the former being code that has become a comment and is now obsolete. They are not synonymous.
– user2705196
Apr 4 at 11:59
3
I agree, so this answer is wrong: "commented code" and "commented-out code" are different things. What is more, "obsolete code" is different yet again: it usually won't have been commented out.
– reinierpost
Apr 4 at 17:30
2
@mcalex "After going through identifiers, key words, strings etc, I said all the dark green stuff was simply commented code ..." this is actually, technically, just wrong, and maybe the source of your confusion re: the responses here. The "green stuff" itself is not "commented code". It is code comments, commonly referred to within domain as simply "comments". It may CONTAIN code that has been "commented out" (meaning: rendered into being a comment). Code that has comments ON IT (usually to the right, or above/below) is "commented code"... to be actually pedantic.
– taswyn
Apr 4 at 21:40
|
show 1 more comment
protected by Andrew Leach♦ Apr 3 at 21:45
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
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."
90
Your answer is grammatically correct, but it misses an important fact: "commented-out code" is idiomatic in the relevant domain of expertise. The phrase is widely used and well understood by programmers. I would not have a problem using it even in a formal context. Because "commented-out code" is idiomatic, "code which was commented out" is unnecessarily wordy and may intone smugness.
– jpmc26
Apr 3 at 18:40
14
@Juhasz "User login" is a synonym for "account," not a user in the logged in state. The idiomatic short phrase for "users who are logged in" would be "authenticated users." "Logged-in users" would be recognizable but not idiomatic. More relevant to this question, "users who are authenticated" would certainly sound strange in most contexts. I'm not sure what the rest has to do with reformulating the phrase into "the code which was commented out."
– jpmc26
Apr 3 at 19:30
14
Maybe it's just me, but for programming specifically, I'll agree and say "Remove the commented-out code" is better for a commit message. If the commit message was "Remove the code which was commented out" it leads me to sit and think, did mean that you removed code (for all practical purposes) by commenting it out? Or was there code, commented out, and was removed?
– BruceWayne
Apr 3 at 20:50
8
@jpmc26 Ack, be careful about universalizing your own dialect. Your criticisms are all correct, but "user login" is an event (a "user account" is just that), "logged-in users" is perfectly idiomatic (authentication can be performed in other ways, such as with OAuth), and using an adjective like "authenticated" in an adjective clause has more to do with the train of thought of the speaker than style.
– chrylis
Apr 3 at 21:25
5
Commit messages and idiomatic jargon are pretty far away from formal writing, there's no conflict here. Use "commented-out code" in your commits, tweets, and emails, use more formal language in your presentation to the Queen of Sweden.
– barbecue
Apr 3 at 21:43
|
show 13 more comments
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."
90
Your answer is grammatically correct, but it misses an important fact: "commented-out code" is idiomatic in the relevant domain of expertise. The phrase is widely used and well understood by programmers. I would not have a problem using it even in a formal context. Because "commented-out code" is idiomatic, "code which was commented out" is unnecessarily wordy and may intone smugness.
– jpmc26
Apr 3 at 18:40
14
@Juhasz "User login" is a synonym for "account," not a user in the logged in state. The idiomatic short phrase for "users who are logged in" would be "authenticated users." "Logged-in users" would be recognizable but not idiomatic. More relevant to this question, "users who are authenticated" would certainly sound strange in most contexts. I'm not sure what the rest has to do with reformulating the phrase into "the code which was commented out."
– jpmc26
Apr 3 at 19:30
14
Maybe it's just me, but for programming specifically, I'll agree and say "Remove the commented-out code" is better for a commit message. If the commit message was "Remove the code which was commented out" it leads me to sit and think, did mean that you removed code (for all practical purposes) by commenting it out? Or was there code, commented out, and was removed?
– BruceWayne
Apr 3 at 20:50
8
@jpmc26 Ack, be careful about universalizing your own dialect. Your criticisms are all correct, but "user login" is an event (a "user account" is just that), "logged-in users" is perfectly idiomatic (authentication can be performed in other ways, such as with OAuth), and using an adjective like "authenticated" in an adjective clause has more to do with the train of thought of the speaker than style.
– chrylis
Apr 3 at 21:25
5
Commit messages and idiomatic jargon are pretty far away from formal writing, there's no conflict here. Use "commented-out code" in your commits, tweets, and emails, use more formal language in your presentation to the Queen of Sweden.
– barbecue
Apr 3 at 21:43
|
show 13 more comments
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."
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."
answered Apr 3 at 14:23
JuhaszJuhasz
3,7381915
3,7381915
90
Your answer is grammatically correct, but it misses an important fact: "commented-out code" is idiomatic in the relevant domain of expertise. The phrase is widely used and well understood by programmers. I would not have a problem using it even in a formal context. Because "commented-out code" is idiomatic, "code which was commented out" is unnecessarily wordy and may intone smugness.
– jpmc26
Apr 3 at 18:40
14
@Juhasz "User login" is a synonym for "account," not a user in the logged in state. The idiomatic short phrase for "users who are logged in" would be "authenticated users." "Logged-in users" would be recognizable but not idiomatic. More relevant to this question, "users who are authenticated" would certainly sound strange in most contexts. I'm not sure what the rest has to do with reformulating the phrase into "the code which was commented out."
– jpmc26
Apr 3 at 19:30
14
Maybe it's just me, but for programming specifically, I'll agree and say "Remove the commented-out code" is better for a commit message. If the commit message was "Remove the code which was commented out" it leads me to sit and think, did mean that you removed code (for all practical purposes) by commenting it out? Or was there code, commented out, and was removed?
– BruceWayne
Apr 3 at 20:50
8
@jpmc26 Ack, be careful about universalizing your own dialect. Your criticisms are all correct, but "user login" is an event (a "user account" is just that), "logged-in users" is perfectly idiomatic (authentication can be performed in other ways, such as with OAuth), and using an adjective like "authenticated" in an adjective clause has more to do with the train of thought of the speaker than style.
– chrylis
Apr 3 at 21:25
5
Commit messages and idiomatic jargon are pretty far away from formal writing, there's no conflict here. Use "commented-out code" in your commits, tweets, and emails, use more formal language in your presentation to the Queen of Sweden.
– barbecue
Apr 3 at 21:43
|
show 13 more comments
90
Your answer is grammatically correct, but it misses an important fact: "commented-out code" is idiomatic in the relevant domain of expertise. The phrase is widely used and well understood by programmers. I would not have a problem using it even in a formal context. Because "commented-out code" is idiomatic, "code which was commented out" is unnecessarily wordy and may intone smugness.
– jpmc26
Apr 3 at 18:40
14
@Juhasz "User login" is a synonym for "account," not a user in the logged in state. The idiomatic short phrase for "users who are logged in" would be "authenticated users." "Logged-in users" would be recognizable but not idiomatic. More relevant to this question, "users who are authenticated" would certainly sound strange in most contexts. I'm not sure what the rest has to do with reformulating the phrase into "the code which was commented out."
– jpmc26
Apr 3 at 19:30
14
Maybe it's just me, but for programming specifically, I'll agree and say "Remove the commented-out code" is better for a commit message. If the commit message was "Remove the code which was commented out" it leads me to sit and think, did mean that you removed code (for all practical purposes) by commenting it out? Or was there code, commented out, and was removed?
– BruceWayne
Apr 3 at 20:50
8
@jpmc26 Ack, be careful about universalizing your own dialect. Your criticisms are all correct, but "user login" is an event (a "user account" is just that), "logged-in users" is perfectly idiomatic (authentication can be performed in other ways, such as with OAuth), and using an adjective like "authenticated" in an adjective clause has more to do with the train of thought of the speaker than style.
– chrylis
Apr 3 at 21:25
5
Commit messages and idiomatic jargon are pretty far away from formal writing, there's no conflict here. Use "commented-out code" in your commits, tweets, and emails, use more formal language in your presentation to the Queen of Sweden.
– barbecue
Apr 3 at 21:43
90
90
Your answer is grammatically correct, but it misses an important fact: "commented-out code" is idiomatic in the relevant domain of expertise. The phrase is widely used and well understood by programmers. I would not have a problem using it even in a formal context. Because "commented-out code" is idiomatic, "code which was commented out" is unnecessarily wordy and may intone smugness.
– jpmc26
Apr 3 at 18:40
Your answer is grammatically correct, but it misses an important fact: "commented-out code" is idiomatic in the relevant domain of expertise. The phrase is widely used and well understood by programmers. I would not have a problem using it even in a formal context. Because "commented-out code" is idiomatic, "code which was commented out" is unnecessarily wordy and may intone smugness.
– jpmc26
Apr 3 at 18:40
14
14
@Juhasz "User login" is a synonym for "account," not a user in the logged in state. The idiomatic short phrase for "users who are logged in" would be "authenticated users." "Logged-in users" would be recognizable but not idiomatic. More relevant to this question, "users who are authenticated" would certainly sound strange in most contexts. I'm not sure what the rest has to do with reformulating the phrase into "the code which was commented out."
– jpmc26
Apr 3 at 19:30
@Juhasz "User login" is a synonym for "account," not a user in the logged in state. The idiomatic short phrase for "users who are logged in" would be "authenticated users." "Logged-in users" would be recognizable but not idiomatic. More relevant to this question, "users who are authenticated" would certainly sound strange in most contexts. I'm not sure what the rest has to do with reformulating the phrase into "the code which was commented out."
– jpmc26
Apr 3 at 19:30
14
14
Maybe it's just me, but for programming specifically, I'll agree and say "Remove the commented-out code" is better for a commit message. If the commit message was "Remove the code which was commented out" it leads me to sit and think, did mean that you removed code (for all practical purposes) by commenting it out? Or was there code, commented out, and was removed?
– BruceWayne
Apr 3 at 20:50
Maybe it's just me, but for programming specifically, I'll agree and say "Remove the commented-out code" is better for a commit message. If the commit message was "Remove the code which was commented out" it leads me to sit and think, did mean that you removed code (for all practical purposes) by commenting it out? Or was there code, commented out, and was removed?
– BruceWayne
Apr 3 at 20:50
8
8
@jpmc26 Ack, be careful about universalizing your own dialect. Your criticisms are all correct, but "user login" is an event (a "user account" is just that), "logged-in users" is perfectly idiomatic (authentication can be performed in other ways, such as with OAuth), and using an adjective like "authenticated" in an adjective clause has more to do with the train of thought of the speaker than style.
– chrylis
Apr 3 at 21:25
@jpmc26 Ack, be careful about universalizing your own dialect. Your criticisms are all correct, but "user login" is an event (a "user account" is just that), "logged-in users" is perfectly idiomatic (authentication can be performed in other ways, such as with OAuth), and using an adjective like "authenticated" in an adjective clause has more to do with the train of thought of the speaker than style.
– chrylis
Apr 3 at 21:25
5
5
Commit messages and idiomatic jargon are pretty far away from formal writing, there's no conflict here. Use "commented-out code" in your commits, tweets, and emails, use more formal language in your presentation to the Queen of Sweden.
– barbecue
Apr 3 at 21:43
Commit messages and idiomatic jargon are pretty far away from formal writing, there's no conflict here. Use "commented-out code" in your commits, tweets, and emails, use more formal language in your presentation to the Queen of Sweden.
– barbecue
Apr 3 at 21:43
|
show 13 more comments
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.
4
@CJDennis It's not really harmful to do that, but it's more important to keep to 72 characters than to add lubricant.
– chrylis
Apr 3 at 23:53
2
Who says that in the 21st century it's important to not go above 72 characters? My commit messages sometimes have single lines longer than 72 characters, and a total count of thousands of characters without issues.
– CJ Dennis
Apr 4 at 0:06
7
@CJDennis It's fine on commit messages; I sometimes write multiple paragraphs. The commit summary, on the other hand, is processed by tons of tooling, and GitHub, for example, will truncate it.
– chrylis
Apr 4 at 0:35
1
From what I've seen, GitHub doesn't truncate it (i.e. only store the first 72 characters), but in certain limited views it will show the first 72 characters as a preview. The full text is visible in a different view. My advice is that if you need more than 72 characters, use them! A 100 character commit summary (without irrelevancies) is unlikely to go under 72 characters by changing it to "headlinese".
– CJ Dennis
Apr 4 at 0:49
6
@CJDennis you can use as many characters as you want in a message but 72 is the standard for headings which is the first line. I don't want to go back and forth between views to know what the summary of the message is -FEAT1234: Making changes to the authentication procedure to allow for Single Sign-On users
is too long and it will cut of atallow for S
. OK, I made this a bit too word-y but the idea is that a descriptive doesn't really fit. A message of "Change authentication for SSO users" is enough as a heading - write an essay as the message, if you want.
– VLAZ
Apr 4 at 6:44
|
show 5 more comments
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.
4
@CJDennis It's not really harmful to do that, but it's more important to keep to 72 characters than to add lubricant.
– chrylis
Apr 3 at 23:53
2
Who says that in the 21st century it's important to not go above 72 characters? My commit messages sometimes have single lines longer than 72 characters, and a total count of thousands of characters without issues.
– CJ Dennis
Apr 4 at 0:06
7
@CJDennis It's fine on commit messages; I sometimes write multiple paragraphs. The commit summary, on the other hand, is processed by tons of tooling, and GitHub, for example, will truncate it.
– chrylis
Apr 4 at 0:35
1
From what I've seen, GitHub doesn't truncate it (i.e. only store the first 72 characters), but in certain limited views it will show the first 72 characters as a preview. The full text is visible in a different view. My advice is that if you need more than 72 characters, use them! A 100 character commit summary (without irrelevancies) is unlikely to go under 72 characters by changing it to "headlinese".
– CJ Dennis
Apr 4 at 0:49
6
@CJDennis you can use as many characters as you want in a message but 72 is the standard for headings which is the first line. I don't want to go back and forth between views to know what the summary of the message is -FEAT1234: Making changes to the authentication procedure to allow for Single Sign-On users
is too long and it will cut of atallow for S
. OK, I made this a bit too word-y but the idea is that a descriptive doesn't really fit. A message of "Change authentication for SSO users" is enough as a heading - write an essay as the message, if you want.
– VLAZ
Apr 4 at 6:44
|
show 5 more comments
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.
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.
edited Apr 5 at 0:20
JJJ
6,242102846
6,242102846
answered Apr 3 at 21:22
chrylischrylis
70267
70267
4
@CJDennis It's not really harmful to do that, but it's more important to keep to 72 characters than to add lubricant.
– chrylis
Apr 3 at 23:53
2
Who says that in the 21st century it's important to not go above 72 characters? My commit messages sometimes have single lines longer than 72 characters, and a total count of thousands of characters without issues.
– CJ Dennis
Apr 4 at 0:06
7
@CJDennis It's fine on commit messages; I sometimes write multiple paragraphs. The commit summary, on the other hand, is processed by tons of tooling, and GitHub, for example, will truncate it.
– chrylis
Apr 4 at 0:35
1
From what I've seen, GitHub doesn't truncate it (i.e. only store the first 72 characters), but in certain limited views it will show the first 72 characters as a preview. The full text is visible in a different view. My advice is that if you need more than 72 characters, use them! A 100 character commit summary (without irrelevancies) is unlikely to go under 72 characters by changing it to "headlinese".
– CJ Dennis
Apr 4 at 0:49
6
@CJDennis you can use as many characters as you want in a message but 72 is the standard for headings which is the first line. I don't want to go back and forth between views to know what the summary of the message is -FEAT1234: Making changes to the authentication procedure to allow for Single Sign-On users
is too long and it will cut of atallow for S
. OK, I made this a bit too word-y but the idea is that a descriptive doesn't really fit. A message of "Change authentication for SSO users" is enough as a heading - write an essay as the message, if you want.
– VLAZ
Apr 4 at 6:44
|
show 5 more comments
4
@CJDennis It's not really harmful to do that, but it's more important to keep to 72 characters than to add lubricant.
– chrylis
Apr 3 at 23:53
2
Who says that in the 21st century it's important to not go above 72 characters? My commit messages sometimes have single lines longer than 72 characters, and a total count of thousands of characters without issues.
– CJ Dennis
Apr 4 at 0:06
7
@CJDennis It's fine on commit messages; I sometimes write multiple paragraphs. The commit summary, on the other hand, is processed by tons of tooling, and GitHub, for example, will truncate it.
– chrylis
Apr 4 at 0:35
1
From what I've seen, GitHub doesn't truncate it (i.e. only store the first 72 characters), but in certain limited views it will show the first 72 characters as a preview. The full text is visible in a different view. My advice is that if you need more than 72 characters, use them! A 100 character commit summary (without irrelevancies) is unlikely to go under 72 characters by changing it to "headlinese".
– CJ Dennis
Apr 4 at 0:49
6
@CJDennis you can use as many characters as you want in a message but 72 is the standard for headings which is the first line. I don't want to go back and forth between views to know what the summary of the message is -FEAT1234: Making changes to the authentication procedure to allow for Single Sign-On users
is too long and it will cut of atallow for S
. OK, I made this a bit too word-y but the idea is that a descriptive doesn't really fit. A message of "Change authentication for SSO users" is enough as a heading - write an essay as the message, if you want.
– VLAZ
Apr 4 at 6:44
4
4
@CJDennis It's not really harmful to do that, but it's more important to keep to 72 characters than to add lubricant.
– chrylis
Apr 3 at 23:53
@CJDennis It's not really harmful to do that, but it's more important to keep to 72 characters than to add lubricant.
– chrylis
Apr 3 at 23:53
2
2
Who says that in the 21st century it's important to not go above 72 characters? My commit messages sometimes have single lines longer than 72 characters, and a total count of thousands of characters without issues.
– CJ Dennis
Apr 4 at 0:06
Who says that in the 21st century it's important to not go above 72 characters? My commit messages sometimes have single lines longer than 72 characters, and a total count of thousands of characters without issues.
– CJ Dennis
Apr 4 at 0:06
7
7
@CJDennis It's fine on commit messages; I sometimes write multiple paragraphs. The commit summary, on the other hand, is processed by tons of tooling, and GitHub, for example, will truncate it.
– chrylis
Apr 4 at 0:35
@CJDennis It's fine on commit messages; I sometimes write multiple paragraphs. The commit summary, on the other hand, is processed by tons of tooling, and GitHub, for example, will truncate it.
– chrylis
Apr 4 at 0:35
1
1
From what I've seen, GitHub doesn't truncate it (i.e. only store the first 72 characters), but in certain limited views it will show the first 72 characters as a preview. The full text is visible in a different view. My advice is that if you need more than 72 characters, use them! A 100 character commit summary (without irrelevancies) is unlikely to go under 72 characters by changing it to "headlinese".
– CJ Dennis
Apr 4 at 0:49
From what I've seen, GitHub doesn't truncate it (i.e. only store the first 72 characters), but in certain limited views it will show the first 72 characters as a preview. The full text is visible in a different view. My advice is that if you need more than 72 characters, use them! A 100 character commit summary (without irrelevancies) is unlikely to go under 72 characters by changing it to "headlinese".
– CJ Dennis
Apr 4 at 0:49
6
6
@CJDennis you can use as many characters as you want in a message but 72 is the standard for headings which is the first line. I don't want to go back and forth between views to know what the summary of the message is -
FEAT1234: Making changes to the authentication procedure to allow for Single Sign-On users
is too long and it will cut of at allow for S
. OK, I made this a bit too word-y but the idea is that a descriptive doesn't really fit. A message of "Change authentication for SSO users" is enough as a heading - write an essay as the message, if you want.– VLAZ
Apr 4 at 6:44
@CJDennis you can use as many characters as you want in a message but 72 is the standard for headings which is the first line. I don't want to go back and forth between views to know what the summary of the message is -
FEAT1234: Making changes to the authentication procedure to allow for Single Sign-On users
is too long and it will cut of at allow for S
. OK, I made this a bit too word-y but the idea is that a descriptive doesn't really fit. A message of "Change authentication for SSO users" is enough as a heading - write an essay as the message, if you want.– VLAZ
Apr 4 at 6:44
|
show 5 more comments
Just to add the pedantic view, 'out' is essentially redundant.
'Remove commented code' works, or to more accurately explain the commit 'Remove obsolete code' is probably better.
Having said that, 'commented out' is pretty much an industry term. If you wish to keep the 'out' (to differentiate from regular language comments that assist future readers, as opposed to comments that hide code from the compiler, I suppose), I see no need to hyphenate the term. It is common enough (especially among your target audience: commit log readers) to be immediately recognised and doesn't create ambiguity when left un-hyphenated.
15
'commented out' is pretty much an industry term — Right. And unfortunately for your first paragraph, so is 'commented code'! Commented code (especially well commented code) is a pro, not a con. "Gallant's code is commented. Goofus's code is commented out." (So "Remove commented code" would be less technically correct, but of course a human reader would supply the missing "out" from context.)
– Quuxplusone
Apr 4 at 5:59
27
Most people I know would consider "commented code" to refer to code that has comments in it, and "commented-out code" to refer to code that is put between comment markings in order to make the compiler/interpreter ignore it. They are not synonyms in the common usage that I know, so the "out" is not redundant. In fact, "comment out" is a phrasal verb modelled on "cross out", "scratch out", and "rub out", all of which have quite distinct meanings if "out" is omitted.
– Robert Furber
Apr 4 at 9:28
16
I agree with the other commenters. To me "commented-out code" has a very different meaning from "commented code". The latter meaning code that includes comments, the former being code that has become a comment and is now obsolete. They are not synonymous.
– user2705196
Apr 4 at 11:59
3
I agree, so this answer is wrong: "commented code" and "commented-out code" are different things. What is more, "obsolete code" is different yet again: it usually won't have been commented out.
– reinierpost
Apr 4 at 17:30
2
@mcalex "After going through identifiers, key words, strings etc, I said all the dark green stuff was simply commented code ..." this is actually, technically, just wrong, and maybe the source of your confusion re: the responses here. The "green stuff" itself is not "commented code". It is code comments, commonly referred to within domain as simply "comments". It may CONTAIN code that has been "commented out" (meaning: rendered into being a comment). Code that has comments ON IT (usually to the right, or above/below) is "commented code"... to be actually pedantic.
– taswyn
Apr 4 at 21:40
|
show 1 more comment
Just to add the pedantic view, 'out' is essentially redundant.
'Remove commented code' works, or to more accurately explain the commit 'Remove obsolete code' is probably better.
Having said that, 'commented out' is pretty much an industry term. If you wish to keep the 'out' (to differentiate from regular language comments that assist future readers, as opposed to comments that hide code from the compiler, I suppose), I see no need to hyphenate the term. It is common enough (especially among your target audience: commit log readers) to be immediately recognised and doesn't create ambiguity when left un-hyphenated.
15
'commented out' is pretty much an industry term — Right. And unfortunately for your first paragraph, so is 'commented code'! Commented code (especially well commented code) is a pro, not a con. "Gallant's code is commented. Goofus's code is commented out." (So "Remove commented code" would be less technically correct, but of course a human reader would supply the missing "out" from context.)
– Quuxplusone
Apr 4 at 5:59
27
Most people I know would consider "commented code" to refer to code that has comments in it, and "commented-out code" to refer to code that is put between comment markings in order to make the compiler/interpreter ignore it. They are not synonyms in the common usage that I know, so the "out" is not redundant. In fact, "comment out" is a phrasal verb modelled on "cross out", "scratch out", and "rub out", all of which have quite distinct meanings if "out" is omitted.
– Robert Furber
Apr 4 at 9:28
16
I agree with the other commenters. To me "commented-out code" has a very different meaning from "commented code". The latter meaning code that includes comments, the former being code that has become a comment and is now obsolete. They are not synonymous.
– user2705196
Apr 4 at 11:59
3
I agree, so this answer is wrong: "commented code" and "commented-out code" are different things. What is more, "obsolete code" is different yet again: it usually won't have been commented out.
– reinierpost
Apr 4 at 17:30
2
@mcalex "After going through identifiers, key words, strings etc, I said all the dark green stuff was simply commented code ..." this is actually, technically, just wrong, and maybe the source of your confusion re: the responses here. The "green stuff" itself is not "commented code". It is code comments, commonly referred to within domain as simply "comments". It may CONTAIN code that has been "commented out" (meaning: rendered into being a comment). Code that has comments ON IT (usually to the right, or above/below) is "commented code"... to be actually pedantic.
– taswyn
Apr 4 at 21:40
|
show 1 more comment
Just to add the pedantic view, 'out' is essentially redundant.
'Remove commented code' works, or to more accurately explain the commit 'Remove obsolete code' is probably better.
Having said that, 'commented out' is pretty much an industry term. If you wish to keep the 'out' (to differentiate from regular language comments that assist future readers, as opposed to comments that hide code from the compiler, I suppose), I see no need to hyphenate the term. It is common enough (especially among your target audience: commit log readers) to be immediately recognised and doesn't create ambiguity when left un-hyphenated.
Just to add the pedantic view, 'out' is essentially redundant.
'Remove commented code' works, or to more accurately explain the commit 'Remove obsolete code' is probably better.
Having said that, 'commented out' is pretty much an industry term. If you wish to keep the 'out' (to differentiate from regular language comments that assist future readers, as opposed to comments that hide code from the compiler, I suppose), I see no need to hyphenate the term. It is common enough (especially among your target audience: commit log readers) to be immediately recognised and doesn't create ambiguity when left un-hyphenated.
answered Apr 4 at 5:24
mcalexmcalex
715511
715511
15
'commented out' is pretty much an industry term — Right. And unfortunately for your first paragraph, so is 'commented code'! Commented code (especially well commented code) is a pro, not a con. "Gallant's code is commented. Goofus's code is commented out." (So "Remove commented code" would be less technically correct, but of course a human reader would supply the missing "out" from context.)
– Quuxplusone
Apr 4 at 5:59
27
Most people I know would consider "commented code" to refer to code that has comments in it, and "commented-out code" to refer to code that is put between comment markings in order to make the compiler/interpreter ignore it. They are not synonyms in the common usage that I know, so the "out" is not redundant. In fact, "comment out" is a phrasal verb modelled on "cross out", "scratch out", and "rub out", all of which have quite distinct meanings if "out" is omitted.
– Robert Furber
Apr 4 at 9:28
16
I agree with the other commenters. To me "commented-out code" has a very different meaning from "commented code". The latter meaning code that includes comments, the former being code that has become a comment and is now obsolete. They are not synonymous.
– user2705196
Apr 4 at 11:59
3
I agree, so this answer is wrong: "commented code" and "commented-out code" are different things. What is more, "obsolete code" is different yet again: it usually won't have been commented out.
– reinierpost
Apr 4 at 17:30
2
@mcalex "After going through identifiers, key words, strings etc, I said all the dark green stuff was simply commented code ..." this is actually, technically, just wrong, and maybe the source of your confusion re: the responses here. The "green stuff" itself is not "commented code". It is code comments, commonly referred to within domain as simply "comments". It may CONTAIN code that has been "commented out" (meaning: rendered into being a comment). Code that has comments ON IT (usually to the right, or above/below) is "commented code"... to be actually pedantic.
– taswyn
Apr 4 at 21:40
|
show 1 more comment
15
'commented out' is pretty much an industry term — Right. And unfortunately for your first paragraph, so is 'commented code'! Commented code (especially well commented code) is a pro, not a con. "Gallant's code is commented. Goofus's code is commented out." (So "Remove commented code" would be less technically correct, but of course a human reader would supply the missing "out" from context.)
– Quuxplusone
Apr 4 at 5:59
27
Most people I know would consider "commented code" to refer to code that has comments in it, and "commented-out code" to refer to code that is put between comment markings in order to make the compiler/interpreter ignore it. They are not synonyms in the common usage that I know, so the "out" is not redundant. In fact, "comment out" is a phrasal verb modelled on "cross out", "scratch out", and "rub out", all of which have quite distinct meanings if "out" is omitted.
– Robert Furber
Apr 4 at 9:28
16
I agree with the other commenters. To me "commented-out code" has a very different meaning from "commented code". The latter meaning code that includes comments, the former being code that has become a comment and is now obsolete. They are not synonymous.
– user2705196
Apr 4 at 11:59
3
I agree, so this answer is wrong: "commented code" and "commented-out code" are different things. What is more, "obsolete code" is different yet again: it usually won't have been commented out.
– reinierpost
Apr 4 at 17:30
2
@mcalex "After going through identifiers, key words, strings etc, I said all the dark green stuff was simply commented code ..." this is actually, technically, just wrong, and maybe the source of your confusion re: the responses here. The "green stuff" itself is not "commented code". It is code comments, commonly referred to within domain as simply "comments". It may CONTAIN code that has been "commented out" (meaning: rendered into being a comment). Code that has comments ON IT (usually to the right, or above/below) is "commented code"... to be actually pedantic.
– taswyn
Apr 4 at 21:40
15
15
'commented out' is pretty much an industry term — Right. And unfortunately for your first paragraph, so is 'commented code'! Commented code (especially well commented code) is a pro, not a con. "Gallant's code is commented. Goofus's code is commented out." (So "Remove commented code" would be less technically correct, but of course a human reader would supply the missing "out" from context.)
– Quuxplusone
Apr 4 at 5:59
'commented out' is pretty much an industry term — Right. And unfortunately for your first paragraph, so is 'commented code'! Commented code (especially well commented code) is a pro, not a con. "Gallant's code is commented. Goofus's code is commented out." (So "Remove commented code" would be less technically correct, but of course a human reader would supply the missing "out" from context.)
– Quuxplusone
Apr 4 at 5:59
27
27
Most people I know would consider "commented code" to refer to code that has comments in it, and "commented-out code" to refer to code that is put between comment markings in order to make the compiler/interpreter ignore it. They are not synonyms in the common usage that I know, so the "out" is not redundant. In fact, "comment out" is a phrasal verb modelled on "cross out", "scratch out", and "rub out", all of which have quite distinct meanings if "out" is omitted.
– Robert Furber
Apr 4 at 9:28
Most people I know would consider "commented code" to refer to code that has comments in it, and "commented-out code" to refer to code that is put between comment markings in order to make the compiler/interpreter ignore it. They are not synonyms in the common usage that I know, so the "out" is not redundant. In fact, "comment out" is a phrasal verb modelled on "cross out", "scratch out", and "rub out", all of which have quite distinct meanings if "out" is omitted.
– Robert Furber
Apr 4 at 9:28
16
16
I agree with the other commenters. To me "commented-out code" has a very different meaning from "commented code". The latter meaning code that includes comments, the former being code that has become a comment and is now obsolete. They are not synonymous.
– user2705196
Apr 4 at 11:59
I agree with the other commenters. To me "commented-out code" has a very different meaning from "commented code". The latter meaning code that includes comments, the former being code that has become a comment and is now obsolete. They are not synonymous.
– user2705196
Apr 4 at 11:59
3
3
I agree, so this answer is wrong: "commented code" and "commented-out code" are different things. What is more, "obsolete code" is different yet again: it usually won't have been commented out.
– reinierpost
Apr 4 at 17:30
I agree, so this answer is wrong: "commented code" and "commented-out code" are different things. What is more, "obsolete code" is different yet again: it usually won't have been commented out.
– reinierpost
Apr 4 at 17:30
2
2
@mcalex "After going through identifiers, key words, strings etc, I said all the dark green stuff was simply commented code ..." this is actually, technically, just wrong, and maybe the source of your confusion re: the responses here. The "green stuff" itself is not "commented code". It is code comments, commonly referred to within domain as simply "comments". It may CONTAIN code that has been "commented out" (meaning: rendered into being a comment). Code that has comments ON IT (usually to the right, or above/below) is "commented code"... to be actually pedantic.
– taswyn
Apr 4 at 21:40
@mcalex "After going through identifiers, key words, strings etc, I said all the dark green stuff was simply commented code ..." this is actually, technically, just wrong, and maybe the source of your confusion re: the responses here. The "green stuff" itself is not "commented code". It is code comments, commonly referred to within domain as simply "comments". It may CONTAIN code that has been "commented out" (meaning: rendered into being a comment). Code that has comments ON IT (usually to the right, or above/below) is "commented code"... to be actually pedantic.
– taswyn
Apr 4 at 21:40
|
show 1 more comment
protected by Andrew Leach♦ Apr 3 at 21:45
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Comments are not for extended discussion; this conversation has been moved to chat.
– Andrew Leach♦
Apr 5 at 14:15
In a commit message, you are defining the actions you took in that commit. Defining an action that has been completed, is done using the past tense. So "Remove" should be "Removed".
– Dylan
Apr 5 at 14:44
A simple hyphen would make "commented-out" a compound adjective - and then it's fine.
– TrevorD
Apr 5 at 22:39