Live data from Hacker News

Why I'm Learning Node

rdegges.com

41–50 of 65 posts

Re: Why I'm Learning Node

#41

Starting with Node is a very poor choice if you want to learn front-end. But you can't go wrong with The Good Parts and you at least now know what's all the fuss about Node. But now let's really start learning front-end. Begin with semantic HTML. It's really the basis. The best front-enders I know first write all the HTML for a project, and only then start adding CSS and JS. Learn why is wrong and isn't. Make sure yo…

Might as well make sure you're grammar validates too.

Anyway, I don't understand why the front-end is relevant at all. It's not the same problem, and the fact that most people do both doesn't mean that learning to do a good front-end will teach you to do a good back-end.

Re: Why I'm Learning Node

#42
post #37

If you're an experienced programmer looking to learn Javascript, you probably can't do any better than reading Javascript: The Good Parts. It's extremely short, concise, and enjoyable to read. Highly recommended. Any experienced programmer should definitely start elsewhere so he can make up his own mind about Crockfords ideas about how programming should be. While the book is ok-ish almost half of the material is abo…

Agree. Moreover, the Good Parts is a bit dated since it's written in 2008 and things had changed noticeable with ECMAScript 5 in 2009. The last 6th edition of The Definitive Guide covers ES5 and has a chapter explaining Crockford's ideas.

Re: Why I'm Learning Node

#43
post #40
post #34

Earlier quoted context omitted.

> The decrease in productivity with node comes from having to write everything with callbacks. Programming asynchronously is crazy, it makes very simple algorithms very annoying to write. I know exactly what you mean, because that's what I thought a year ago. I was going on and on about this to everyone. Mea culpa. Then I actually tried node and learned the functional side of JavaScript (I don't mean the semantics, w…

So your point is that it's hard until you spend a year working with callback-based JavaScript, and then it becomes easy and intuitive? A year of investment may as well be an eternity for most.

That's good to know though. As it's pretty easy to waste a year learning framework X.

Re: Why I'm Learning Node

#44
Javascript can be quite daunting. I have seen many disasters with Javascript applications. This is why I now teach Javascript differently, I have written down a minimalist JS approach. This way of writing Javascript allows you to implement almost any OOP design yet it only uses 10% of the Javascript language thus shortening the learning curve. I wrote this initially for co-workers but because it's such a success I've decided to put it online.

http://www.gabordemooij.com/articles/jsoop.html

This approach also makes it possible to treat JS more like a traditional OOP language and it does not require external libraries, sugar code or new browser technology. It works in the most ancient browsers.

Re: Why I'm Learning Node

#45
post #19

The problem with node is it decreases your productivity tremendously. The most important thing about the choice of programming tools is productivity. Node.JS does not promise you any productivity gains. Node sells itself as a solution to "slowness" caused by "blocking IO". What's the solution? All I/O is evented! This means you have to write everything with callbacks. You may see some very nice libraries/tools coming…

> The problem with node is it decreases your productivity tremendously.

People say this over and over, complaining about nested callbacks and what not. I can tell you from experience that it is not true. I've been working on a Node application for a few weeks now. It is our first server side Javascript endeavour as a company, I had only tinkered with it in my own time before this. And the experience is pretty good. Writing in a more functional style makes me more productive and makes quite some problems more straightforward to describe (implement).

Re: Why I'm Learning Node

#46
post #29
post #23

Earlier quoted context omitted.

You may see some very nice libraries/tools coming out around node.js, like jade, coffeescript, and stylus. These are all nice and good, and they do increase your productivity, but, only on the client side. I disagree. Firstly, CoffeScript is not confined to the client-side. Besides, there are some modules like socket.io for which you will hardly find any substitues in other eco-systems. You're also discounting the ef…

The decrease in productivity with node comes from having to write everything with callbacks. Programming asynchronously is crazy, it makes very simple algorithms very annoying to write. I'd say it's almost like writing in assembly. You have to write your code in some pseudo code first, synchronously, then translate that into the asynchronous callback spaghetti than node requires. > Lastly, I would like to know what y…

> I'd say it's almost like writing in assembly. You have to write your code in some pseudo code first, synchronously, then translate that into the asynchronous callback spaghetti than node requires.

This is a sign of a not-fully-adopted paradigm shift. Like, when someone first learns a new (spoken) language, they translate it to their native language in their head.

Fluent speakers don't translate, they simply understand. Similarly, when you fully grok functional programming, coding with callbacks will cease to feel unnatural.

That said, it does take some getting used to, which is a real cost that needs to be considered when choosing Node.

Re: Why I'm Learning Node

#47
post #29
post #23

Earlier quoted context omitted.

You may see some very nice libraries/tools coming out around node.js, like jade, coffeescript, and stylus. These are all nice and good, and they do increase your productivity, but, only on the client side. I disagree. Firstly, CoffeScript is not confined to the client-side. Besides, there are some modules like socket.io for which you will hardly find any substitues in other eco-systems. You're also discounting the ef…

The decrease in productivity with node comes from having to write everything with callbacks. Programming asynchronously is crazy, it makes very simple algorithms very annoying to write. I'd say it's almost like writing in assembly. You have to write your code in some pseudo code first, synchronously, then translate that into the asynchronous callback spaghetti than node requires. > Lastly, I would like to know what y…

[deleted]

Re: Why I'm Learning Node

#48
post #40
post #34

Earlier quoted context omitted.

> The decrease in productivity with node comes from having to write everything with callbacks. Programming asynchronously is crazy, it makes very simple algorithms very annoying to write. I know exactly what you mean, because that's what I thought a year ago. I was going on and on about this to everyone. Mea culpa. Then I actually tried node and learned the functional side of JavaScript (I don't mean the semantics, w…

So your point is that it's hard until you spend a year working with callback-based JavaScript, and then it becomes easy and intuitive? A year of investment may as well be an eternity for most.

To be fair, the OP did not exactly say that it took 1 year to learn it. I personally took less than a few days. Every framework has a learning curve.

Re: Why I'm Learning Node

#49
post #31
post #29

Earlier quoted context omitted.

The decrease in productivity with node comes from having to write everything with callbacks. Programming asynchronously is crazy, it makes very simple algorithms very annoying to write. I'd say it's almost like writing in assembly. You have to write your code in some pseudo code first, synchronously, then translate that into the asynchronous callback spaghetti than node requires. > Lastly, I would like to know what y…

It cracks me up that you haven't tried Go but you're still recommending it, is there a web framework? Edit: Found web.go. Screw it it's a long weekend, I'll give learning Go a go.

You don't really need a web framework with go. net/http is just fine for most use cases.

Re: Why I'm Learning Node

#50
post #19

The problem with node is it decreases your productivity tremendously. The most important thing about the choice of programming tools is productivity. Node.JS does not promise you any productivity gains. Node sells itself as a solution to "slowness" caused by "blocking IO". What's the solution? All I/O is evented! This means you have to write everything with callbacks. You may see some very nice libraries/tools coming…

Or Haskell, Erlang or various other languages that have better solutions for non-blocking I/O.
Post reply on HN