You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 6Perhaps add the answer to the question: Is it bad practice? Yes, because....Juan Carlos Coto– Juan Carlos Coto2017-06-14 20:54:01 +00:00Commented Jun 14, 2017 at 20:54
- 1I sometimes do the same (as OP) because it's easier to uncomment than to revert. In rare cases even if code compiles and passes automatic testing, there is a reason for existence of that code I overlooked that manual tester would spot. In this rare scenario, instead of going through major pain or reverting things several commits later, I just uncomment the code back (and revisit how it can be improved)Andrew Savinykh– Andrew Savinykh2017-06-14 22:53:01 +00:00Commented Jun 14, 2017 at 22:53
- 2@AndrewSavinykh That's different, you are commenting code you are still not sure you want to delete.Stop harming Monica– Stop harming Monica2017-06-15 06:39:09 +00:00Commented Jun 15, 2017 at 6:39
- 6@AndrewSavinykh “major pain or reverting things several commits later” – I wonder what version control you use; this shouldn't be a major pain. It certainly isn't in Git, at least not after you've done it a couple of times and learned what to look out for... and provided your history isn't clobbered with needless back-and-forth commits that give you conflicts every other merge. And commits that merely comment something out are rather prone to do this...leftaroundabout– leftaroundabout2017-06-15 19:45:02 +00:00Commented Jun 15, 2017 at 19:45
- 4@AndrewSavinykh yes, and it's not like I've not experienced these problems – projects whose maintainers never really worked with the version control and put lots of info in comments that should really have been commit messages, rather added new manual-undo-commits instead of properly reverting, etc.. The resulting state of the repository made for lots of conflict fun in every larger rebase... But, and that's my point, these problems are often largely caused by workarounds like the one you defend here.leftaroundabout– leftaroundabout2017-06-15 21:09:42 +00:00Commented Jun 15, 2017 at 21:09
| Show 2 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you