DEV Community

Cover image for Pitch me on Java
Ben Halpern
Ben Halpern Subscriber

Posted on

Pitch me on Java

Continuing the series! Feel welcome to dip in and weigh in on a past question.

Let's say I've never used Java before. Can anyone give the run down of what the language does and why you prefer it? Feel free to touch on drawbacks as well.

Latest comments (60)

 
bigbott profile image
Yuriy Novikov • Edited

Ok. Let me give you kindergarten level example.

I think that Ferrari is fast compared to OTHER bicycles.
Word OTHER here means that Ferrari is a bicycle. Otherwise, it completely redundant.
I hope you finally learned something.

Also, you don't actually need to think about Java performance. Just check some benchmarks. For example: github.com/kostya/benchmarks. You will see that Java between fastest and for some tasks Java is the fastest language. And its main competitors are C, C++, Rust and Go. Are those interpreted in your opinion?
You will also see, that comparing Java to interpreted languages like Ruby, Python and PHP is meaningless as its performance usually ten times higher.

Opinion that Java is slow comes exclusively from "new language of the day" propagandons and aimed into idiots who tends to believe everything they read more than once.

 
bigbott profile image
Yuriy Novikov • Edited

You don't have problem with Java alone, but with English and languages in general.

Sentence: "I don't think it's performance is bad compared to other interpreted languages." states that you think that Java is interpreted language.

Collapse
 
drozdodo profile image
Dominika Drozdova

Hi All! I am recruiting for Java,C# and C++ roles fully remote if anyone is seeking a new role or looking currently!

Collapse
 
codewander profile image
Anon

My random impressions:

java community - bureaucratic over engineering
python, ruby, node community - under engineering
go community - enough engineering

clojure, scala, haskell, rust, elixir - more elegant, enough engineering

Collapse
 
s2rgi0 profile image
sergio

One of the pros could be that if a senior developer leaves you can almost get anybody to continue the proyect

Collapse
 
bigbott profile image
Yuriy Novikov

Kindergarten here.
When Java became interpreted?
Go to school, take some lessons.

Collapse
 
ant_kuranov profile image
Anton Kuranov

Pros

  • Type-safe: design and modelling, compile-time errors, IDE support, etc
  • Huge ecosystem: frameworks, tools, libraries, documentation, support, etc...
  • Reliable: developed and supported by industry-leading companies
  • Fast and stable on different workloads
  • Still in top of jobs vacancies
  • Medium entrance level => (mostly) experienced engeneers in your team

Cons

  • Oriented mostly to backend development, almost is not presented on frontends
  • Not so modern and contains a lot of legacy stuff, however the language is still now in active development of new features
  • Verbose: standard design patterns require a lot of boilerplate code
  • Memory consumption (there comes some optimizations like project valhalla)
  • Slow startup and "heating" time (may be critical). May be solved withcompilation to native code.
Collapse
 
gjorgivarelov profile image
gjorgivarelov

Ok Ben, let's say you've never touched Java. Which may imply you are an aspiring developer looking for a way to prove your competency. Java provides that pathway to proven competency by its certification series. You study and take an exam, you pass and hang a badge on your social media profile. You become proficient and build a portfolio. And then you showcase it to potential clients. Proof of competency taken care of.
You also learn object oriented programming. You learn about code reuse, inheritance, polymorphism which may be a novel approach to developing applications to you as an aspiring developer. Many educators of Java programming make their case for Java by comparing it to its predecessors C and and C++, so you get to learn about other languages along studying Java.
Number of job openings for Java developers might be an incentive to you as an aspiring developer to take the path of learning Java.
I will deliberately skip on arguing for Java on a technical level, that discussion won't have an end/conclusion. Pick a tool that'll do the job, and if Java can do it or if you are paid to use Java to do that job and you already are an accomplished developer with expertise and experience under your belt, nobody would have to pitch it to you.
Now for those of us learning Java just because, its platform-independence feature might look appealing. Execute the same code on either Mac, Linux or Windows, that may draw you in. Java, just by the fact it has been in use for so long, has built itself a steady following and a ton of documentation, it has been around for decades. Plenty of how-tos on the web regarding Java, if that is your chosen path to learn Java. Which then begs the question: once you think you get proficient with Java, what's the next step? Multiplatform feature has much less of an appeal now with the prevalence of cloud computing and the clear win for the platform agnosticism. Use Java for web apps like ye olden applets? Many other tools now exist much better suited for that task. Data science? Again, much better suited and better built tools exist for that field. IoT? Embedded systems programming? Those are yet more dead ends for Java.

 
leob profile image
leob • Edited

I've worked at a company where they had a gazillion tests and still the codebase was a disaster, lol ... use any great theory or technique in a wrong way, and you'll still suffer ... in many cases it's just about people needing to take their blinders off, and get out of their dogmatic mindset

Collapse
 
dukemagus profile image
Duke

Can i do a half-pitch?

Learn enough java so you can read and understand it, then learn Kotlin to write your own tools.

Java is verbose and clunky, but it has decades of tools, programs and libraries done and availiable, most of them open source.

Since Kotlin can use any java library and compile to JVM bytecode, you keep access to all the millions of developer hours Java accumulated while still using something lean and concise to write your own code