Live data from Hacker News

Hard-won lessons: Five years with Node.js

blog.scottnonnenberg.com

241–250 of 365 posts

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

#241

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…

This is a case of developper ignorance, not missing tools: v8 has an integrated debugger since 2009, and you can interact with it using the Chrome developer tools, probably the most used debugger frontend of all.

There are also debuggers for PHP :) No horse in this race, I write Python.

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

#242

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…

Yeah this is pure ignorance. There is a time and place for advanced profiling/debugging tools, and there are times where using simple logging to debug things quickly is perfectly fine. You applying debuggers as a hammer to all the problems and all the people is the thing thats weird imho.

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

#243

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.
Some Node engineers do use debuggers sometimes, particularly those that came from environments in which this is common (Java, etc). However, many Node engineers I've worked with rely on unit testing, keeping functions very simple and intuition.

Btw the tooling in the Node ecosystem is actually pretty good.

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

#244
post #126

Earlier quoted context omitted.

I've used nodeJS at 3 of the past 4 startups I've worked at (currently using PHP). I had a hand in choosing it at all those 3 places and my main reasons boiled down to: 1. most devs know JS (so it's easier to hire & onboard new devs) 2. while everyone claims node's dependencies are hell, I love the choice available (although over time, it's tiring). 3. The community is generally awesome (helps during meetings, online…

> while everyone claims node's dependencies are hell, I love the choice available (although over time, it's tiring). So... at one place I work, we use nodejs. There are so many modules added using so many files, that we ended up not being able to use our packaged application - extracting the package into a holding dir before moving into place meant that we ran out of inodes on the filesystem (stock 8GB ubuntu ext4 cl…

I had this issue initially when I was developing on Windows. We hit the limit of Windows's 255 char file path limit.

We also have had issues with node_modules takes minutes to download to the point that we basically had to cache it in our CI builds - which in itself was a really bad idea (thankfully Yarn seems to fix a lot of those issues)

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

#245
post #75
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?

NodeJS has a handful of things that tend to get brought up. Callback soup and difficult error handling. Both are resolved by promises. Once you get the hang of promises, you are capable of doing concurrent asynchronous tasks in a manner that would be significantly more difficult in any other language. On top of that, NodeJS is very, very fast. Compared to Python or Ruby, straight computing is significantly faster, bu…

Love this. This is precisely why I love Javascript too, I find these douchey condescending comments on Javascript/Node.js from people who've not grasped the language and it's philosophy deeply, extremely annoying.

There's a lot a capable developer can accomplish with Javascript, with it's first order functions, collection operations, generators, promises and now, async /await. Granted JS is not idiot-proof, but I'd any day use a powerful language than a highly restricting one (think Java and Go).

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

#246

Earlier quoted context omitted.

> V8 is a JIT compiler, which incorporates a runtime and a compiler. So it's a compiler which incorporates a compiler? Compilerception much? 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? Just because V8 internally JIT-compiles the JS-code to something eventually executable which the machine can run doesn't change the fact that it…

> 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

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

#247

Earlier quoted context omitted.

I've got over a decade of professional experience in C#, Python, and Java. I'd consider myself a Java developer before all else, yet I still turn to Node.js for proof of concept projects because certain things are just quicker to implement. Here's the major caveat, out of, say 100+ PoC/prototype projects I've ever done, I've taken two to 'production'. I put production in quotes because they were actually internal ser…

> yet I still turn to Node.js for proof of concept projects because certain things are just quicker to implement. Why? Writing Java is really very fast these days, especially with IDE's. I can get a small web site serving JSON REST requests and memcache up in ten minutes with a simple Maven/Gradle build and full IDE integration.

> I can get a small web site serving JSON REST requests and memcache up in ten minutes with a simple Maven/Gradle build and full IDE integration.

Dropwizard is a great example of this. It's an opinionated (convention over configuration) Java framework for building REST web services. You can get a 'Hello World' web service up and running in literally 10 minutes following this tutorial http://www.dropwizard.io/1.0.0/docs/getting-started.html

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

#248
post #96

Earlier quoted context omitted.

V8 is a world class compiler. Compared to ruby, Python, Erlang, php and that ilk it is lightning quick. (Pypy is a good match for it but it's not main street and you can't just use any module.) in terms of performance and popularity, v8/node stand pretty much alone as far as dynamic non-compiled environments. JavaScript has a lighter weight feel than Java and the jvm stack. Single threaded with a top notch event reac…

> Both it and dart vm are limited to relatively small memory footprints (think 1GB) which just isn't good for some workloads and problems. This hasn't been true for a while now. node --max-old-space-size=8192 server.js See also http://prestonparry.com/articles/IncreaseNodeJSMemorySize/

How about using 64gb?

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

#249
post #229

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.

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.

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

#250

Earlier quoted context omitted.

For your information: to assess what projects you might be referring to, I clicked on your profile, but your hackernews profile points me to a URL with a broken security certificate belonging to Ukrainians, and even when I bypass the security warnings in the browser, I am sent to a page which gives me the message "404 not found".

Hackernewsers was a thing from a few years ago, not his fault it's shut-down.

The above message is purely for the person above's information. I have no way of contacting them off this noticeboard, so I wrote a private message to them about that as a reply, and marked it as such with the words "For your information". As far as it being someone's fault, the profile on news.ycombinator.com is editable, so he or she could edit it as they please. What a nuisance it is to continually have to deal with people who misinterpret what other people have written.
Post reply on HN