Live data from Hacker News

We switched to Node.js: the good and the not so good

blog.superfeedr.com

21–30 of 106 posts

Re: We switched to Node.js: the good and the not so good

#21
post #4

> It terms of performance, we also have seen a significant (about 25%) bump in terms of feeds processed by second per server. They rewrote the entire codebase and obtained for just a 25% gain? It doesn't sound like they are very happy to be coding in javascript now either. Everyone: please don't rewrite your code, it's almost never worth it. The one exception is rewriting a core part of an algorithm in C for speed (t…

Well, the reason we rewrote was not to explode all benchmarks. The reason we rewrote was to be able to ease the maintenance of our code =)

from a long term maintainability perspective, javascript can be notorious. you could always follow a disciplined approach for development to help with maintainability, but that applies to all programming languages. i don't see anything about javascript that makes it more maintainable especially for large projects.

Re: We switched to Node.js: the good and the not so good

#22

I tried Node, because it was the new hotness and trying new things is great. It was distinctly Not For Me, for many of the same reasons that they've found; many tutorials are out of date in subtle ways (I like to think of this as the Rails effect from way back in the good old fun days), the language is just painful to structure and read over for my syntax processing. There's definitely a lot to like, and like they sa…

I have not tried Node (or in fact JS as a whole) yet. But it seems very hard to avoid JS in these days. I am going to learn it in a few months. Can anyone give me a rough idea how bad it is? (I know some Obj-C so is JS worse than that?)

Coming from Objective-C first, which is generally a rather sensible language, I think you'll be surprised at how stupid, unnecessary and inexcusable many of JavaScript's problems are.

People who only have a PHP background, for instance, have become accustomed to such stupidity. They think it's "normal", solely because they don't really know any better.

Those coming from C, C++, Java, C#, Ruby, Python or most other languages, on the other hand, know that the JavaScript way is not the right way. These people generally have a much harder time coming to terms with JavaScript's numerous issues.

Re: We switched to Node.js: the good and the not so good

#23

I tried Node, because it was the new hotness and trying new things is great. It was distinctly Not For Me, for many of the same reasons that they've found; many tutorials are out of date in subtle ways (I like to think of this as the Rails effect from way back in the good old fun days), the language is just painful to structure and read over for my syntax processing. There's definitely a lot to like, and like they sa…

I have not tried Node (or in fact JS as a whole) yet. But it seems very hard to avoid JS in these days. I am going to learn it in a few months. Can anyone give me a rough idea how bad it is? (I know some Obj-C so is JS worse than that?)

Javascript is overall cleaner than Obj-C. Both languages can of course be used and abused in many ways. Javascript is going to require less code in general. On the flipside, larger projects are harder to keep maintainable.

There are some trivial gotchas in Javascript, but same can be said for most languages. Most importantly weird type promotion system, variable & function hoisting and prototypal inheritance can cause some gray hairs. All those can be lived with, and prototypes are in some ways superior to "classical" inheritance.

C, C++, Java, Javascript, Lua(JIT), Perl and ObjC are languages I normally use.

Re: We switched to Node.js: the good and the not so good

#24
post #4

Earlier quoted context omitted.

Well, the reason we rewrote was not to explode all benchmarks. The reason we rewrote was to be able to ease the maintenance of our code =)

from a long term maintainability perspective, javascript can be notorious. you could always follow a disciplined approach for development to help with maintainability, but that applies to all programming languages. i don't see anything about javascript that makes it more maintainable especially for large projects.

It's not the language, it's the people, the community.

Re: We switched to Node.js: the good and the not so good

#25

Earlier quoted context omitted.

I have not tried Node (or in fact JS as a whole) yet. But it seems very hard to avoid JS in these days. I am going to learn it in a few months. Can anyone give me a rough idea how bad it is? (I know some Obj-C so is JS worse than that?)

Coming from Objective-C first, which is generally a rather sensible language, I think you'll be surprised at how stupid, unnecessary and inexcusable many of JavaScript's problems are. People who only have a PHP background, for instance, have become accustomed to such stupidity. They think it's "normal", solely because they don't really know any better. Those coming from C, C++, Java, C#, Ruby, Python or most other la…

