Live data from Hacker News

Why I Like Java (2014)

blog.plover.com

61–70 of 152 posts

Re: Why I Like Java (2014)

#61
post #24

Earlier quoted context omitted.

> regularity and good api design are much more important Do note these are more than a little flaky with many of the Java libs out there ;) There's a bit of everything, good quality and poor Java code. It's just that there is so much of it out there, that a lot tends to be crud.

Can I say one thing that is great about the JAR ecosystem -- at least in a safe "closed moat" enterprise setting? Monkey patching buggy JARs! In my experience (and many others!), it is pretty common to manage an enterprise Java project that is stuck on an ancient version of a JAR. (This can be true in any language.) If you find a bug, it might be too hard to upgrade to the latest version. But you can easily copy the…

I actually agree with all of what you say. I have done monkeypatching of that sort -- as a workaround for some bug in Apache Wicket, I forget the details -- and it wasn't elegant but it worked.

Also agreed, I'm sure other ecosystems share these problems. I know nothing of Perl, but I trust you on that.

Re: Why I Like Java (2014)

#62
post #15

Earlier quoted context omitted.

People say this but where do you find libs for Java? Python has pip, JS/Node has NPM

> People say this but where do you find libs for Java? Everywhere, on the lib website, on GitHub, on Apache, etc. (including centralized places like Maven Central). You then put a ferences in your Maven or Gradle file like you would in your package.json. In fact, because for 99% of the libraries you just need to have a jar (or more) in your classpath, you don't have to have all the ceremony that Python has, and all t…

Until you end up with dependencies transitively pulling in conflicting versions of Jackson or similar and you need to mess around with dependencyManagement or exclusions.

Re: Why I Like Java (2014)

#63
post #21

Earlier quoted context omitted.

The point being that at scale all code should be written the same way, in an environment where most teams are composed of rotating consultants.

Well, the counterpoint is that you shouldn't have a team composed of rotating consultants. And if you have one, you can't expect it to deliver anything with any quality or productivity. But yes, if that's your team, then all code should be written the same way, all on the most boring way possible. There's a reason Java and C# are so popular.

This is the modus operanti from all Fortune 500 whose main business isn't shipping software, for them IT is a cost center.

Re: Why I Like Java (2014)

#64
I'm not a professional Java developer, but I work at a company that uses Java, so it just came with the territory to understand things about it, even though I've already had at least a basic grasp of it. I feel blessed that most of the code is mostly straightforward Core Java code (as opposed to any framework-level fun). It is treated a bit like a systems programming language. However, I can agree with this article. It's safely boring to me (despite the fact that having an IDE to write your boilerplate is still necessary for the sake of your fingers.)

Since not being a pro at it and not planning to be, I'd rather toy with other things. The job market is diverse in its technical needs. :)

Re: Why I Like Java (2014)

#65
post #15

Earlier quoted context omitted.

People say this but where do you find libs for Java? Python has pip, JS/Node has NPM

> People say this but where do you find libs for Java? Everywhere, on the lib website, on GitHub, on Apache, etc. (including centralized places like Maven Central). You then put a ferences in your Maven or Gradle file like you would in your package.json. In fact, because for 99% of the libraries you just need to have a jar (or more) in your classpath, you don't have to have all the ceremony that Python has, and all t…

[deleted]

Re: Why I Like Java (2014)

#66
post #31

> Different languages have different failure modes. With Perl, the project might fail because you designed and implemented a pile of shit, but there is a clever workaround for any problem, so you might be able to keep it going long enough to hand it off to someone else, and then when it fails it will be their fault, not yours. With Haskell someone probably should have been fired in the first month for choosing to do…

The author makes it really hard to judge his tone, but I don't think you're reading it right. For example, if you peruse his other articles, it's clear he really likes Haskell (he certainly doesn't consider it evil). I can't say I understand every one of his assertions, and trying to be funny/sarcastic makes it hard to truly understand the point of his article, which I think is: Java lacks focus and is a verbose lang…

I thought he summed up the tone pretty well earlier in the article:

> Java is neither a good nor a bad language. It is a mediocre language, and there is no struggle.

To be more explicit - I think the point he is trying to make is that Java is not very powerful (in sense of expression), which has benefits (making it hard to fuck up badly) but at the cost of pushing the programmer towards mediocre, verbose and inefficient solutions (again due to lack of expressiveness, trying to come up with elegant and efficient solutions is too tiresome).

Perhaps it's the difference between a scalpel and a blunt club. You're not going to cut off your own fingers with the club, but you're not going to be able to perform brain surgery or fix someone's heart either. Not the best analogy because technically Java and any other language is turing complete, but they are not equal in how easy it is to coerce the machine into performing a particular computation, and expressing that humanly.

Re: Why I Like Java (2014)

#67
post #2

> write a program that copies standard input to standard output This is pretty trivial in Java, just as in other languages. But most people don't ever need to learn the low level `System` methods needed to do it. To me, this highlights the difference between a comprehensive approach to learning a language and a more piecemeal one. I learned Java by reading the canonical books from cover to cover, like Effective Java.…

Your comment made me think of a very difficult programming interview question: Can you copy STDIN to STDOUT in a non-blocking fashion? My point: The most trivial solutions assume that STDIN will give you all the data very quickly, then STDOUT will accept 100% "instantly". Using only Java, I don't know the solution off the top of my head. I will need to do a little bit of research.

However, using POSIX calls with C (select() and friends), yes, I could imagine a way to do it.

Deeper: Can you write a function to launch an external process then (a) write to its STDIN, (b) read from its STDOUT, (c) read from its STDERR -- all independently and without blocking? It's a hard problem!

Re: Why I Like Java (2014)

#68

I’ve recently joined a company using Java. I’m open minded, and know that there are lots of good things about the JVM and the modern Java language. However one thing I hate is the complete disregard for command line UX. People writing Java command line tools seem to think it’s absolutely fine to spew 1000 lines of unformatted informational messages and non actionable warnings with bizarre indentation and not to provi…

Especially annoying when reams of nonsense also gets 'unexpectedly' sprayed into the web browser of some poor sod using an enterprise app, just because Java is having a bad day. This seems to happen less than it used to a few years ago, so there is some progress going in in software engineering, somewhere.

Re: Why I Like Java (2014)

#69

I’ve recently joined a company using Java. I’m open minded, and know that there are lots of good things about the JVM and the modern Java language. However one thing I hate is the complete disregard for command line UX. People writing Java command line tools seem to think it’s absolutely fine to spew 1000 lines of unformatted informational messages and non actionable warnings with bizarre indentation and not to provi…

Nobody wants to be blamed for something not being in the logs, probably in production. So everybody adds everything to the logs, you can always filter out the noise but not the reverse, right? And very soon the logs are completely unusable for your regular-dev cycle. Of course in java world, the IDE reigns, and checking logs is an "antipattern" anyways, you must use the fantastic debugging GUI that is provided by the behemoth. Everything is normal, you see.

Re: Why I Like Java (2014)

#70
Java: plentiful well paying jobs, good/great tools, good/great runtime. Personally, I like boring, predictable, "easy" (referring to low cognitive overhead of statically typed languages in general) for work, and save the fun stuff (lisp/scheme in my case) for personal projects.
Post reply on HN