Hacker News new | past | comments | ask | show | jobs | submit login

Loved? Well, it's a point of view. I personally hate it, due to the tooling and the dependency management (npm and yarn are catastrophic, an "hello world" example with React downloads on average more than 100 packages).



My "secret" weapon against tooling creep is https://parceljs.org it really lives up it its tagline.


I wish that was true.


It is :)


As much as I dislike Javascript OP is right. The latest stack overflow survey[1] puts #7 on most loved languages and it's not even in top 25 most dreaded ones.

[1] - https://insights.stackoverflow.com/survey/2018#most-loved-dr...


I do wonder how much of that love is from devs who basically only know JS, and have done nothing by web stuff.


Can't speak for anyone else... but will say I'm far more productive with full-stack JS. My second most familiar language is C#, followed by Ruby, VB, Java and several other languages. Most of the productivity outside the browser is because of Node + NPM though. Also the browser gives you a much more rich rendering target than pretty much any common UI platform out there. Including some very nice abstractions.

In the end, it isn't the best choice for many things, but it's good enough for most things. As such, it's what I tend to reach for first, since getting something working takes less time, and gets in my way so much less. Windows, Mac, Linux via Node, Electron, Carlo (node + installed chrome), not to mention Cordova (iOS/Android) and React Native. Best of all, I don't have to deal with a lot of issues seen in other platform specific tools.

It's so much closer to write once, run everywhere with less friction than anything else that has been done in computing. Aside from trivial projects.


I hear a lot of complaining like this from Java devs. Oddly, they are often okay only knowing one language (Java). The exact words from a Java dev were, "well, when all you have is a hammer, everything looks like a nail".


And #2 in most wanted, right after Python.


On the plus side, once you built it, the only dependency you have is the browser, and you can distribute it however you want since it's cross-platform compatible.


>> the only dependency you have is the browse

HA! maybe this is technically true, because in the end that's where it runs, but have you looked in your modules folder at any substantial project lately?

The dependencies run deep and they run wide...



Having just inherited a legacy python project where I couldn't use a library due to conflicting dependencies on ancient, incompatible versions of a dependency's dependencies... I'd kill for the npm way of dealing with it. To each his own I guess.


That's interesting, what happened? I've always loved the simplicity of a couple of inhereted requirements files in Python depending on the environment. Pin the version as necessary and call it a day. usually my requirements files for local, dev, QA and production are 30 lines total. Js land is a complete shit show of ever changing dependencies with an ungodly amount of sub dependcies that will break every thing


Typescript and other transpilers especially, seem to be quite resouce hungry, slow and a pain to configure — always getting in my way :(


What's 'catastrophic' about Yarn?


Not exactly Yarn or NPM. The problem is that JS is suffering from extreme dependency hell, due to overly fragmentation of modules. It's appalling. It is not a good thing starting a project, doing a install and having hundreds and hundreds of modules on node_modules, some with less then 50 lines of code. Of course things must be modular, but unwraping everything in a folder like this is far from good.


Isn't the issue here basically that JS doesn't have a "standard" authorized library, like Java or C# and NPM has basically become the standard library?

Having someone like Google steward a "standard" library (and it could even be distributed using NPM), would pretty much bring JS dependency management at par and beyond Java or C#.


hmm maybe you're onto something here..


I'm curious: why is it bad? I very, very rarely have to delve into my node_modules folder to take a look at something.


You should take a proper look once, you'll be amazed at all the different modules implementing the same functionality over and over again (e.g. globbing, promisifying, or the myriad of `is-*` single-function packages).

Why is that bad? It's a huge waste of effort, increases the burden on anyone who's maintaining a package using those micro-libraries, and will guarantee more unpatched security vulnerabilities and unmaintained packages in the long run.


The leftpad fiasco (which I believe NPM has now mitigated), and the recent security issue where a certain popular package was uploading any passwords it found showed the current dangers with NPM.


The lesson from left-pad should have been to vendor all your deps rather than bet your org on third parties with no SLA commitment to you.


I'm not arguing about the security of NPM, rather the idea that multiple modules is a bad thing.


NPM and Yarn are both working on approaches that would replace having a separate unpacked `node_modules` folder for every project: "Yarn Plug 'n Play" and "NPM Tink".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: