Earlier quoted context omitted.
Another reason to avoid: Oracle owns Java. This automatically puts Java on my list of tools I'd prefer to avoid for new serious projects. (Legacy projects; if it's working and it isn't an issue yet, maintenance.)
Use OpenJDK! Never touch anything from Oracle. Then you will be fine. Oracle is the company that wants you to buy a license for your MariaDB(!) instance running on a small AWS instance! Yep, that happened. Source: have worked with Java for years, three of those around Oracle products.
Java Is Underhyped
191–200 of 808 posts
Re: Java Is Underhyped
#192Being excited about Java is like being excited about dirt—not any particular dirt, just dirt in general. Yes, practically everything that grows grows in dirt, and anybody can walk on dirt, and in a pinch you can throw it at people or dig a hole and crawl in. Dirt. Java was designed by people who had absolutely no intention or desire to ever use it. They cribbed parts from other languages they didn't really understand…
Re: Java Is Underhyped
#193Earlier quoted context omitted.
I've seen plenty of even small Java projects becoming hard to manage as well. The design pattern hell is a thing. You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :) Not to say Java is not a great language for big projects, it certainly is well equipped for that, especially because it has superb tooling available on the market. But I've done plenty of big projects in Python, some ended…
> You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :) I think this joke is probably about as dated as the versions of java it was made about.
Singleton is still a design pattern used in the wild.
Re: Java Is Underhyped
#194Earlier quoted context omitted.
I've seen plenty of even small Java projects becoming hard to manage as well. The design pattern hell is a thing. You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :) Not to say Java is not a great language for big projects, it certainly is well equipped for that, especially because it has superb tooling available on the market. But I've done plenty of big projects in Python, some ended…
> You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :) I LOL’d at this joke (again) because it’s true, but if we’re honest, it’s also unfair. ProblemFactory is a bad idiom, rather than anything to do with Java The Language. You could (and IMO, probably should) just use a new Problem(). Java The Language was very stable for a very long time, so IMO the hype and fads got built on top. Firs…
Stuff like "everything is a class".
Re: Java Is Underhyped
#195JVM is great. I think it gets a lot of love (in comparison with .NET Core which is IMHO as good as JVM). In this one, you see JVM everywhere except desktop apps.
Then, there's Java itself. As a language, it really isn't as modern and doesn't provide much what isn't already available in C#, Scala, Kotlin, or even PHP or TypeScript. And it doesn't provide some things that other languages have. So on this scale, once you know Java, you can be productive, but I doubt you will be more productive than someone who knows C#, Scala, etc.
And then, there's Java culture. Plenty of Java devs (mainly in J2EE, Spring world) don't develop in classes, they develop in design patterns. AbstractFactoryStrategy, complete abstracting out databases, five layer data models, classes for things that should be enums. It's a matter of taste, you don't have to do it (Android devs don't do this that much even when they use Java). And I think all the coolness of modelling, UML, etc. is over.
I think, you can be productive in Java (if you use it a bit like PHP). I think JVM is fantastic. For me, I am 8 years in Clojure world and I wouldn't go back to design patterns, writing (in Java often generating) dozens of lines of code just to insert something to the database (entity, mapping, repository, business logic layer, etc.) when in Clojure, this would be three lines (defn, schema check, insert).
Re: Java Is Underhyped
#196Off tangent: Is C# hated for the same reasons people here dislike Java for?
Re: Java Is Underhyped
#197Earlier quoted context omitted.
How did you manage to miss the entire point of the comment?
I didn't, thanks. I think that there are use-cases in which java is more performant than his low-performance options, and can be as performant as his high-performance options, while providing a much larger ecosystem. I think the parent poster actually makes a very weird set of choices - "when my high level choice, python, is not cutting the mustard, I am happy to throw away breadth of support entirely in the name of…
Re: Java Is Underhyped
#198Earlier quoted context omitted.
I've seen plenty of even small Java projects becoming hard to manage as well. The design pattern hell is a thing. You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :) Not to say Java is not a great language for big projects, it certainly is well equipped for that, especially because it has superb tooling available on the market. But I've done plenty of big projects in Python, some ended…
> You know the joke: a dev has a problem, uses Java, and now has a ProblemFactory :) I LOL’d at this joke (again) because it’s true, but if we’re honest, it’s also unfair. ProblemFactory is a bad idiom, rather than anything to do with Java The Language. You could (and IMO, probably should) just use a new Problem(). Java The Language was very stable for a very long time, so IMO the hype and fads got built on top. Firs…
Same goes for Python. Reading the hacky code of a geographer for his SIG system is rarely a fun day.
Re: Java Is Underhyped
#199There are a few reasons to avoid Java today. - The programs are very verbose for the functionality they provide. There are countless lines of getters, setters, and trivial constructors. While IDE helps to write them, it makes reading existing programs slow and frustrating. Lombok helps, but very few programs use it. - If you do want to use Java ecosystem, there is Scala. It also has strong type system, nice IDE suppo…
There are one or two knobs left but those are fundamental to GC technology and it's not even obvious they're bad to have. GC lets you trade off memory against CPU time in ways manual memory allocation does not. You can throw memory at your program and it'll run faster, or you can constrain it and it'll run slower, but that's not a decision the developer can always reasonably make. It's in some ways inherently an ops/deployment/end user thing.
Other GCd languages either:
1. Have knobs too (Go/.NET both have knobs), just usually not very good ones.
or
2. Are so slow (Ruby, Python) that GC tuning is really the least of your worries and they just don't expose it at all.
or
3. Are JavaScript, in which case everyone pretends that running a VM designed exclusively for laptops and mobile phones on the server isn't a giant waste of resources. V8 doesn't do GC tuning because its only real customer is web browsers where users can't do that, and heaps are small anyway.
Java ended up getting a totally unfair rap about GC because it actually was fast enough that GC performance mattered, and was interested in power users on the server where exposing knobs can make sense. Other competitors don't even try, but this doesn't make them better. After all, nothing stops you just ignoring the knobs and plenty of users do exactly that.
Re: Java Is Underhyped
#200Speaking as a near 20 year Java programmer, Java is criminally bloated at every level. The ecosystem has been covering for its shortcomings since y2k. That ecosystem is so thick and full of abstraction that no two devs from different framework backgrounds would recognize the others code as Java. And the abstraction... it is a language for people who are more interested is the abstractions than actually getting things…
I make a point of starting all new projects with just the JDK, and taking that as far as possible before adding dependencies.
A 40k LOC codebase i work on has these external dependencies (plus some company- and vendor-specific libraries, which we would need in any language):
1. Netty, for serving HTTP
2. Glassfish JSON, for parsing and formatting JSON
3. FastUtil, for efficient collections of primitives
4. Guava, purely to get PairedStatsAccumulator
5. SimpleFlatMapper, to parse and format CSVs
No frameworks, no criminal bloat.
For the first few years of its life, this app used the JDK's own HTTP server, which was fine. Then we wanted to add websockets, so we needed a more sophisticated server.
If there is a problem with Java here, it's that people don't realise you don't need frameworks. A lot of developers will reach for Spring, Java EE, or something else like that right at the start of a project, without questioning the need for it. But this is not a failing of the language, or a problem you have to impose on yourself.