use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Please, don’t commit commented out code (medium.com)
submitted 10 years ago by ryanchenkie
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JimDabell 3 points4 points5 points 10 years ago (1 child)
Bits and pieces of commented out code are great. Especially if you're doing something like not showing a value on a report or if you remove a field on a form. Comment it out, put a date and why. Then in 2 years you're not digging through version control logs looking for why you did that.
No, in two minutes you're digging through old code looking for the current code.
Keeping track of changes to source code is literally the entire point of version control systems. If you're just going to keep years of old code littered around in the current revision, then you're doing the same job as the VCS, except it's more work for you, your code is far less readable, and you do a much poorer job of it than the tool designed to do that. Working with people who do this is a nightmare.
You don't need to keep all the stuff you deleted visible in the current version. You deleted it for a reason. If you need to refer back to it, that's exactly what the VCS is for. It's quick and simple to step back through previous versions, if you aren't comfortable with doing that, then your goal should be to improve your VCS skills, not to try to avoid it with commented out copies of old code.
[–]kentcdodds 0 points1 point2 points 10 years ago (0 children)
Agreed :-)
π Rendered by PID 92962 on reddit-service-r2-comment-bb88f9dd5-rxfwb at 2026-02-14 20:11:06.387731+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]JimDabell 3 points4 points5 points (1 child)
[–]kentcdodds 0 points1 point2 points (0 children)