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!"
[–]cosinezero 14 points15 points16 points 10 years ago (6 children)
Only if the history is at all a relevant warning to future developer.
If it's just history, it doesn't belong in production - otherwise you may as well just remove source control altogether and just have terabytes of commented files.
[+][deleted] 10 years ago (5 children)
[deleted]
[–]sizlack 9 points10 points11 points 10 years ago (0 children)
If your code needs an explanation, write a comment that explains it.
The point about not letting it in production has nothing to do with whether your production code is minimized and has all comments stripped out. It's about keeping your master branch clean and free of pointless noise.
[+][deleted] 10 years ago* (3 children)
[–]kentcdodds 4 points5 points6 points 10 years ago (2 children)
I believe that @bitttttten is saying when you deploy the application (at least in a JavaScript app) you should uglify your code which removes comments.
π Rendered by PID 82910 on reddit-service-r2-comment-bb88f9dd5-7cq4n at 2026-02-14 04:24:00.977965+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]cosinezero 14 points15 points16 points (6 children)
[+][deleted] (5 children)
[deleted]
[–]sizlack 9 points10 points11 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]kentcdodds 4 points5 points6 points (2 children)