Live data from Hacker News

Hard-won lessons: Five years with Node.js

blog.scottnonnenberg.com

151–160 of 365 posts

Re: Hard-won lessons: Five years with Node.js

#151
post #54

Earlier quoted context omitted.

I see some merits. I am not sure I buy using JavaScript based on performance/dev speed ratio though. Lua is even faster, lighter weight and has clean, logical semantics. I guess I'm just trying to decide if having a large talent pool and tons of modules is good enough.

I would watch it with that "large talent pool". As is typical in the language du jour, there are tons of worthless imposters going around selling Node.js skills. However, it's even worse in the case of JavaScript because since it uses the "same language", some people assume that light front-end scripting qualifies as real backend development experience. "Tons of modules" is also a misnomer, because a much larger than…

> there are tons of worthless imposters going around selling Node.js skills. However, it's even worse in the case of JavaScript because since it uses the "same language", some people assume that light front-end scripting qualifies as real backend development experience.

Seconded.

I'm working for a company building an Ionic app, and they hired two junior programmers with "angular experience" (both of whom had built angular apps before) to be the developers on the project.

I'd used KnockoutJS but never ES6, Angular (1 or 2), TypeScript, written a mobile app, plus the RxJS concept was new to me, as was thinking asynchronously (I told them I wasn't a good fit for the project).

Yet while the developers have struggled to do their work and the schedule has slipped, I've been able to pick up the concepts, write half the app and solve the juniors' problems despite my unfamiliarity with it all.

Glad to see nearly 20 years' experience programming makes a difference, even though none of it was with today's "hot" technologies.

Re: Hard-won lessons: Five years with Node.js

#152
I have a hypothesis - I think elixir,golang and java+vertx are carefully designed, highly productive and high performance frameworks.

However with Reactjs + React Native, you have an unavoidable component of your company that is in javascript (or will have soon). Why would you not do JS based server runtime ? With typescript/flow, you actually have an excellent language with no compile steps. Plus, and probably the most important, you have a cross pollination of engineering talent and time .

I think its the same case with data science - it is much more productive to build a python based data science startup, because of flask+sqlalchemy+jupyter+pyspark+numpy+tensorflow+keras. Yes, you can use scala or java... but you lose that one-language-to-rule-them-all productivity multiplier.

From a quick prototyping point-of-view, i think golang would have theoretically killed nodejs.

Re: Hard-won lessons: Five years with Node.js

#153
post #15

I can't imagine choosing to write Javascript on the server, but considering its popularity I'm wondering if I'm wrong. So I'm curious as to the reasons people chose Node.js and whether you would recommend it, anybody willing to share their experiences?

I only know JavaScript (and I know it quite well). Why learn a whole other language, when Node gets the job done just fine?

That makes me wonder, what number of "choose to use JavaScript" is compared to "have no real choice, because JS is the only language they know".

Re: Hard-won lessons: Five years with Node.js

#154
post #15

I can't imagine choosing to write Javascript on the server, but considering its popularity I'm wondering if I'm wrong. So I'm curious as to the reasons people chose Node.js and whether you would recommend it, anybody willing to share their experiences?

I'm the biggest JS-on-the-server sceptic of them all, given my past experiences. But this was pre-typescript. If a TypeScript ORM with automatic schema migrations and decent expressiveness comes around, I'd be willing to give NodeJS another shot. But so far, nothing comes even close to the productivity of Django + ORM + Django Rest Framework. For your typical CRUD app, this will walk circles around any current JS sol…

I'm on the same boat. Django or Rails are so much more productive for me that I feel that most of the Node.JS love for this sort of domain comes from people who have never tried anything better.

Re: Hard-won lessons: Five years with Node.js

#155
post #75
post #15

I can't imagine choosing to write Javascript on the server, but considering its popularity I'm wondering if I'm wrong. So I'm curious as to the reasons people chose Node.js and whether you would recommend it, anybody willing to share their experiences?

NodeJS has a handful of things that tend to get brought up. Callback soup and difficult error handling. Both are resolved by promises. Once you get the hang of promises, you are capable of doing concurrent asynchronous tasks in a manner that would be significantly more difficult in any other language. On top of that, NodeJS is very, very fast. Compared to Python or Ruby, straight computing is significantly faster, bu…

> Once you get the hang of promises,