I was speaking with a colleague about Node and he suggested using Coffeescript instead of JS directly for the exact reasons you mentioned.

I'm also coming from Obj-C, C and Ruby background and recently read "Javascript: The Good Parts". I'm still looking for the good parts promised in the title and introduction.

Re: We switched to Node.js: the good and the not so good

#26
post #24

Earlier quoted context omitted.

from a long term maintainability perspective, javascript can be notorious. you could always follow a disciplined approach for development to help with maintainability, but that applies to all programming languages. i don't see anything about javascript that makes it more maintainable especially for large projects.

It's not the language, it's the people, the community.

what's different about node community from ruby community? are you sure that's not confirmation bias?

Re: We switched to Node.js: the good and the not so good

#27
post #8

Earlier quoted context omitted.

It depends on how large the code base is. Rewriting a 10k LOC project isn't a big deal, compared to a 10 mln one. And a rewrite doesn't have to target performance only, but ease of maintenance too.

If ease of long-term maintenance is a goal, then JavaScript is the wrong approach.

Well that's just, like, your opinion man.

Re: We switched to Node.js: the good and the not so good

#28

Earlier quoted context omitted.

I have not tried Node (or in fact JS as a whole) yet. But it seems very hard to avoid JS in these days. I am going to learn it in a few months. Can anyone give me a rough idea how bad it is? (I know some Obj-C so is JS worse than that?)

Coming from Objective-C first, which is generally a rather sensible language, I think you'll be surprised at how stupid, unnecessary and inexcusable many of JavaScript's problems are. People who only have a PHP background, for instance, have become accustomed to such stupidity. They think it's "normal", solely because they don't really know any better. Those coming from C, C++, Java, C#, Ruby, Python or most other la…

I think that's my biggest problem, my background is heavy on C/C++, and moved onto C#, Ruby, Python and Obj-C later and whilst I think Javascript is fine in terms of providing functionality for web pages, the language doesn't lend itself to a large implementation like NodeJS unless you're supremely well versed in it.

Re: We switched to Node.js: the good and the not so good

#29
post #25

Earlier quoted context omitted.

Coming from Objective-C first, which is generally a rather sensible language, I think you'll be surprised at how stupid, unnecessary and inexcusable many of JavaScript's problems are. People who only have a PHP background, for instance, have become accustomed to such stupidity. They think it's "normal", solely because they don't really know any better. Those coming from C, C++, Java, C#, Ruby, Python or most other la…

I was speaking with a colleague about Node and he suggested using Coffeescript instead of JS directly for the exact reasons you mentioned. I'm also coming from Obj-C, C and Ruby background and recently read "Javascript: The Good Parts". I'm still looking for the good parts promised in the title and introduction.

dagw has the best response to this below: http://news.ycombinator.com/item?id=5054382

I agree; it's a shortcut for people who know JS, not for people who are learning it for the first time. As soon as you need to use or look into the internals of a library that isn't written in CoffeeScript, everything's going to get unstuck pretty quickly.

Re: We switched to Node.js: the good and the not so good

#30

Earlier quoted context omitted.

I have not tried Node (or in fact JS as a whole) yet. But it seems very hard to avoid JS in these days. I am going to learn it in a few months. Can anyone give me a rough idea how bad it is? (I know some Obj-C so is JS worse than that?)

Coming from Objective-C first, which is generally a rather sensible language, I think you'll be surprised at how stupid, unnecessary and inexcusable many of JavaScript's problems are. People who only have a PHP background, for instance, have become accustomed to such stupidity. They think it's "normal", solely because they don't really know any better. Those coming from C, C++, Java, C#, Ruby, Python or most other la…

It's not that JavaScript is a bad language, it's just easy to write bad code in JavaScript. I don't get it why most people coming from languages you mentioned like to bash JS so much, I used most of these languages in the past or use them currently (mainly Java and Python) and I like JavaScript the most. The problem is most people just don't want to learn JS, they write shitty code because it's easier and than complain how bad the language is. Sure, there are many issues with the language itself, usually because of how flexible it is, but for almost every issue there is a 'good way' of dealing with it.
Post reply on HN