News for hackers. Stuff that matters.
Re:What the web platform can learn from Node.js: The Darwini... by drinchev on Wednesday December 16, 2015 @02:07PM (#10746434)
HN why all the hate agains NodeJS? It's still ( IMHO ) amazing.

Yes the versioning is sad and breaks almost every time. Also some modules look fragile and what was good yesterday is not good today anymore.

But still. Those are the reasons why I still stick with NodeJS :

1. Electron. Simply awesome - I copied 90 % of my app, changed Sequelize ORM to have it's storage to sqlite and boom. I have a webapp as a OS-packaged app.

2. Isomorphic code - I'm rendering React / Flux applications on the server-side and on the client-side. Reusing code, storage and syncing logic between them. Even my logger module works on client-side / server-side.

3. Front-end / back-end needs very similar skills - This is one of my top reasons to tell my clients ( I work as a freelancer ). There will not be a big deal for a front-end guy to write / understand backend code and vice-versa. Also it's javascript. The most popular language.

4. Libraries for most popular services - There is always something, someone wrote that is NodeJS or at least javascript.

P.S. I'm heavily using TypeScript nowadays. I think this solved a lot of NodeJS syntax/compiler problems.

Re:What the web platform can learn from Node.js: The Darwini... by pikzen on Wednesday December 16, 2015 @03:45PM (#10747175)
>1. Electron. Simply awesome - I copied 90 % of my app, changed Sequelize ORM to have it's storage to sqlite and boom. I have a webapp as a OS-packaged app.

And your users get to enjoy awful performance and insane resource usage for their app. How generous of you.

Also, the hate for NodeJS is because Javascript is a terrible language, no matter how many things you put on it (TypeScript, Babel, etc.). It's also because V8 performance is laughable.

Everything you mentioned is also mentioned in http://notes.ericjiang.com/posts/751 , which I believe does a nice job of explaining why NodeJS is terrible.

Re:What the web platform can learn from Node.js: The Darwini... by drinchev on Wednesday December 16, 2015 @04:03PM (#10747311)
I usually answer "Javascript is bad" statements with "English is not the most declarative language too, but ... it's the most common". Anyway I think JS is not a part of my statement, so I'm not going to agree on why JS sucks. It's opinionated. And contrary to logic it works good when you get used to it.

About Electron. I think nobody will build Photoshop or 3D Games ( at this point ) using it as a platform. I would personally decline if I have an assignment like this. But for apps like Slack, Visual Studio Code, Atom, etc, it works pretty good. Something more. I'm actually working on my own accounting app that suits my needs, which I would not be able to do for that limited spare-time I have these days If I used Objective-C / Swift.

Re:What the web platform can learn from Node.js: The Darwini... by pikzen on Wednesday December 16, 2015 @04:49PM (#10747624)
>But for apps like Slack, Visual Studio Code, Atom, etc, it works pretty good.

I won't get into a long rant, but aside from on OSX, Slack and Atom are slow, resource hogging and unstable piles of crap. Atom couples that with bad architecture and engineering choice, but that's not Electron's fault.

(Also, your comparison with English is bad. English naturally evolved to the state it is in today. Javascript was designed from scratch, and it still manages to be awful. Also, sorry, Javascript isn't the most common language, thankfully.)

Re:What the web platform can learn from Node.js: The Darwini... by tracker1 on Thursday December 17, 2015 @02:02AM (#10750047)
I have an i7 desktop with 32gb of ram.. a recent rMBP i7/16gb-ram for my personal labtop, and another work issued one... I also use VMs with Linux frequently... VS Code is one of the better code editors I've used. Given, I'm on fast machines with plenty of ram... I really haven't had a serious problem with it... hell, my browser typically uses up way more ram than any other single application on my computer... it still does the job well enough...

That's the key right there "Well enough"...

Re:What the web platform can learn from Node.js: The Darwini... by ufo on Wednesday December 16, 2015 @06:13PM (#10748119)
> Atom couples that with bad architecture and engineering choice

How? (Other than choosing HTML and JS in the first place)

Re:What the web platform can learn from Node.js: The Darwini... by porker on Wednesday December 16, 2015 @06:23PM (#10748178)
> I won't get into a long rant, but aside from on OSX

Ah, so they're better on OSX? On Windows 7 all the slack.exe processes are currently using 780MB RAM in total, and I'm only signed into 3 Slack communities.

Shocking!

Re:What the web platform can learn from Node.js: The Darwini... by vdaniuk on Thursday December 17, 2015 @04:03AM (#10750331)
>Slack and Atom are slow, resource hogging and unstable piles of crap

Atom is my primary editor and I am extremely satisfied with it. Your self-righteous arrogant attitude is strange and has nothing to do with objective, rational criticism.

Re:What the web platform can learn from Node.js: The Darwini... by pcwalton on Wednesday December 16, 2015 @07:03PM (#10748448)
> It's also because V8 performance is laughable.

Compared to what? Objective-C? Dalvik? (JavaScript VMs generally achieve better performance than those for systematic reasons.)

Re:What the web platform can learn from Node.js: The Darwini... by cdnsteve on Wednesday December 16, 2015 @02:19PM (#10746527)
Some environments cannot handle all the churn. Things breaking for no reason are delivering no value to the customer or your product.
Re:What the web platform can learn from Node.js: The Darwini... by drinchev on Wednesday December 16, 2015 @03:02PM (#10746874)
Yep, but environments also change. Microservices are so popular nowadays and I see so many libraries written by Yahoo, Microsoft, Airbnb, etc., which are NodeJS oriented.

And no. Things break all the time and still give value to customers. Things break for A reason and still give value to customers.

Yep it would be cool and more non-breaking if 20-years of Java experience was injected into NodeJS, but I bet in 20-years NodeJS will be even better than the popular alternatives these days.

Re:What the web platform can learn from Node.js: The Darwini... by xemdetia on Wednesday December 16, 2015 @03:49PM (#10747229)
I think the point trying to be raised is that node seems to be built on a mindset of endless churn where some of us need to be able to write software that we aren't going to be able to CI and develop on for a year and expect it to work the same time next year without further development. Also like some have mentioned a high severity CVE that comes out turns into 'how fast can I move to fix it and then go back to something else.'

Sometimes the value to customers is just a system that works without downtime or failures, and the next increase in value is not even related to something that was built on this bleeding-edge packaging model. The only types of development projects that seem to benefit from it are the kind of project that can dedicate a full-time or mostly-full-time developer to it forever (forever being the lifetime of the product/service).

If dependency issues crop up every few months for a perodically updated project that could almost be a death knell, if you have to pivot or do major work on the backend all of a sudden you could come back to just a broken set of shambles. So the only thing it fits is a really strange gap between hobbyist/side project and stable production which ends up being just plain risky for a technology choice.

Re:What the web platform can learn from Node.js: The Darwini... by drinchev on Wednesday December 16, 2015 @04:09PM (#10747355)
Upvoted your comment. I mostly agree.

IMHO Node isn't built on this mindset ( endless churn ). I think it's just rapidly evolving. It's just enthusiasm by the community.

As far as my experience goes, I just put more effort in finding the right module rather than finding >any< module that will do the work. Afterwards I can usually npm-shrinkwrap, upload to DigitalOcean and leave forever.

Re:What the web platform can learn from Node.js: The Darwini... by Touche on Wednesday December 16, 2015 @03:45PM (#10747184)
No one's suggesting using Node.js in the space shuttle. These are mostly disposable web apps we're talking about.
Re:What the web platform can learn from Node.js: The Darwini... by klodolph on Wednesday December 16, 2015 @08:41PM (#10748910)
TypeScript is awesome, and using the same code client and server is also a great benefit. However, I would like to inject a little bit of skepticism. JavaScript is not the most popular language. TIOBE, for example, ranks it #8. It's a great language for you, but last time I checked, the Java and Ruby shops were still hiring. And it's a bad sign when your community isolates itself by creating its own jargon, like "isomorphic". "Isomorphic" means that something has the same shape, but the term we're really looking for is "portable", "runtime agnostic", "environment agnostic", or something like that. Java called it "write once, run anywhere" and it's clear that the terminology used here is more driven by marketing than by actual technology.

But don't take it personally. HN truly has hate for every language (name a language it doesn't hate!), and the internet supports sharing your hatred with others more than it supports sharing love.

You've found a system that earns you money by writing software, and that itself earns you some respect here.

Re:What the web platform can learn from Node.js: The Darwini... by tracker1 on Thursday December 17, 2015 @02:04AM (#10750053)
And these Java and Ruby shops never touch JS code? I'd bet at least half of them do.. same for .Net shops for that matter, even some Python shops... it may not be the primary language for the job, but almost every job with a web interface will contain at least some JS... no other language is as pervasive.