Live data from Hacker News

Things I Regret About Node.js [video]

youtube.com

131–140 of 502 posts

Re: Things I Regret About Node.js [video]

#131
post #92

Earlier quoted context omitted.

Having the same language allows to share some code between frontend and backend. This can be used to prerender your SPA on the server, for example, or to share some logic with the client to enable offline usage.

Being able to share code is really not that great because you don't share that much code between front and back in reality. Being able to share the paradigms , structure , mindset and tooling (like linters, formatters, code generators, packagers, whatever..) is what's awesome. You remove a whole lot of context switches and cognitive dissonance, smoothing the train of thought which greatly eases the expression of idea…

> you don't share that much code between front and back in reality

Good luck rendering React server-side in Go or Ruby.

Re: Things I Regret About Node.js [video]

#132

Earlier quoted context omitted.

This fails from the false dichotomy of speed of execution vs speed of development (which includes fixing bugs). Well written languages optimize to a certain weighted preference of the two and some languages deliver more of _both_ than others. For example; Typescript is fast to write. and Golang is reasonably quick to write, _and_ execute. Both should have ~15% less bugs than javascript, potentially making them faster…

what is the 15% figure from? I'm suddenly working with a dynamically typed language (elixir) coming from scala and I do find more bugs. Would like some hard evidence to support that so just curious.

15% is from this paper as I recall it: http://ttendency.cs.ucl.ac.uk/projects/type_study/documents/...

https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type-q...

Re: Things I Regret About Node.js [video]

#133

I think it's quite interesting to see that originally node.js was presented as a bloat-free alternative to "enterprise languages" like Java, C# or even Python or Ruby. A lot of complexity was subsequently added in an ad-hoc way which has resulted in (for example) a package management system that's wildly out of control. It's very popular of course, so I'm definitely not arguing that metric. However, the stuff that wa…

That's a good example of the Innovator's Dilemma: the enterprise incumbent is unseated by some "crappy" lightweight solution that is easier to get up to speed and solves enough of the problem. The complexity, accidental and essential, comes later.

Re: Things I Regret About Node.js [video]

#134
post #46

Interesting that he's unsure about Go. Would be nice to hear about why. One huge strength about Node (&Deno) is having the same language and tools on the front end and back end. Its a huge benefit to have a team on one language, even if it might not be the optimal choice. I'm not sure if that is the problem he had with Go though.

At the end of his talk, he mentions possibly using Rust or C++ instead of Go, I would gues for maximum possible performance.

Re: Things I Regret About Node.js [video]

#135

Earlier quoted context omitted.

This fails from the false dichotomy of speed of execution vs speed of development (which includes fixing bugs). Well written languages optimize to a certain weighted preference of the two and some languages deliver more of _both_ than others. For example; Typescript is fast to write. and Golang is reasonably quick to write, _and_ execute. Both should have ~15% less bugs than javascript, potentially making them faster…

Once you've paid the upfront cost of learning Golang, I might agree with you. But then again, in particular when building a full stack app (and not when on a team that has back end and front end specialists), it's helpful to use the same context (JS/NPM) when devving. People are bad at context switching.

That's why I mentioned TypeScript. It can run on both "sides", and has faster speed of development (as I defined it above, considering bugs) ...

Re: Things I Regret About Node.js [video]

#136

I'm glad to hear he (and the Node community in general) has come back around to promises. I remember the very early version of Node.js that had them (looks like they were added in v0.1.0 and removed in v0.1.30), although they weren't true chainable promises we have now.

I find it really bizarre that Node still doesn't have full promisified built-in libraries. It's not like it'd break existing APIs.

I think they're testing natively provided promise APIs with the fs module.

https://github.com/nodejs/node/pull/18297

It's of course not a full promisification of every built in, but it looks like theyre at least trying it out.

Re: Things I Regret About Node.js [video]

#137

This was one of the more interesting software talks I've listened to recently. I like that it was very real - there are serious, serious problems with Node.js, and the fact that even the creator acknowledges these problems caught my attention. I'm also a long-time user of Dart, so when he brought that up, and compared TypeScript to its shortcomings, I definitely agreed. That being said, even with the Deno project, I'…

> performance and security from running JavaScript outside of a browser. I'm just now building a node app to filter point clouds, so lots of number crunching. In two days I've got something in javascript that's faster than the C++ solution I've been working on for a week. Mostly because javascript/node makes it trivial to parallelize file IO while doing work in the main thread. This app reads 13 million points from 1…

Did you use typed arrays, or did the benefit of async I/O outweigh the cost of using double-precision floats for everything?

Re: Things I Regret About Node.js [video]

#138
post #127
post #95

It's interesting to hear him say that npm and node_modules are regrets since lots of complaints about Go packaging from people new to Go ask for something similar...

Yeah I was surprised about node_modules as well. I think that's actually a killer feature (that we don't need $NODE_PATH or virtualenv or similar)!

I've found it has certainly helped with debugging. I find it nice that all of my project's code is in one directory.

To save on disk space, use pnpm, best of both worlds!

https://github.com/pnpm/pnpm

Re: Things I Regret About Node.js [video]

#139
post #77
post #64

Earlier quoted context omitted.

> The interfaces between server- and client-side code should be well-defined and language-independent. They dont have to be and that is the point. If you write JS/TS front and back you can make everything much simpler with the associated benefits.

But in what specific way way does it make it simpler? What are the tangible benefits? I've been working in a Node/React environment for the last 2 years and there is virtually no overlap between the code we use on front- vs backend projects.

Because not everyone is using React type frameworks on the frontend? There is old fashioned javascript still, and because I know it on the front end, I know it on the backend.

Re: Things I Regret About Node.js [video]

#140

I'm glad to hear he (and the Node community in general) has come back around to promises. I remember the very early version of Node.js that had them (looks like they were added in v0.1.0 and removed in v0.1.30), although they weren't true chainable promises we have now.

I find it really bizarre that Node still doesn't have full promisified built-in libraries. It's not like it'd break existing APIs.

Node 10 has fs, at least:

   require("fs").promises.readdir(".").then(console.log)
Post reply on HN