.then( you realize it's just a callback..

Re: Hard-won lessons: Five years with Node.js

#156
post #126

Earlier quoted context omitted.

I've used nodeJS at 3 of the past 4 startups I've worked at (currently using PHP). I had a hand in choosing it at all those 3 places and my main reasons boiled down to: 1. most devs know JS (so it's easier to hire & onboard new devs) 2. while everyone claims node's dependencies are hell, I love the choice available (although over time, it's tiring). 3. The community is generally awesome (helps during meetings, online…

> while everyone claims node's dependencies are hell, I love the choice available (although over time, it's tiring). So... at one place I work, we use nodejs. There are so many modules added using so many files, that we ended up not being able to use our packaged application - extracting the package into a holding dir before moving into place meant that we ran out of inodes on the filesystem (stock 8GB ubuntu ext4 cl…

Seriously, Node has been the worst platform when it comes to managing its ridiculous (in a bad way) ecosystem of packages where there's no standardized solution for anything.

Re: Hard-won lessons: Five years with Node.js

#157
post #138
post #127

Earlier quoted context omitted.

> I can get a small web site serving JSON REST requests and memcache up in ten minutes with a simple Maven/Gradle build and full IDE integration Java guys always say how they have really developed tooling and look down on other languages. The problem is those nice tools have become a hindrance as well. You can't develop in Java/Kotlin if you don't use those huge complicated tools. I can't speak for all, but at least…

> huge complicated tools. Oh please. Let's be real, Maven is not even remotely more complicated than the typical package.json, webpack.config.json, .babelrc triple you need for any useful NodeJS project (though you can put the .babelrc into the package.json, I've heard that's the way to do it at the moment). I was so taken back that nowadays JS needs a build step too. But it's a "transpiler", not a "compiler" - cause…

You don't need a build step for Node.js, 93% of ES6 features are already included in the latest version. Babel is more for client side than anything and that's because browser vendors take a while to implement new standards, so yeah JS has unique challenges and constraints as the de facto language of the web.

Re: Hard-won lessons: Five years with Node.js

#158
post #138
post #127

Earlier quoted context omitted.

> I can get a small web site serving JSON REST requests and memcache up in ten minutes with a simple Maven/Gradle build and full IDE integration Java guys always say how they have really developed tooling and look down on other languages. The problem is those nice tools have become a hindrance as well. You can't develop in Java/Kotlin if you don't use those huge complicated tools. I can't speak for all, but at least…

> huge complicated tools. Oh please. Let's be real, Maven is not even remotely more complicated than the typical package.json, webpack.config.json, .babelrc triple you need for any useful NodeJS project (though you can put the .babelrc into the package.json, I've heard that's the way to do it at the moment). I was so taken back that nowadays JS needs a build step too. But it's a "transpiler", not a "compiler" - cause…

No I want to use the command line.

https://maven.apache.org/guides/getting-started/maven-in-fiv...

Maven quick start first command:

> mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Then it generates stupidly deep Java structure.

and next you have to write a verbose xml. They even say:

> The POM is huge and can be daunting in its complexity

All of this stuff is verbose and built to be generated by IDEs. It's not clear, it's not concise.

Re: Hard-won lessons: Five years with Node.js

#159

Earlier quoted context omitted.

I've got over a decade of professional experience in C#, Python, and Java. I'd consider myself a Java developer before all else, yet I still turn to Node.js for proof of concept projects because certain things are just quicker to implement. Here's the major caveat, out of, say 100+ PoC/prototype projects I've ever done, I've taken two to 'production'. I put production in quotes because they were actually internal ser…

pm2 + newrelic = problem solved?

Or just Systemd

Re: Hard-won lessons: Five years with Node.js

#160
post #15

I can't imagine choosing to write Javascript on the server, but considering its popularity I'm wondering if I'm wrong. So I'm curious as to the reasons people chose Node.js and whether you would recommend it, anybody willing to share their experiences?

So I'm curious as to the reasons people chose Node.js

For work that is almost entirely IO bound Node is really fast and easy with asyc concurrency that works really well. Compared to most other solutions out there will you get a very fast solution very quickly. For problems which basically reduce to

  -Wait for GET/POST request 
  -query a bunch of databases based on request
  -return result of DB queries as JSON
Node works really well.
Post reply on HN