Live data from Hacker News

Why I Like Java (2014)

blog.plover.com

111–120 of 152 posts

Re: Why I Like Java (2014)

#112

Java has a high bar for the amount of prerequisite experience it takes to write good code. In other words, it has too many pitfalls for beginners. It is a phenomenally poor choice of language for teaching beginners to code. On the other hand, a lack of beginner-friendliness could also be seen as a lack of effective static analysis. Of course, this is a very Java programmer point-of-view. Others: "you shouldn't need t…

Java ain't no Scala to have any unusual prerequisites. It was designed as the golang of the day and that still shows in its lack of particularly sophisticated features.

Speaking of beginners, I'd venture to say that Java has the largest library by now. From Core Java to Java Concurrency in Practice, pretty much everything was well described years ago. The same is true about Design Patterns/Refactoring/DDD-related literature which was originally popularized mostly in the Java world.

I actually agree that JVM-like platforms should not be used for teaching beginners. Something like Python (or TypeScript?) is probably appropriate for high school usage. In my time it was Borland Pascal which was a nice first real language and a great IDE. All on a single floppy disk :))) I

Re: Why I Like Java (2014)

#113

Earlier quoted context omitted.

No isNullOrEmptyString method, no Set operations, Java didn't have a good HTTP library until Java 11, no lazy file reading, unless you use InputStream which is a pain. vast majority of mediocre libraries and one man libraries. We use Spring because it uses the best libraries, so the other ones are discarded. Java being around for so long doesn't have a lot of convenience methods like others do languages do, like the…

What’s C# and .Net really like on Linux now? I know Microsoft says it’s great but I’m once bitten twice shy after trusting that Azure would be good. I am happy to try different languages but I will never again support a Windows Server over a Linux VM.

I use .NET 6 on Amazon ECS (Amazon Linux), and it's a pleasure to work with. The dotnet CLI makes running and building super easy. So, I just develop with VS Code and a terminal on macOS and deploy to AWS.

Re: Why I Like Java (2014)

#114
post #93

Earlier quoted context omitted.

I'm really not sure I would call Java's standard library comprehensive. I've only worked with it for a few months but needed many Apache commons libraries.

By the standards of the day, when Java was released it's standard library was pretty comprehensive: in addition to covering most of the c-ish stdlib, it had networking and web-aware apis. It did set a new standard in a way that was very beneficial for the languages that came after it: you're not an ACTUAL language if you don't have a "good" standard library, and I can argue that "good" was defined by Java more than C…

HTTP as well. Added in Java 11 (2018), but that's still an insanely long time to rely on third parties.

Re: Why I Like Java (2014)

#115
post #95

I've found Kotlin to be a fantastic Java substitute. Fully compatible with Spring and seamless interop with Java. Though I prefer Clojure where that's possible.

Kotlin is surprisingly good if you cannot afford Scala. It's less divergent from the Java ecosystem and doesn't introduce anything conceptually new. But it's not that popular on the backend.

The only thing about it I personally find very unpleasant is its idiomatic approach to concurrency. In the world of Futures and go routines continuations are such an outlier.

I find it hard to remember more than one company I have interviewed with in the last ten years using Clojure. It was hyped together with Erlang in 2009 or so and nobody remembers either.

Re: Why I Like Java (2014)

#116

Earlier quoted context omitted.

No isNullOrEmptyString method, no Set operations, Java didn't have a good HTTP library until Java 11, no lazy file reading, unless you use InputStream which is a pain. vast majority of mediocre libraries and one man libraries. We use Spring because it uses the best libraries, so the other ones are discarded. Java being around for so long doesn't have a lot of convenience methods like others do languages do, like the…

What’s C# and .Net really like on Linux now? I know Microsoft says it’s great but I’m once bitten twice shy after trusting that Azure would be good. I am happy to try different languages but I will never again support a Windows Server over a Linux VM.

I have C# web apps hosted on Linux for something like 2-3 years and it works very fine

Re: Why I Like Java (2014)

#117
post #95

I've found Kotlin to be a fantastic Java substitute. Fully compatible with Spring and seamless interop with Java. Though I prefer Clojure where that's possible.

Kotlin is surprisingly good if you cannot afford Scala. It's less divergent from the Java ecosystem and doesn't introduce anything conceptually new. But it's not that popular on the backend. The only thing about it I personally find very unpleasant is its idiomatic approach to concurrency. In the world of Futures and go routines continuations are such an outlier. I find it hard to remember more than one company I hav…

I'm actually working in a Clojure job at the moment, but they're definitely hard to find. Scala is far more common.

Re: Why I Like Java (2014)

#118
post #25

Earlier quoted context omitted.

> JS/Node has NPM If this isn't a joke, I'd suggest learning the Maven or Gradle build systems. NPM has such horrible dependency management that these Java systems will seem like magic!

OK, so I'm trying out maven central as people in this thread are recommending. As an example, I'm searching for a command line argument parser. The first thing I'm noticing is that there seems to be no way to judge the popularity of the libaries (an often-used proxy for quality, e.g. number of downloads, GitHub stars, etc). I enter "argparse" and the first hit isn't even Java! It seems to be a npm package?? https://s…

I think you're searching in the wrong place. The first search result for "argument parser maven" in google search yields this [1] - an ordered list of maven dependencies for "Command Line Parsers".

[1] https://mvnrepository.com/open-source/command-line-parsers

Re: Why I Like Java (2014)

#119
post #11

You can write a pretty trivial Java program to copy stdin to stdout but Java is still one of the enterprise languages and people writing enterprise applications don't tend to write this type of software (but they do tend to have log4j vulnerabilities). The strengths of Java are its mature dependency management system(s), its comprehensive standard library and the vast ecosystem of third-party libraries. A better test…

No isNullOrEmptyString method, no Set operations, Java didn't have a good HTTP library until Java 11, no lazy file reading, unless you use InputStream which is a pain. vast majority of mediocre libraries and one man libraries. We use Spring because it uses the best libraries, so the other ones are discarded. Java being around for so long doesn't have a lot of convenience methods like others do languages do, like the…

Java didn't have all these things, because there were a lot of very good libraries already doing that. Adding them inside a project is trivial. I think this approached encouraged creating alternatives to the standard APIs as well as extensions which in the end made the language even more rich.

Re: Why I Like Java (2014)

#120
post #50
post #11

You can write a pretty trivial Java program to copy stdin to stdout but Java is still one of the enterprise languages and people writing enterprise applications don't tend to write this type of software (but they do tend to have log4j vulnerabilities). The strengths of Java are its mature dependency management system(s), its comprehensive standard library and the vast ecosystem of third-party libraries. A better test…

The domain and the developers that inhabit that domain should be separated from the language. Below is the repo of the companion Java code to Sedgewick's "Algorithms" - make of it what you will. https://github.com/kevin-wayne/algs4/tree/master/src/main/ja...

Thanks, I have another "Sedgewick" and wasn't aware of the repo (not in immediate need of it, but nice anyway!)
Post reply on HN