Live data from Hacker News

An Absolute Beginner's Guide to Node.js

blog.modulus.io

21–30 of 71 posts

Re: An Absolute Beginner's Guide to Node.js

#21
post #17
post #16

Not trying to be flamy, but, once again... why people insist on pushing on projects based on a... renownedly flawed programming language? ..Yea JS. Today it's clear that the "only" reason for it being used is its widespread availability in browser, but that started in a time when you needed a way to change the mouse pointer from default to a rainbow colored one. But still js it's the programming language we build fra…

In what way is it flawed?

[edit spelling] I think that the reason you find so much negativity regarding javascript is that many people come to javascript from some other language which offers features which javascript doesn't yet offer.

Having cut their teeth on a language tends to leave the programmer with a worldview where any language which doesn't have the same features which are present in their beloved language is an inferior language.

I believe Paul Graham refers to this as 'The Blub Paradox'[0].

Most of the complaints surrounding javascript stem from the fact that it was initially designed to be a lightweight scripting language.

At the time that javascript was created I think that very few people envisioned the web growing into what it has become. Javascript wasn't created with 100,000 line programs in mind.

Therefore it is currently missing some abstractions which people creating and maintaining programs in the large have come to rely on such as classes, interfaces and modules.

Also javascript has a very simple standard library which leads to people feeling that they need to reinvent the wheel in most cases.

Finally Javascript has prototypal inheritance as opposed to the more traditional class based inheritance which so many programmers are used to.

Of course many of the things mentioned above have already been solved or are currently being solved.

The ECMAScript standards body is in the process of adding classes and modules. Libraries such as underscore.js are fleshing out the standard library. And tools such as Coffeescript are providing a more class based inheritance model (if that is your thing).

[0] http://www.paulgraham.com/avg.html

Re: An Absolute Beginner's Guide to Node.js

#22
post #17

Earlier quoted context omitted.

In what way is it flawed?

[edit spelling] I think that the reason you find so much negativity regarding javascript is that many people come to javascript from some other language which offers features which javascript doesn't yet offer. Having cut their teeth on a language tends to leave the programmer with a worldview where any language which doesn't have the same features which are present in their beloved language is an inferior language.…

Typescript[1] remedies a lot of things people dislike about Javascript, including the lack of strict typing. I've been using it with Node lately and it has made me do a 180 towards my interest in making Javascript a sever side language for projects.

[1] http://www.typescriptlang.org/

Re: An Absolute Beginner's Guide to Node.js

#23
post #16

Not trying to be flamy, but, once again... why people insist on pushing on projects based on a... renownedly flawed programming language? ..Yea JS. Today it's clear that the "only" reason for it being used is its widespread availability in browser, but that started in a time when you needed a way to change the mouse pointer from default to a rainbow colored one. But still js it's the programming language we build fra…

For being such a flawed language, it does get one thing right. That one thing made Ryan Dahl pick javascript and it is the relative absence of blocking IO calls. Instead you use events and callbacks.

Re: An Absolute Beginner's Guide to Node.js

#25
post #9

Earlier quoted context omitted.

The main application runs in a single thread and then I/O activities happen in an event loop running with a small thread pool. Once one of those activities completes the event loop will give a signal to the main thread of the Node app and the callback will be executed. Not sure if that helped or just confused everyone.

So basically if you have an infinite loop in your app's one and only thread, none of the callbacks will happen because they have to run on that one thread?

Remember the "Node.js is Cancer" troll? It was pretty much about this.

Re: An Absolute Beginner's Guide to Node.js

#26
post #23
post #16

Not trying to be flamy, but, once again... why people insist on pushing on projects based on a... renownedly flawed programming language? ..Yea JS. Today it's clear that the "only" reason for it being used is its widespread availability in browser, but that started in a time when you needed a way to change the mouse pointer from default to a rainbow colored one. But still js it's the programming language we build fra…

For being such a flawed language, it does get one thing right. That one thing made Ryan Dahl pick javascript and it is the relative absence of blocking IO calls. Instead you use events and callbacks.

> "relative absence of blocking IO calls."

Do not confuse "language" with "standard library".

Re: An Absolute Beginner's Guide to Node.js

#27
post #8

Earlier quoted context omitted.

I'd love to chat about the platform. I'm not sure if this is the correct forum for pimping it. I just don's to turn this comment area into a discussion of the platform. Hit us up on twitter @OnModulus or send an email to feedback@modulus.io.

Ach, go on, a quick elevator pitch won't hurt! I had the same question.

Well Modulus, http://modulus.io, has a number of things that set us apart. One is that we're not really into to tiers. Custom SSL, domains, etc... are part of the normal package. We support WebSockets, there are a couple others that do but most don't. The really interesting piece is that we provide our customers with a great set of statistics about your running application (number of requests, response times, cpu, memory and more). We also have MongoDB hosting in house which lets you spin up a database for your application quickly.

Re: An Absolute Beginner's Guide to Node.js

#28
post #23

Earlier quoted context omitted.

For being such a flawed language, it does get one thing right. That one thing made Ryan Dahl pick javascript and it is the relative absence of blocking IO calls. Instead you use events and callbacks.

> "relative absence of blocking IO calls." Do not confuse "language" with "standard library".

Well, the browser implementation I guess. The point being the correct mindset.

Re: An Absolute Beginner's Guide to Node.js

#29
post #28

Earlier quoted context omitted.

> "relative absence of blocking IO calls." Do not confuse "language" with "standard library".

Well, the browser implementation I guess. The point being the correct mindset.

"Mindset" is not a property of programming languages. "Semantics" is. And JavaScript's semantics is, by any reasonable assessment, a huge pile of crap.

Re: An Absolute Beginner's Guide to Node.js

#30
post #17

Earlier quoted context omitted.

In what way is it flawed?

[edit spelling] I think that the reason you find so much negativity regarding javascript is that many people come to javascript from some other language which offers features which javascript doesn't yet offer. Having cut their teeth on a language tends to leave the programmer with a worldview where any language which doesn't have the same features which are present in their beloved language is an inferior language.…

Yes, I am so trapped in my Haskell blub that I cannot possibly understand why JavaScript is so amazing.
Post reply on HN