Re:Hard-won lessons: Five years with Node.js
by mattnewton on Wednesday April 19, 2017 @11:38PM
(#14153735)
The edit/refresh cycle starts to slow as the project grows in Java, but node has pretty close to zero startup time and is interpreted. That plus a repl supports a much more explorative coding style where things work as fast as you can add them. No JVM restarts, compilations, or going back to change types or api's in the middle of a thought.
[ Parent
| on HN ]
Re:Hard-won lessons: Five years with Node.js
by hota_mazi on Thursday April 20, 2017 @12:13AM
(#14153893)
> The edit/refresh cycle starts to slow
IDEA and Eclipse compile your code as you write it. And with Hotswap, you don't even need to redeploy anything. They also all offer REPL's that are much more sophisticated than anything Javascript has to offer.
I think you haven't used a JVM language and its ecosystem in a very long time.
> And with Hotswap, you don't even need to redeploy anything.
Except when you have to restart the JVM because you added a class or a whole bunch of other things that it can't hotswap in the new code.
Re:Hard-won lessons: Five years with Node.js
by petersellers on Thursday April 20, 2017 @02:42AM
(#14154465)
It's true that the hotswap support built in to the JVM is somewhat limited, but there are tools that are more comprehensive and can hotswap new classes, methods, method signature changes, etc. (JRebel and spring-loaded are the ones that come to mind).
Re:Hard-won lessons: Five years with Node.js
by hota_mazi on Thursday April 20, 2017 @01:39AM
(#14154237)
Still better than any dynamically typed language (I mean any) where you always have to redeploy everything since none of these language support incremental compilation, let alone incremental reloading.
Re:Hard-won lessons: Five years with Node.js
by ben-schaaf on Thursday April 20, 2017 @08:06AM
(#14155890)
If I'm using a truly compiled language (eg. C++, D), which have incremental compilation, I still have to redeploy everything since 'everything' is a single executable.
If I'm using an interpreted language I only have to deploy the changed source files. Git can do that for you.
Re:Hard-won lessons: Five years with Node.js
by mattnewton on Thursday April 20, 2017 @10:41AM
(#14157050)
I use Java today daily, and came from Node. It is slower to have the compile step, even on very powerful machines, dynamic types are faster to change, and there are many caveats to hot reload. The repl comment was about is about speed, not sophistication.
When something happens instantly versus a tiny pause, you don't think about seeing your change immediately on save, versus batching many changes together and then testing them. This turns out to be faster for me for explorative work. Many people agree. Just trying to explain. /shrug
Re:Hard-won lessons: Five years with Node.js
by manyxcxi on Thursday April 20, 2017 @11:22AM
(#14157477)
I've found myself getting much better at making testing changes in such a way they can be hotswapped, then batching them up into a change when it's necessary to do a JVM restart. Sometimes I impress myself with how long I can go with just hotswaps, kind of like a code golf, but it's absolutely the biggest time suck of a Java developer's day. Besides meetings.