Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's interesting to see so many people say "JS is great and we used it to build X" on one side and people who hate JS on the other side.

Obviously Node (and JS) has some things that it is strong in. People use it to build those things. Good developers won't use a tool in their box which is inferior to another tool they can use effectively. In between, there is a lot of room for "good enough" where tools overlap.

I think some developers are able to largely stick with a certain tool because development goes in waves. I can spend multiple months on a certain profile of work and then get hit with the same type of project a couple more times. Maybe by then I become an expert with that thing and I just keep doing those sorts of projects. You might think I'm crazy because I'm a "Node developer" but you probably don't know the nature of the work that I do.

Eventually I get hit with a different project and everything falls apart if I try to keep using the same tools as I had been using. So, I curse myself for being stupid and wasting time and start over with the tool I should have been using in the first place.

Some developers might have such a limited set of tools that they can't (or won't even try) to switch.

"So, I landed a big gig for the government. It's a healthcare site. I'm going to build it in Wordpress."

Following this thread further, look at some of the selling points of Node.

* It's great because as a front-end developer, you probably already know JS. With Node you can use JS on the back-end also!

* Because the front-end and the back-end are both in JS, I can use one programming language and re-use libraries for each side.

Great, let's encourage people who only know one programming language and a limited range of tools to just stay in that box.

There are things that X tool does well. There are things that X tool is horrible at. Perhaps rather than ragging on Node, the author should write an article explaining that developers should be expanding their tool-set so they have flexibility in handling different types of problems.



>Obviously Node (and JS) has some things that it is strong in. People use it to build those things. Good developers won't use a tool in their box which is inferior to another tool they can use effectively. In between, there is a lot of room for "good enough" where tools overlap.

People use JavaScript not because it's good but because it's the only option to develop in a browser. Having the same language on the client and the server is a very strong point, that's why they use NodeJS.


> Having the same language on the client and the server is a very strong point

Only if you're so incredibly strapped for cash that you can't hire real devs that can pick up another language in a day or two.

Almost every language used commonly on the serverside is vastly preferable to js.

This whole "well, it's THE SAME" benefit simply isn't. It's a red herring.

I'm convinced the whole ecosystem has sprung up because of hordes of terrible copy-paste browserside devs that don't actually fully understand what they're doing in js, who resultantly would be incapable of building anything serverside in another language at all because their overall comprehension of programming is marginal at best.

Anyone not stupid or insane just learns ruby or python or scala or go or even php or .NET.

PS: cue replies from all dozen people on the whole internet who know pointer math and still like coding webapps in js, who don't realize that I'm not talking about the 12 of them but the 12,000 who are doing the js/node problems on codeacademy this instant.


>Only if you're so incredibly strapped for cash that you can't hire real devs that can pick up another language in a day or two.

If your application is more complex on the client than on the server, that's the way to go.

I personally, prefer GWT here. Java on the client and the server is much better than JavaScript on its place.


> Anyone not stupid or insane just learns ruby or python or scala or go or even php or .NET.

I started with PHP and C#/VB.NET, before learning JS. I know Python, Scheme, Java, I've played a bit with Clojure and Ruby[0]. After all that, JavaScript (admittedly, usually through CoffeeScript) is my favorite language. It provides everything you need to build almost anything you want, wrt tooling.

I understand and agree that it has warts, as does every language. But to call its use "stupid or insane" is ridiculous.

[0] I have yet to understand the concept of blocks, as they seem to be just a half-assed implementation of first-class anonymous functions. If someone can show how they improve on them, that would be much appreciated.


....aaaaand scene. Cut!


I have literally no idea what you meant by this.


You didn't miss your cue, and delivered your lines perfectly. We're done for the day, we're not bringing in Eevee[1] and Dziuba[2] to shoot the "every language has warts hahaha what are you, a noob?" scene until tomorrow.

You did great, thanks again. Don't call us, we'll call you.

[1] http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...

[2] http://pages.citebite.com/b2x0j8q1megb


It depends on what you are building. Server side can cover so much ground these days. It could be the Ghost blogging app which was recently released or we could be talking about the muscle behind Google.

Node covers a lot of "good enough" space for what a lot of people are doing. The people who complain the loudest about Node are likely those who are working on things which aren't covered by that "good enough" circle.

I wish people would use real life project examples or include the sorts of work they do when they makes these kinds of arguments. It would help us see where this person is coming from.


The majority of people writing Node code don't know what that "good enough" space covers. Or they get so excited hitting something with that hammer that they stop looking in the toolbox.

Node is fantastic for rapid prototype development, or tiny little startups that need to do the absolute minimum amount of work so they can finish before running out of money.

Everything goes sideways when these cute little Node apps get pushed out to real production use (if you measure things in anything other than dollars per second, you don't get to chime in here and redefine production). Then the heavy hitters have to come in and patch Node itself, or rewrite it in another language.

I've gone in to a growing startup over a weekend and saved them $1000/mo in AWS instances by rewriting a Node app in 30 lines of Go.

I hate to cite examples of real world projects in threads like this, because it just devolves into "OMG YOU NOOB THAT WAS FIXED IN THE BASHFUL BADGER RELEASE" when said fix was the result of a bug you opened or a patch you submitted.


>It depends on what you are building. Server side can cover so much ground these days. It could be the Ghost blogging app which was recently released or we could be talking about the muscle behind Google.

Consider for example a rich text editor, or diagram editor with a complicated automatic layout. Doing such things in JS is extremely painful.


It's not the only option in the browser.


What are other runtime options?

- Flash? That's almost the same as JavaScript and it's getting obsolete.

- Java? No one enables it on the client, thanks to security problems.

- Asm.js/LLVM? These are immature and can't be used for production.


- GWT - Dart - ClojureScript


Every single one of these compile to the JavaScript runtime.

(Dart has a native VM in Chromium, but AFAIK it is a long way off from the real world)


Right and ClojureScript, for example, has full goroutines in it (i.e. core.async) if doing standard callback based async in JS isn't your thing.

Functionally, it makes little to no difference whether you're writing something that compiles down to JS or writing something that compiles down to its own runtime (assuming you turn source maps on your browser).


>Functionally, it makes little to no difference whether you're writing something that compiles down to JS or writing something that compiles down to its own runtime (assuming you turn source maps on your browser).

It actually makes a big difference. You can't use profiles, debugger, libraries, and other stuff which is platform specific but have to use JavaScript ones. Often, they don't play well with with languages which generate to JS.


That doesn't change the fact they use the JavaScript runtime, which was the question the parent was trying to address.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: