Live data from Hacker News

Node.js - A Giant Step Backwards

fenn.posterous.com

31–40 of 117 posts

Re: Node.js - A Giant Step Backwards

#31
post #18

If you're interested in keeping up to date with the project I describe below, please follow me on twitter @NirvanaCore. I had many of the same concerns with node.js. Every time I attempted to wrap my head around how I'd write the code I needed to write, it seemed like node was making it more complicated. Since I learned erlang several years ago, and first started thinking about parallel programming a couple decades a…

You know what I'm going to say, right? This is HN, we have but one great commandment, which we repeat like parrots! Ship it tomorrow! ;) Yes, you have overlooked something important, there will be something to be embarrassed by -- whether it turns up next week or next decade -- and we'll all have a good laugh. Don't sweat it. And don't worry that the thing isn't finished; the kind of geeks who might sign on at this s…

I agree completely. I just need to close the loop, so that people who use it are inspired to add to it, rather than frustrated trying to understand it. Once I can provide a trivial example of using it that makes sense, I'll ship. I can promise you I'm not holding out for some ideal!

I also shouldn't predict the end of the ops department, until I've had it running in production with a significant number of users.

I think it would be better to say- my goal is to have the ops department working on really interesting stuff, rather than shepherding a fleet of servers, every one of which has a different configuration.

Re: Node.js - A Giant Step Backwards

#32

Earlier quoted context omitted.

> I recently wrote a project that needs to do 100's or 1000's of possibly slow network requests per second. The first try was Ruby threads. That was a disaster (as I should have predicted). I had an entire 8-core server swamped and wasn't getting near the performance I needed. I don't mean to be offensive, but welcome to at least the 1980s. We've known this doesn't scale for ages. The fact that you even tried it and…

So you hold unfair prejudices against Node?

What prejudices do I have against Node that are unfair?

Re: Node.js - A Giant Step Backwards

#33
post #23
post #22

The V8 team is thinking of adding yield/defer support to make programming in Node neater. There's hope yet. Meanwhile there are other choices that are about as easy, like Python libraries and Google's Go. Too bad they don't have the same zealous community support.

Hmmm, interesting! I hadn't heard about that - Do you have a reference URL?

http://youtu.be/seX7jYI96GE?t=52m35s

Mentions they're working closely with the node team here. And that whole talk is about fixing up JavaScript into a modern language, remove the weird syntax quirks around classes, modules, etc. Say what you mean instead of the weird closure soup.

Re: Node.js - A Giant Step Backwards

#34
post #12

Earlier quoted context omitted.

I heartily agree - I may have overstated my case slightly with the "Giant Step Backwards", it just definitely seemed that way on initial experience. It also made for a better title than "Confusion, Then Indifference, Slowly Turning Into Understanding & Affinity"

It's kind of a dick move to make a inflammatory, flamebait blog post and then later admit you didn't actually know what you were talking about. Maybe you should have actually understood the technology you were working with before making knee-jerk snap judgements.

How was your first experience with node.js different than Fenn's?

Re: Node.js - A Giant Step Backwards

#35

Earlier quoted context omitted.

So you hold unfair prejudices against Node?

What prejudices do I have against Node that are unfair?

Citing your sources would be a great way of asserting your credibility. "Every blog post I have read that says the opposite" doesn't count.

I'd love to read some well-thought-out arguments against node from people who've seriously given node a shot, but I haven't seen any. Granted, I haven't been looking for them, so please prove us wrong.

Re: Node.js - A Giant Step Backwards

#36
Nice article. Be sure to read the comments, as the author links to a library that makes the second example easy to rewrite in a short and elegant way. https://github.com/caolan/async#forEach

Also the first example, the cache hitting and missing, could be rewritten with async, too.

    async.waterfall([
      function(callback) {
        asynchronousCache.get("id:3244", callback);
      },
      function(myThing, callback) {
        if (myThing == null) {
          asynchronousDB.query("SELECT * from something WHERE id = 3244", callback)
        } else {
          callback(myThing)
        }
      },
      function(myThing, callback) {
        // We now have a thing from the DB or cache, do something with result
        // ...
      }
    ]);

Re: Node.js - A Giant Step Backwards

#37

Nitpick: Node doesn't do anything in parallel, it can't, it does things concurrently.

Nitpick: Incorrect. Node.js uses a thread-pool to run things which are necessarily blocking, such as some POSIX functions.

sausagefeet meant we can't get to that thread pool from user code.

Re: Node.js - A Giant Step Backwards

#38
post #20

I think it's a job for the jquery team, a node.js for the rest of us. Once they get jquery mobile out the door it would seem to be the most obvious next project.

Huh? I don't follow -- do you mean that jQuery is teaching people to use anonymous functions everywhere and that's sometimes similar to how some people code with node?

Re: Node.js - A Giant Step Backwards

#39
post #18

If you're interested in keeping up to date with the project I describe below, please follow me on twitter @NirvanaCore. I had many of the same concerns with node.js. Every time I attempted to wrap my head around how I'd write the code I needed to write, it seemed like node was making it more complicated. Since I learned erlang several years ago, and first started thinking about parallel programming a couple decades a…

Regarding 1), it is a great way to do things (never copy files around), but just make sure you have good release tools built around the db records. The approach that we use is that when things are published they automatically have a 'dev' release record for that version for the user that published it (so they can test) and individual versions have to be promoted ultimately to 'prod' for 'everyone'. The version you see is basically the most recent version released to your context (basically you and/or what machine you are on). The key is having great tools built around this process before something blows up and there is an emergency.

Re: Node.js - A Giant Step Backwards

#40
post #35

Earlier quoted context omitted.

What prejudices do I have against Node that are unfair?

Citing your sources would be a great way of asserting your credibility. "Every blog post I have read that says the opposite" doesn't count. I'd love to read some well-thought-out arguments against node from people who've seriously given node a shot, but I haven't seen any. Granted, I haven't been looking for them, so please prove us wrong.

I don't log the numerous NodeJS blogs I have come across over the year, my opinions on if the authors of Node blogs are qualified isn't really relevant to my point though: NodeJS is a step backwards.

I wrote a comment on reddit that expands on my reasons more, although the second point is less of a problem if people use something like TameJS with Node (which I don't think most people are doing).

http://www.reddit.com/r/programming/comments/ilols/the_node_...

Post reply on HN