Live data from Hacker News

If you're using Node.js, you're doing life wrong

codeslinger.posterous.com

41–50 of 100 posts

Re: If you're using Node.js, you're doing life wrong

#41
post #39

Ok, as someone who has been actually building apps on Node for about 1 year AND working with a largish Scala codebase for the last six months: > Not to mention the fact that its balls-ass slower than some straight un-optimized Scala. I don't see the point of comparison here. Slower/faster is meaningless without the context. Apples to Oranges. And, Scala has it's own issues. Yeah, the JVM's performance is there, but b…

Nit: Client side JS has no module system.

Check out requirejs: http://requirejs.org/

I've used it to handle both server-side (node) and client-side module systems, and it's been great.

Re: If you're using Node.js, you're doing life wrong

#43
post #41
post #39

Ok, as someone who has been actually building apps on Node for about 1 year AND working with a largish Scala codebase for the last six months: > Not to mention the fact that its balls-ass slower than some straight un-optimized Scala. I don't see the point of comparison here. Slower/faster is meaningless without the context. Apples to Oranges. And, Scala has it's own issues. Yeah, the JVM's performance is there, but b…

Nit: Client side JS has no module system. Check out requirejs: http://requirejs.org/ I've used it to handle both server-side (node) and client-side module systems, and it's been great.

Yes, I am aware of requirejs. I was talking about native module support.

Re: If you're using Node.js, you're doing life wrong

#44
post #2

I don't really have a dog in this fight, but I see node.js as being "disruptive": * It's "not as good" as languages/environments like Erlang. * But it's good enough, and significantly simpler, as an approach to tackle a certain class of problems. This, combined with widespread knowledge of Javascript, will probably make it fairly widely used.

I disagree about it being that "disruptive". The concepts that it uses aren't new. They've existed in POSIX environments for decades.

At a very basic level, Node.js is a callback-based API that's based around some(probably select) notifier loop. That's not particularly new.

Re: If you're using Node.js, you're doing life wrong

#46
post #32

If you get really angry about the choices other people make for their own work, you're doing life wrong.

Approaches that become popular and highly publicized definitely impact everyone else's work in that field. Teams decide to migrate to those approaches, discarding others, based on perceived popularity, shallow impressions, small amounts of experimentation. Often, this is all we have to go on. But team members who have an intuition that the approach may have more problems than are first visible now have a choice, to e…

Couldn't agree more.

We're all aware of the Internet Hype Machine. We've all been duped by it before. Heck, my big project today consists of frantic backpedaling from an overly hasty decision, prompted by the IHM, to use SQLite in a project that had no business being based on SQLite. We should all be open to hearing criticism about choices to use X or Y technology.

-But- if you start by saying, "You're so stupid," then the person you're talking to will start by thinking, "You're such a jerk." And nobody really pays much attention to the opinions of people they think are jerks.

Re: If you're using Node.js, you're doing life wrong

#47
The problem I see with all these kinds of negative posts concerning Node.js is that they essentially boil down to "this is so radically different and uncomfortable to me that it cannot possibly be good for anyone else." and do not provide any concrete business examples of why it should be avoided.

Until I see an actual example of how "Node.js crashed my business, cost us N dollars, and here's exactly how...", I will continue to look at such posts as developers complaining about having to learn to do things a new way — something that has been going on since there were developers.

Re: If you're using Node.js, you're doing life wrong

#48
post #32

Earlier quoted context omitted.

Approaches that become popular and highly publicized definitely impact everyone else's work in that field. Teams decide to migrate to those approaches, discarding others, based on perceived popularity, shallow impressions, small amounts of experimentation. Often, this is all we have to go on. But team members who have an intuition that the approach may have more problems than are first visible now have a choice, to e…

Couldn't agree more. We're all aware of the Internet Hype Machine. We've all been duped by it before. Heck, my big project today consists of frantic backpedaling from an overly hasty decision, prompted by the IHM, to use SQLite in a project that had no business being based on SQLite. We should all be open to hearing criticism about choices to use X or Y technology. -But- if you start by saying, "You're so stupid," th…

Socratic method for the win. Keep asking questions until THEY come the conclusion that what they were thinking was a dumb idea.

Re: If you're using Node.js, you're doing life wrong

#49
It's posts like this that make me embarrassed to be a programmer. The author basically states, "Node.js is not a good fit for my company, therefor everyone using node.js is wasting their time." It's generalizations like this that just blow my mind.

I don't go around saying, "Snickers is the worst candybar, therefor anyone who eats a Snickers is wasting their time."

I bet the author is not a pleasant person to work with.

Re: If you're using Node.js, you're doing life wrong

#50
post #25
post #19

I haven't used node.js before, but I see 2 main points being made about it, by proponents and detractors respectively: * It uses non-blocking evented IO so it can scale well. * It is single threaded so it can't scale well. Someone teach me: which of these statements is true?

Neither are true. Non-blocking evented IO is mostly attractive from a usability point of view: it's much easier to write programs that aren't multi-threaded. It can also use much less memory than a threaded model in certain situations . Non-blocking, evented systems tend to be single-threaded. Single-threaded systems don't automatically scale across multiple cores. To scale, you spawn a separate process for each core…

Personally I love it, but some programmers find non-blocking evented "async" IO completely counter-intuitive. So it's debatable on the usability.

Async IO is an absolute win from the scalability perspective because it allows you to service a great many clients with many fewer threads. OS thread context switches are relatively expensive. Ideally you would have exactly one OS thread per physical core and they would never need to block on exclusive access to any shared resources.

Now that we have a system where the user code inside the async handler doesn't need to manage exclusive access to anything, from the usability perspective it can has some of the simplicity of code that is fully single-threaded. But that's subtly different from saying ASIO makes it easy.

My guess is that many of the same programmers who aren't comfortable writing multithreaded code aren't going to find it completely intuitive to rethread their stack around an ASIO model.

Post reply on HN