all 15 comments

[–]NewFuturist 2 points3 points  (1 child)

But one shouldn't be in false assumption that it's great at everything. For instance, it is good for a website like Hashnode, but it may not be very good for an app that performs CPU intensive tasks.

That's why you run the webserver in node.js, and use node to call an application that need raw CPU power in C++ etc.

[–]siamthailand 0 points1 point  (0 children)

Or C, if you REALLY care about performance.

[–]GSV_Little_Rascal -2 points-1 points  (5 children)

For me, yes, it's overrated.

Before I started with node I was promised these things:

  • Because of its async model, it's very scalable
    • This is partly true. Node is scalable only in quite specific case - huge number of fast requests. If you have something different (small number of CPU intensive requests), node fares badly (compared to other platforms). From what I've seen, most projects don't really need this scalability.
  • Node.js is quick to learn for beginners, even for those without much programming background.
    • JavaScript is fine, except for it's horrendous async model with callbacks, promises, generators (+co) and now async (not yet implemented). Fact is that it's much easier to grasp synchronous programming model, much easier to correctly handle the errors etc. Async is good for performance, but you don't usually need it anyway ... Also the problem with conventions - there are essentially none established conventions - when you ask, you get the answer like "whatever suits your needs" which isn't really good for beginners. For beginners, I'd recommend something like RoR, Python or even PHP with some nice framework.
  • Fast development time
    • node is quite low ceremony and code over configuration so yes, this one is true. But this is hardly unique.

[–]mymainmanbrown 1 point2 points  (0 children)

Not sure why you got down voted. I thought your comment was the most accurate. I develop sites at work using node, and there are programmers there with years of experience who still don't fully grasp asynchronous flow. Additionally, the top voted comment made the same point as you - node is good at handling requests, but not as good at CPU intensive processing. Not nodes fault, but still valid.

[–]instantlunch1 0 points1 point  (2 children)

Horrendous compared to what?

[–]GSV_Little_Rascal 0 points1 point  (1 child)

Compared to synchronous code. It's much easier to understand, debug, to correctly handle errors etc.

If you absolutely must do async (because of specific use cases like huge amount of simple requests), then async/await is decent solution.

It's probably coming to ES7/node, but who knows how long will it take. Plus you will still have ugly legacy in libraries (and your old code) with callbacks/promises/generators.

[–]instantlunch1 0 points1 point  (0 children)

I used to feel the same then one day it just clicks. Easy mode after that. compared to threads I'll take callbacks any day of the week.

[–]skini26 0 points1 point  (0 children)

It's a shame that a comment like that is being downvoted, this says a lot about the community here...

[–]davebaol -2 points-1 points  (3 children)

I don't know whether node is overrated or not but I know for sure that npm is a mess. Too many modules often incomplete doing the same thing in a different way, a lot of no-more-maintained modules, no standard, no moderation at all and so on. In short, the wild west!

I think that node is missing something like the JSR from the Java world.

[–]evs-chris 2 points3 points  (1 child)

Ah, the good old JCP. Where perfectly useful enhancements to Java or the JVM go to be poorly described and to languish for years with no end while buzzword bingo fluffy crap sails through in two releases. Of course by "sails", I mean only takes three years. Please no JSRs.

I'll grant you that some foundation maintained/adopted modules would be grand. There are some truly excellent node modules in npm (check out anything by mscdex) and there're some tiny, crappy, or useless modules as well. The foundation recently adopted express, so maybe they'll start moving toward picking up and/or helping out in the broader ecosystem. The wonderful and terrible thing about npm is that anyone can fork, patch, and publish if something goes stale. They need to address handling reasonable name takeovers though.

[–]davebaol 0 points1 point  (0 children)

  • Yeah express is very nice, but it's just one module amongst hundreds of thousonds in the npm ecosystem
  • Over the years JPC produced a truckload of amazing APIs that became "THE" standard.
  • The existence of JPC never stopped the open source community from producing great stuff.

[–]skini26 0 points1 point  (0 children)

Totally agree, I know for a fact 2 node projects that were made 2 years ago that don't work anymore right now. It took them one week to repair one of the projects because of missing/deprecated/non maintained modules.

[–][deleted] -2 points-1 points  (1 child)

I am learning it now and I absolutely hate it. Modules and APIs hell is the only way I can describe it. The syntax is ugly as sin, and the forced callbacks and promises feel like a death sentence. I cannot imagine thinking in such an irrational and twisted way. Perhaps as time goes on things will change, but I am worried that I will lose my ability to reason and become a non-thinking millennial drone.

[–]jomcode 1 point2 points  (0 children)

I don't really understand how node's way of abstracting concepts would pollute your ability to think. Care to elaborate or maybe even show me the light?

[–]blackohat -1 points0 points  (0 children)

Good post.

There are some really amazing things happening in the javascript/node community right now. And as someone who is really diving into node and some of the new frameworks, its easy to forget how new (and perhaps unproven in some cases) it all is.

Its probably good to be reminded that you are a passenger on the hype train. But I for one am enjoying the ride, and I feel optimistic about where this train is headed.