Live data from Hacker News

Hard-won lessons: Five years with Node.js

blog.scottnonnenberg.com

251–260 of 365 posts

Re: Hard-won lessons: Five years with Node.js

#251

This looks like how I used to work with BASIC back in the 80s: > I finally added extremely verbose logging ... started adding logging ... Verbose logging to the rescue ... I had the right logging in place ... My first step was to jump in and add some key logging statements ... added extremely verbose logging Weird to see people happy to be limited to such stone-age work-flows when fully capable debuggers have existed…

Sometimes, there's no substitute for println debugging.

Particularly with real-time, concurrent code where you're interacting with an external system, bringing a thread to a halt in your debugger causes all sorts of false-positive timeout bugs. You get about one shot to break with the debugger, then your state is trashed and you have to start over.

Re: Hard-won lessons: Five years with Node.js

#252
post #229

Earlier quoted context omitted.

Well, to an extent this is a subjective question. With node, you get npm with it, npm is what everyone uses, and npm is clearly what you should be using too. Moreover, the basic functionality of npm is very very easy to understand. I find the Java ecosystem terrifying by comparison. I have no idea whether Maven is what I should be using or if I should be using something else instead -- having it as a separate downloa…

You should probably learn to expand your comfort zones more effectively, if the Java ecosystem terrifies you.

It's not a macho thing for me. I use the tools that are easiest to use and do the job. Anyway, I have used a lot of different programming languages, and it's the Java ecosystem specifically that I've always found overwhelming whenever I've tried to dabble with it. So I think the problem is Java, not me.

Re: Hard-won lessons: Five years with Node.js

#253
post #221

Earlier quoted context omitted.

I don't think so. Npm is included with node and is very simple to use.

So your main argument is that you have to make two downloads with Java (JDK and Maven) but with Node you need to make one? Seems pretty weak. It can't be anything else, because after you have Maven, it is literally a single command to set up a REST project using Dropwizard.

The command to set up a Dropwizard project according to the getting started guide[0] is:

    mvn archetype:generate -DarchetypeGroupId=io.dropwizard.archetypes -DarchetypeArtifactId=java-simple -DarchetypeVersion=1.0.0
Which spends the first 30 seconds downloading a bunch of stuff before asking you for settings to start off your project. I then read the README it created and ran `mvn clean install` as instructed which started downloads that took 1:40 min only to end in a build failure with multiple large tracebacks.

Running `mvn --help` doesn't help at all and the pom file it creates is 143 lines of hard to read XML.

I've used gradle a little, I'm familiar with bundler/gem, pip, npm and dub. Maven just makes me want to run as far as possible from anything Java related.

[0] http://www.dropwizard.io/1.1.0/docs/getting-started.html

Re: Hard-won lessons: Five years with Node.js

#254

This looks like how I used to work with BASIC back in the 80s: > I finally added extremely verbose logging ... started adding logging ... Verbose logging to the rescue ... I had the right logging in place ... My first step was to jump in and add some key logging statements ... added extremely verbose logging Weird to see people happy to be limited to such stone-age work-flows when fully capable debuggers have existed…

>Based on this, it's hard not to state that current Node-developer are the new PHP-developers: Unsophisticated, completely unable to see when the tools at hand are lacking, and happy with a with whatever they can get running.

PHP has had debugging for a long time, PHPStorm is pretty much now the standard in php development and includes full productivity in that area. It also doesn't face the issues web-JS has with pre-processing, post-processing and compilation of JS code that has to have a source map back to the original source.

Re: Hard-won lessons: Five years with Node.js

#256
post #15

I can't imagine choosing to write Javascript on the server, but considering its popularity I'm wondering if I'm wrong. So I'm curious as to the reasons people chose Node.js and whether you would recommend it, anybody willing to share their experiences?

From some JavaScript training slides I am working on:

Why use it:

    - Server and client side in the same language
    - Simple enough for you to feel free
    - Enough hammers not to forge your own every time
    - Fast enough
    - Good enough to structure larger programs
    - Browser is the only cross-platform GUI toolkit
When to use it:

    - Web applications
    - Network clients and servers
When not to use it:

    - Computation (CPU) heavy programs
    - Very high loads
    - Shell scripting
    - Raw packet requirement

Re: Hard-won lessons: Five years with Node.js

#257
post #15

I can't imagine choosing to write Javascript on the server, but considering its popularity I'm wondering if I'm wrong. So I'm curious as to the reasons people chose Node.js and whether you would recommend it, anybody willing to share their experiences?

Biggest benefit, as a solo developer, is one language for everything. I can rip through the front end, and back end work for all my new venture projects, without changing gears.

Re: Hard-won lessons: Five years with Node.js

#258
post #252

Earlier quoted context omitted.

You should probably learn to expand your comfort zones more effectively, if the Java ecosystem terrifies you.

It's not a macho thing for me. I use the tools that are easiest to use and do the job. Anyway, I have used a lot of different programming languages, and it's the Java ecosystem specifically that I've always found overwhelming whenever I've tried to dabble with it. So I think the problem is Java, not me.

There's nothing "macho" involved in this, your language describing your own state of mind is inflammatory and (hopefully, for your sake) inaccurate.

Re: Hard-won lessons: Five years with Node.js

#259

Earlier quoted context omitted.

So your main argument is that you have to make two downloads with Java (JDK and Maven) but with Node you need to make one? Seems pretty weak. It can't be anything else, because after you have Maven, it is literally a single command to set up a REST project using Dropwizard.

The command to set up a Dropwizard project according to the getting started guide[0] is: mvn archetype:generate -DarchetypeGroupId=io.dropwizard.archetypes -DarchetypeArtifactId=java-simple -DarchetypeVersion=1.0.0 Which spends the first 30 seconds downloading a bunch of stuff before asking you for settings to start off your project. I then read the README it created and ran `mvn clean install` as instructed which st…

You just described my experience with npm, except there aren't any useful tracebacks, just a note absolving npm of all blame and advising me to contact some random module author.

Edit: and of course with npm the annoying downloads happen every time for each project, instead of once per dependency version...

Re: Hard-won lessons: Five years with Node.js

#260

Earlier quoted context omitted.

> So it's a compiler which incorporates a compiler? Compilerception much? No, what I meant is that the concept of a JIT compiler incorporates both a runtime and a compiler. > Seriously though: Can I tell V8 to compile my JS and tell me any errors found before I deploy it to production and runtime? Yes or no? That's not the job of a compiler. It's a feature of compilation, but a compiler does not by definition have to…

"but a compiler does not by definition have to compile your code before deployment" Huh? Not sure many experienced developers would agree with you a JIT Compiler is quite different to a real compiled language C Fortran Etc

a compiled language, yes. But the function of a compiler, between a compiled language and an interpreted language, remains the same. It translates code from one representation to another.
Post reply on HN