Live data from Hacker News

Why is a Java guy so excited about Node.js and JavaScript?

blog.sourcerer.io

91–100 of 117 posts

Re: Why is a Java guy so excited about Node.js and JavaScript?

#91
post #82

I develop a very complex, 500K+ LoC Java application. It implements a natural language sentence parser that is integrated with a specialized lossless data compressor. I use: - No IDE, just a simple text editor - No ORM, hand-written SQL code - My build tool is a Python script that marshals a javac call - I have just a few JAR file dependencies, which are checked into the repo - My own simple unit test and integration…

What made you create your own build tool rather than use Maven or Gradle? Ditto for the unit tests; why does JUnit not fit you?

A shot in the sky: The project might have started before those and/or he's in the mindset of reinventing the wheel instead of learning new tools

Re: Why is a Java guy so excited about Node.js and JavaScript?

#93

Earlier quoted context omitted.

While I can understand your frustrations in some of those cases, but it almost seems like the issues are being overcomplicated. I have worked with complex code bases and three commands got me running. Occasionally requirements.txt might fail me, so yes I might have to install a package manually. But for most projects I am up and running in 2-3 minutes. I don't bother with pipenv, or poetry. I use the kiss method.

The argument is not really whether it’s easy to get up and running with some trivial app. Clearly it is easy in purging. Parent’s point is about the longer term development cycle, when you have more dependencies, more project complexity, and more potential for small errors to ripple and affect your production systems.

The argument is invalid, if a project has that many issues someone did a terrible job or chose a terrible ecosystem. pip/venv/python is dead simple even for incredibly complex projects. if someone scrws that up routinely they might need to consider a different career.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#94
post #26

I expected (2012) after the article's title. This type of hype about Node and JS is long gone I'm afraid.

If anyone thinks nodejs is less complex than Java hasn't looked in their node_modules folder lately.

Then you haven't looked into your JARs :)

Re: Why is a Java guy so excited about Node.js and JavaScript?

#95
post #53
post #46

Earlier quoted context omitted.

Wow that's a lot of problems I've never had. Why would I care if a requirement is direct or a dependency? If it's a dependency it's a requirement. Period. Speaking of dependencies, NPM generally has a lot more and they are deeper and all too often for little shit that never should have been an import in the first place IMO. More parts == more stuff to go wrong and all too often it seems to. Pip isn't perfect and gran…

> Why would I care if a requirement is direct or a dependency? If it's a dependency it's a requirement. Period. Let's say I need package A. And, package A depends on package B, but, I'm not otherwise using package B. 1. I want to say that I need package A, >=1.0 and 2. When I deploy to production, I want to make sure that the deploy is repeatable. If the last time I deployed, I had package A==1.2.3 and B==4.5.6, then…

Ok, but still, why should I care if a package listed in requirements is dependency? What difference does it make in the real world?

And `pip freeze > requirements.txt` writes out version of the package that `pip install` later installs.

Very very seldom has this ever caused problems and I've been doing Python for over 8 years. I just really don't get the "problems" you see here, they seem pedantic and theoretical rather than real world issues.

Again, not to say pip is perfect, it isn't. Just that it's way more reliable than NPM.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#96
post #66

Earlier quoted context omitted.

Exactly, I deal with npm on a daily basis and I really wish deterministic builds were more of a concern in the javascript/npm universe. I can't count how many times a project broke because a "minor" release came out and broke existing code. Also the majority of projects have a caret in their package.json package versions so you automatically get the updates.

https://docs.npmjs.com/files/package-locks has been the default for awhile. Are you using a pretty old version?

I'm well aware of package locks. However npm has a horrible implementation of package locking. Running npm install will regenerate your package lock unless you removed prefixs from all your packages or you install using --package-lock-only[1].

So my question to you is, have you been using npm package locks correctly? Or do you let npm install generate a new package lock every time its run?

[1]: https://stackoverflow.com/questions/45022048/why-does-npm-in...

Re: Why is a Java guy so excited about Node.js and JavaScript?

#97

It's not Java, it's the java culture. Yes, Maven and Gradle are weirdly complex, but they are workable. And .jar files are just downright amazing compared to most other things (I'm looking at you madman Python dependencies!) Hint: maybe you could come up with something like npm for Java ? Maybe it's waiting to happen? And Javadocs are mundane but still better than 'nodocs' which is the standard on Node.js which reall…

Dependencies in python has evolved a lot in the last 2 years. You can use a simple setup.cfg to make them, and you can use a wheel like a jar if you want.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#98

Earlier quoted context omitted.

I'm a Redux maintainer. FWIW, I'm always open to suggestions on how we can make using Redux easier and better for everyone (example prior discussion: https://github.com/reactjs/redux/issues/2295 ). We're currently working on a "starter kit" package that's intended to address some of the most common concerns about using Redux, and hope to make it an official Redux-branded package in the near future. I'd appreciate any…

I made an alternative to Redux that requires a lot less boilerplate. Could you take a look? I'd love to know what a Redux contributor thinks. https://github.com/JonAbrams/SpaceAce

Take a look at what, specifically? If you want him to invest his time helping your competing tool, then respect that time and direct him to specific places where his input might be appreciated.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#99

Earlier quoted context omitted.

It's not just Java culture, though, it's also Java. For instance, you can't have "npm for Java," because that's not how Java works at a very fundamental level. Java gets gigantic monolithic framework libraries because Java's class loader works fundamentally differently from Node's CommonJS module system.

Wha? I don't think so. An npm-like framework could work for Java. The difference between classloading and node.js 'require' module loader is not super relevant. Frankly - the reason that Maven and Gradle are more sophisticated is because many Java projects are massive compared to most JS projects, the amount of complexity, various kinds of packaging, testing etc. necessitates some inherent complexity in modules. Java…

npm allows multiple versions of the same package - not ideal, but works. To do this in Java, you need multiple classloaders etc (basically what OSGi provides), but you are now in a different kind of hell.

edit : I forgot to add that Java modules may address this, but i am now out of the Java ecosystem for quite some time.

Re: Why is a Java guy so excited about Node.js and JavaScript?

#100

It's not Java, it's the java culture. Yes, Maven and Gradle are weirdly complex, but they are workable. And .jar files are just downright amazing compared to most other things (I'm looking at you madman Python dependencies!) Hint: maybe you could come up with something like npm for Java ? Maybe it's waiting to happen? And Javadocs are mundane but still better than 'nodocs' which is the standard on Node.js which reall…

Dependencies in python has evolved a lot in the last 2 years. You can use a simple setup.cfg to make them, and you can use a wheel like a jar if you want.

Unless C libraries are involved. Which is almost always the case.
Post reply on HN