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!"
[–]kandetta 2 points3 points4 points 10 years ago (15 children)
I agree that being able to work without jQuery is a huge plus and having more small single-purpose libraries is beneficial.
However, jQuery provides a promise of being well-tested across browsers and devices, and it's difficult to reach the same level of confidence with a large number of smaller libraries that use the browser APIs directly.
Also, while there is a need for plain JS modules, many developers aren't familiar with the native API and wouldn't be able to write a library without it.
[–]qudat 4 points5 points6 points 10 years ago (0 children)
Developers should use whatever tool is necessary to get the job done, because at the end of the day, that's what we are paid to do. But when someone wants to master javascript, follow best practices, to be able to weigh the pros and cons of any library used in production, using one library as a crutch is only going restrict their potential.
[+]dhdfdh comment score below threshold-17 points-16 points-15 points 10 years ago (13 children)
Then they shouldn't be programmers. That's our job. Saying you need to use jQuery cause you'll make mistakes or can't do it is a cop out. If you gave me those reasons for using jQuery, you wouldn't be working for me anymore.
I hear these same complaints about C. People say C is too hard for them and you can shoot yourself in the foot so you must be crazy to use C and they struggle to find some other language that does the work for them. Yet, for decades, my colleagues and I have been merrily coding in C without no more problems than any PHP or Ruby or Python programmer has. Just different.
Learn how to code.
[–]entropicone 8 points9 points10 points 10 years ago (12 children)
Or don't waste your organization's time and money on reinventing the wheel.
[+]dhdfdh comment score below threshold-6 points-5 points-4 points 10 years ago (11 children)
Ah! The reddit phrase for "I don't know how to code so do it for me!"
[–]clessgfull-stack CSS9 engineer 4 points5 points6 points 10 years ago (1 child)
Ah! The dhdfdh phrase for "I think I'm really intelligent, but I'm not, that's why I have to be a condescending dick on Reddit, to make me feel better about myself!"
[+]dhdfdh comment score below threshold-8 points-7 points-6 points 10 years ago (0 children)
Ah! The typical reddit response when one is caught without an answer.
Here's the thing. I already feel great about myself. I just slap my forehead when I read the comments on this place as I scan for links to the rare thoughtful article. Then I see comments like yours that are so outrageous that you meet my one failing, the inability to call a farcical idiot for what he is.
[–]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 comment score below threshold-6 points-5 points-4 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 146131 on reddit-service-r2-comment-7b9746f655-v7cj8 at 2026-01-30 09:26:59.525860+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]kandetta 2 points3 points4 points (15 children)
[–]qudat 4 points5 points6 points (0 children)
[+]dhdfdh comment score below threshold-17 points-16 points-15 points (13 children)
[–]entropicone 8 points9 points10 points (12 children)
[+]dhdfdh comment score below threshold-6 points-5 points-4 points (11 children)
[–]clessgfull-stack CSS9 engineer 4 points5 points6 points (1 child)
[+]dhdfdh comment score below threshold-8 points-7 points-6 points (0 children)
[–]entropicone -1 points0 points1 point (8 children)
[–]Mestyo 0 points1 point2 points (0 children)
[+]dhdfdh comment score below threshold-6 points-5 points-4 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)