Node.js's npm Is Now The Largest Package Registry in the World (linux.com)
Linux.com highlights some interesting statistics about npm, the package manager for Node.js.
- "At over 350,000 packages, the npm registry contains more than double the next most populated package registry (which is the Apache Maven repository). In fact, it is currently the largest package registry in the world."
- In the preceding four weeks, users installed 18 billion packages.
- This translates into 6 billion downloads, "because approximately 66 percent of the installs are now being served from the cache."
- ping.npmjs.com "shows that the registry's services offer a 99.999 uptime."
- Every week roughly 160 people publish their first package in the registry
But what about the incident last year where a developer suddenly pulled all their modules and broke thousands of dependent projects? npm's Ashley Williams "admitted that the left-pad debacle happened because of naive policies at npm. Since, the npm team have devised new policies, the main one being that you are only allowed to unpublish a package within 24 hours of publishing it." And their new dissociate and deprecate policy allows developers to mark packages as "unmaintained" without erasing them from the registry.
Packages on npm still aren't signed - something that Java repository servers have had since inception.
Might as well just open up your firewalls and let the hackers inject whatever code they want.
Broken by design!
Captcha: "amateurs"
The amount of code needed to write a web application using Node.js is tiny compared to even PHP, which itself requires a lot less code than java or others. Performance is excellent, especially if you combine it with a web server for static content (like you would do with most web technologies).
Even without using frameworks (like Express), Nodejs is a technology that is well-suited for web applications. There is a learning curve because of the asynchronous paradigm (which can be mitigated if one uses promises) but overall the language is decent and favors good practices, such as MVC or code reuse. In the age of the API this is a fantastic platform to quickly put together a REST architecture.
Also, don't bash Nodejs for server-side code. Because of the self-contained nature of npm it can prove quite convenient for all kinds of applications and utilities, not just web applications. Whenever I need a quick script that involves database access or interacting with web services, I no longer use bash and tools like curl or wget, I get what I need a lot faster with Nodejs. There are so many excellent packages on npm it's just a no-brainer.
lucm, indeed.
Scary so many people are using what is arguably one of the worst languages ever created.
I've worked with a lot of programmers (or pseudo-programmers) over the years, and the ones who like JavaScript tend to be the most ignorant of them all.
I have worked (not just for hobbies) with C, C++, Pascal, Java, C#, the whole Visual Basic family, Perl, Python, PHP and JavaScript. I even worked with RPG and COBOL. Plus a whole bunch of shell scripting languages, from csh to PowerShell and even (OMG) JCL. On all the possible platforms you can think of, from smartphones all the way to Z series.
And guess what? I like JavaScript. I like how it started as a clunky way to make dynamic HTML menus to how it's now powering insanely high-volume websites. Is it the prettiest language? No. Does it handle dates properly? Jesus fucking christ no. Is it a marvel of software engineering? Is it a pure delight for the intellect like lisp, or an unbreakable workhorse like Ada? No. But IT WORKS. It does the job, quickly. In browsers, and even on mainframes (yes, Nodejs is supported on IBM mini and mainframes).
And it can be a gateway drug. Especially on the Nodejs platform JavaScript forces you to think of functions as more than a subroutine and this can be a terrific way to open your mind to the world of lambdas and closures - something that people who don't have a strong computer science or math background often struggle with.
True story. I had a coworker who just couldn't wrap his mind around callbacks and asynchronous execution. Which was a serious problem because at the time big data was becoming a thing and this meant map-reduce and all that. You know what finally made things "click" for him? jquery and ajax calls. Seriously. When he started to realize that he could pass a function as a parameter that would be executed after the ajax call came back, it blew its mind. Very quickly he jumped on the Nodejs bandwagon and he finally was able to work on data projects involving R and math-intensive Python code.
So there you go. Piss on JavaScript all you like, but don't try to use the "real programmers don't like JavaScript" because I'm a real programmer and I LOVE it. Maybe not my absolute favorite but definitely in my top 3.
lucm, indeed.