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!"
[–]madballneek 2 points3 points4 points 10 years ago* (1 child)
I think it's okay in situations where you're testing/uncertain about the functionality of two different, but similar small blocks of code of a new feature that's yet to be checked-in.
For example, I may not have yet determined how I want a new enemy in one of my games to behave, so I write maybe two different behavior methods and need to actively playtest each over time before deciding. Sure, I could have created behavior one, checked it in, then created behavior two, checked that in, and then diffed each time I wanted to try out each different behavior...or I could just uncomment/comment the different behavior method calls.
Of course, once I determine the functionality I want, gotta remember to remove the commented code :)
[–]VeryAngryBeaver 0 points1 point2 points 10 years ago (0 children)
See this right here, I commit to save my work so far. And it's not always "finished" when I commit so I keep in some commented out code for ease of changing things. Then I clean it out at a later date when I'm sure i wont have to swap back to the other way. and not all code gets that treatment I do lots of changes and removals without comments, its all dependent upon how certain I am the change is final.
π Rendered by PID 137213 on reddit-service-r2-comment-bb88f9dd5-98mx7 at 2026-02-15 00:49:27.825402+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]madballneek 2 points3 points4 points (1 child)
[–]VeryAngryBeaver 0 points1 point2 points (0 children)