Hacker News new | ask | show | jobs
by ActorNightly 1546 days ago
Personally, after the log4j fiasco, I wouldn't touch Java.

The standard ecosystem setup is to use all the major 3p libraries for all your functionality (Jaxrs, swagger, log4j, jersey, e.t.c) While this generally works, the ecosystem is full of holes (like log4j), and crappy behavior. You get things like "javax.ws.rs.ProcessingException: Already connected", exceptions which mask underlying issues like not being able to find the endpoint, or SSL certificate error, mainstream clients for things like Redis having issues with multiple connections and unable to switch to master nodes, and so on.

The core language itself is very "dirty" (Integer vs int, requiring a class for the main function, e.t.c). The standard way annotation processors add functionality is to basically write out java files, (or in the case of the ever so popular Lombok, they hack the AST). Because of how annotation processors are run, often times an error during annotation processing with dependency injection will result in very cryptic errors, often about things that were working before that you didnt change.

And on top of everything, jdb debugger is pure garbage, forcing you to use bloated software like IntelliJ for any decent functionality.

Yes, you can learn the ecosystem and its idiosyncrasies, or you could just write the thing in Python or Node with a much more efficient workflow. Network latencies dominate the processing speed these days, and infrastructure is cheap compared to developer time.

2 comments

Pythons indentation errors and complete lack of variable types make it a kids scripting language at best. It is only useful for quickly cleaning data up for clock watchers at Mega Corp XYZ and its libraries like scikit learn which are kinda cool but it's best to link some python scripts and do everything else as a Java project. Data science cleaners / janitors are usually very limited energy wise from fapping and have that cuck squarish personality thing going on so they like pythons lazy approach to coding.
> Network latencies dominate the processing speed these days

I want to see data on this. It gets repeated over and over but this doesn't match my experience at all. Am I crazy?

It takes me about 250ms to load hackernews as seen on the browser debug network tab. The total compute for that request is minimal. Speeding this up may reduce total infrastructure costs, where if everything is kept static you will see benefits long term, but in terms of reducing total latency, it will be next to irrelevant.
I can list a ton of tools I use daily that are incredibly slow, but don't even need the network most of the time.

By "incredibly slow" I mean comparing what it does versus how fast it could be on an average machine.

Network and other I/O latency is often used as an excuse and sweeping generalization. It's never that easy. You need to actually look at a running process and gather data about it before you can make claims about what the bottlenecks are. Also even if there are constant factors that you cannot optimize it doesn't absolve a program from being slow in every other aspect, secondly there are techniques to mitigate and isolate latency bottlenecks.