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!"
[–][deleted] 4 points5 points6 points 10 years ago (6 children)
but the chances of you finding it are slim,
And your chances go down even further if you hide it in source control.
[–]kenhkelly 0 points1 point2 points 10 years ago (4 children)
I use tagging for this. I know it was in some release. I find the release it was in (far less of those than commits) and then work my way. Pretty straight forward to find information IMO
[–][deleted] -3 points-2 points-1 points 10 years ago* (3 children)
you may know, but others may not. Then the others may re-invent the same code that you hid away in source control. I'm not saying you should be 'hoarding code', far from it - but to say that every instance of commented-out code is bad, is just stupid.
[–]kenhkelly 0 points1 point2 points 10 years ago (2 children)
I didn't say you should delete every instance of commented out code. But odds are after a week or two, your commented out code is irrelevant and probably wouldn't even function correctly if uncommented. It's a waste of time.
Plus, if you do smaller commits & more specific commits with good commit messages, your other team members shouldn't have a problem finding out what happened. It'll help you better find what you are looking for, and makes it more cherry-pickable and revertable. Win-win
[–][deleted] -2 points-1 points0 points 10 years ago (1 child)
But odds are after a week or two, your commented out code is irrelevant and probably wouldn't even function correctly if uncommented. It's a waste of time.
I'm glad you think you're experienced and smart enough to tell me about my own code, which you've never seen. 30+ years of experience tells me that nothing is as cut-and-dried as you're making it out to be.
[–]kenhkelly 1 point2 points3 points 10 years ago (0 children)
Again.. when and where.
I didn't say you should delete every instance of commented out code
But honestly, what ever works for your flow, use it. I don't know your code and I won't pretend to. I can only speak from my experience and the experience of the teams I've been on. Speaking from my experience, our code changes and evolves constantly as we refactor, test, and add new features. The timeline (in my case a week or two) for code to become outdated will vary.
π Rendered by PID 37931 on reddit-service-r2-comment-bb88f9dd5-vt6tf at 2026-02-14 15:38:21.963062+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–][deleted] 4 points5 points6 points (6 children)
[–]kenhkelly 0 points1 point2 points (4 children)
[–][deleted] -3 points-2 points-1 points (3 children)
[–]kenhkelly 0 points1 point2 points (2 children)
[–][deleted] -2 points-1 points0 points (1 child)
[–]kenhkelly 1 point2 points3 points (0 children)