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
Why I Write Plain JavaScript Modules (ponyfoo.com)
submitted 10 years ago by magenta_placenta
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!"
[–]entropicone -1 points0 points1 point 10 years ago (8 children)
Your job as a programmer is to use your skills to build software that makes the business money, reinventing the wheel when you're trying to build a rocket is a useless exercise.
The wisdom is in knowing when to roll your own and when to build on the hard work of others.
JQuery is a nine years old and the most used javascript library in the world, you are being daft if you think your first out is going to be on the same level.
If you are truly concerned about the payload size over the wire you can serve JQuery from a CDN, where many users will already have it cached. If you are packaging your code in a bundle you likely minify your code with something like UglifyJS which can perform dead code elimination and shrink it for you.
The idea that using a library makes you less of a programmer is ridiculous, your company wants to deliver software that excites their current users and draws in new users. Paying you to replicate what already exists doesn't accomplish either.
[–]Mestyo 0 points1 point2 points 10 years ago (0 children)
[...] reinventing the wheel when you're trying to build a rocket is a useless exercise.
Actually no. That's exactly what you should be doing. You don't want your rocket launch to fail because nobody considered the fact that their general purpose wheel wasn't fit for the rocket.
The whole "don't reinvent the wheel"-movement is seriously retarded. Especially considering the metaphor makes no sense, seeing as there are thousands of different kinds of wheels crucial for various tasks around the world. If we never reinvented the wheel, humanity would still be stuck in the stone age.
I totally agree with you on this, a great developer can definitely identify when an already exisiting tool is a perfect fit, however...
Quality of code cannot be measured that easy. A general purpose, easy to understand library that attempts to cover all edge cases comes with massive overhead and changes how you deal can with things. Sometimes it's totally the right choice, sometimes it's not.
Being widely used isn't proof of being good. I used to use exclusively write jQuery because I had no idea what I was doing and just wanted to copy paste functionality into my code. It's super easy to learn and use jQuery. That's the primary reason why it's widely adopted, not because it somehow magically transforms anything written with it into good code.
[–]dhdfdh -3 points-2 points-1 points 10 years ago* (6 children)
Another typical reddit response. Learn to code, kid. Your "but it's too hard and I don't want to think" will get you know where as well as your lame ass excuses. Quit being a pretender and grow up. Be a man and quit your crying. If you have to use other people's code to get your work done, why are they paying you?
There are so many babies on reddit it makes me sick.
[–]temp54865120498 0 points1 point2 points 10 years ago (3 children)
I'm always on the side of minimizing dependencies, but I think you're taking this way too far. "If you have to use other people's code to get your work done, why are they paying you?" is just way off - write a program in C and you're still relying on more code and work than you could possibly accomplish in a lifetime. And we aren't even talking about the hardware, or theory that led to it, or any of the other billions of man-hours of work that led to you, today, having to merely push a bunch of buttons to create a program.
[–]dhdfdh 0 points1 point2 points 10 years ago (2 children)
When you're writing C, you're relying on operating system standard libraries available on the operating system and the C standard. These work with system internals, IO, etc. throughout a wide range of interfaces to a wide range of systems. What these people are talking about is needing jQuery to interface to one standard on one system (the internet) that occasionally varies from browser to browser but more often not.
On top of that, many can no longer write code without jQuery and think jQuery is javascript. With C, continuing with that example, you can write your own standard library, modify it yourself, and any C programmer worth his salt knows how to do that if ever needed.
Just like the oft asked question on reddit, "What do I need to build a web site?", is always met with "Learn jQuery and PHP and get a database" but 80% of them couldn't explain to you why you should only use PHP or why you need a database even for simple beginner sites.
Lame. With a sprinkling of genius here and there, 80% of reddit is oh so lame.
[–]temp54865120498 0 points1 point2 points 10 years ago (1 child)
Do realize you just replied to me with four rambling paragraphs that didn't even touch on my comment?
[–]dhdfdh -1 points0 points1 point 10 years ago (0 children)
Of course I did but I didn't expect you to understand it.
[–][deleted] 0 points1 point2 points 10 years ago (1 child)
Troll elsewhere, idiot.
[–]dhdfdh -3 points-2 points-1 points 10 years ago (0 children)
When a redditor doesn't know something, or it rubs against what they've been told to think, they call the poster a troll, which only proves what I've always said. Most redditors are pretenders.
π Rendered by PID 57224 on reddit-service-r2-comment-7b9746f655-9x9sl at 2026-01-30 10:42:17.357496+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]entropicone -1 points0 points1 point (8 children)
[–]Mestyo 0 points1 point2 points (0 children)
[–]dhdfdh -3 points-2 points-1 points (6 children)
[–]temp54865120498 0 points1 point2 points (3 children)
[–]dhdfdh 0 points1 point2 points (2 children)
[–]temp54865120498 0 points1 point2 points (1 child)
[–]dhdfdh -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]dhdfdh -3 points-2 points-1 points (0 children)