Why I Love Java

MoDuLaRiTy!1!!!

@SgtAwesomesauce @MazeFrame @aLilBabyOtter @anon85095355 Just so we don’t keep shitting up the New Purchase thread with this garbage language lol.

I do like Java sometimes because it’s like a 25 piece jigsaw puzzle. You just snip! the pieces together and you’re good to go.

As I grow and become more exposed in my career, I’m starting to notice a few things about “Java Programmers” over “Programmers” or “Systems Programmers”

Lack of flexibility: They seem to rely on the whole “bean” and “spring” platforms a lot. Which is fine, I know a lot of backend programmers rely on their tools like gulp, grunt, etc. to get them going. But it seems to be more prominent in Java. ANECDOTE: I worked with a group that required Intellij for Dev – They couldn’t deploy their app from CLI or another means besides the Play button in their IDE. I was really confused, because you had to have your IDE configured… :thinking:

Lack of respect for systems programming: Tomcat, AWS, Apache, Spring… Anything to manage the resources except the actual programmer. This infuriated me to no end. Just people writing bloated garbage and expected the tooling around it to mop it up for them. ANECDOTE: My org had a meeting with the devs to talk about AWS costs. They were all lamenting and bitching about “How can we impact AWS costs?” – Couldn’t filter fast enough: “Stop writing shit code?” I said.

Apparently that was a foreign concept to this group of Java devs.

Oh and fuck Tomcat.

Y’all have the floor.

13 Likes

Yeah, don’t get me wrong, Java has some legitimate uses.

It’s just that (as in my workplace’s example) microservices are not one of them.

2 Likes

I actually don’t love Java, except the coffee kind.

7 Likes

Took CS101 and said, “fuck it, I’m all in.”

4 Likes

It has decent use cases but I despise it… and will always consider it the forbidden language … forget about it :rofl:

2 Likes

Yup I get a lot of the sentiment. Very briefly I was studying Computer Systems Management (fancy for call center training but you still have to go to and pay for college). One of our modules was programming which I was somewhat excited for, this quickly descended into Java programming… I was not happy. Instead of feeling like I was learning a skill it was being taught how to use duct tape and super glue. Just make an unholy mess that you cannot undo.

4 Likes

There is a certain third-party monitoring solution that has Java agents to collect metrics. I repeat: Java friggin’ agents. Guess how much memory that thing uses? Imagine having to monitor small services on small VM’s, it would take more memory than the actual applications it monitors.

And I agree, mostly. I feel like that any programming language that has to rely on frameworks to make it work is sacrilege. Framework knowledge becomes more important than knowing how to utilise the language itself, to the point one cannot exist without another (looking at PHP angrilly). Java is still capable in it’s own right, which is great.

1 Like

Java. Running 21st century software at 20th century speeds, today!

:face_vomiting:

It seems to be that today, Java developers get away with totally bullshit speed and/or resource consumption claims because nobody else actually writes in lower level software these days.

If you’re willing to take such a hit to resources consumption, just write it in javascript/node.js.

4 Likes

I’m pretty sure that resource consumption is not a function of the language per-se. It’s just that java makes it easy to not care about such stuff. Same for the whole Electron discussion.
It’s certainly possible to write Programs in Java that perform well. It’s just that those using lower level languages care more about this stuff. But that’s a general Problem nowadays. Not many Developers think of resource usage as a priority anymore, when most Desktops have 4-8 Cores 8-32G of Ram and Fast SSD’s. The Problem is 20 such Projects running at once.

I get why it is that way. I still find beauty in code that’s specifically slim and intended to use as few resources as possible. But no company is paying for this optimization anymore.

4 Likes

Introduction course to programming at the Uni used Java. Wasn’t bad language for a beginner in my opinion.

4 Likes

I think that’s not so rare. That’s probably even more so a thing with c#. Because at least in java you had maven back in the day that can compile the thing for you. Deploy it. It does everything. Before .net core your first task would have been to find the compiler in the first place, then figure out how to use it, because nobody ever did.

People probably would write performant Java code if they where capable of it. It takes much more knownledge to know what’s fast to begin with.
Usually people care more about maintainability than speed increases now as it does not end up mattering too much. Especially, when its ‘just using RAM’, does not matter as long as you’ve got enough RAM. Its mostly just how its going to be if there is ‘no appearent problem’ why solve it? After all we are paid to solve problems, not invent them.
If its possible to save a significant amount of your server bill. You also usually first have to persuade someone that it may be worth it to put some (possibly month(s)) of engineer time into that. Easier said than done ‘just make your code not s*ck’. :wink:

1 Like

I know what you mean. I have to deal with some pre-compiled perl scripts on Nagios that check some esxi Server stats. Those scripts take a full core for 30-40 seconds each time they run. No Problem when you have an instance of that running every 30 Minutes.
Now we have 50 ESXi Servers that have 5 instances of that script running every 5 minutes and this quickly gets problematic. I haven’t written those scripts and all i have is the binary code, so… No Fix possible. I could reverse engineer this, but i don’t get paid to do so. So we just throw more cores at the Problem :wink:

You see, I’m a mere programming student. College in Brazil is way different than in the USA but that’s not too relevant now. What matter is: no one of my colleagues even know how to deploy/develop/start anything on the console, most of them even use windows (most of these with pirated copies[is this how you write it? I hope so]), and even with PowerShell (which is nice, had played around with it a few times at work [can’t use linux here, it’s not tech related]) they refuse to learn CLI.

When I was using a chromebook to learn to code I had to do everything CLI and people called me a mad man (not for the hardware, but for the CLI). People take the IDE for granted and even brag about “having their IDE fully configured” and I’m always like… dude… every OS has a freakin’ shell… you shouldn’t rely that much on IDE…

And then comes the industry, looking at a job hunting website(called catho): 3,000 java jobs, 2,500 javascript jobs, 1,800 c# jobs, around 800 C++ jobs.

Almost every system you use is a laggy, unstable java one, including here at the Hospital I work.

I learnt the basics of C at college already, it’s pretty nice, but very hard to find a job that requires it as a main language, people here love Java and all of it’s stuff.

I’ll be honest with you, I’d love to use golang as a backend language, but if I invest on it I’ll probably be unenmployed, that goes with C/C++ also, but a lot less.

4 Likes

Just changed from a Java shop to a C# shop, loving it so far.

3 Likes

Yeah. It really does depend on your geographical location to what jobs are available.

1 Like

Real talk, how’d that go over?

I’m tempted to say something similar.

We are racking up stupid monthly costs. “maybe don’t write an Auth service in java/spring when you can use literally any other language/framework and use 10% the resources.”

God, I wish I could show you the container sizes and memory usages. If only you could understand my pain. :stuck_out_tongue:

5 Likes

The official openjdk docker images removed the Alpine one, so instead of the base being 75MB, now its over 280M.

I was pretty mad about that the other day when I tried to write my own images for dockerizing a minecraft server.

1 Like

Yeah, our images vary from 400 to 1800mb if it’s Java. The non-java ones top out at like 300mb or so?

1 Like

u would be surprised how many programmers are just code monkeys who learned a few patterns and can’t deviate from them, it’s not just Java problem, it’s just that’s what they were taught

7 Likes

The user of the tool factor.
Lets start with the ANECDOTE :slight_smile:
There was a team creating processing system for some metering hardware. From what I remember they had an expected spikes in their systems and needed to store up to the 1M transaction /records per minute. If they fail to do so, the data is gone. There was a division among that teem between Java developers and C/C++ developer. The C/C++ developers were convinced that they need to write XML parsing in native “fast” language for processing the data . So the trials began - teams separately started to working on the POC . The C/C++ team lost extremely miserably. After the end of POC their needed Java developers to even make their solution compile. After that help, the native solution was much slower than out of the box library in Java (years of optimization).

What I learned over the years, it is never the tool, it always person using it, that determines what is possible and how the solution look like. In my opinion there is no single other factor in that that matters even remotely as much.

Over the years I’ve seen Java developers praising Scala or other JVM language that make possible writing the code faster - the efficiency factor.
EDIT: it seems that I had some thing in mind but I did not finish:
The point was that I’ve seen the design behind their code - the efficiency of writing the code was the least of their problems.

The selection of the problem to solve
I would say that with the selection of the language often comes predefined selection of the available frameworks and tools. I tent to choose Java because there are usually at least several solutions for problems that I personally do not want to solve any more. First time it was an interesting challenge. Second time it was improved solution. The third time it was… job. I’m a person that like to write frameworks/libraries to not solve issues more than one time. But unfortunate aspect of being a contractor is that when you change the project you usually cannot take your ready to go solutions with you - copyrights. And the only escape from that are publicly available frameworks.

The issue of scale
That is quite obvious, the more popular language/environment becomes, the more not so super programmers you need to deal with. It has also a obvious solution. You choose projects that involve “challenge”, not just any project. I honestly, participated 2 weeks in a “normal” Java project. At the end I was screaming “I can’t take it anymore! I need to change project. There is nothing to do here.”. Do not take me wrong I participate in Java projects only for the last 8 years.
The issue of scale doubles when you take into account that those not so good programmers start to follow paradigms that they do not really understand. They become a followers of some sort of cult around the paradigm/pattern.
I honestly hate black-and-white CRT monitor inspired rules that comes with some languages - Java example: CONSTANT_VALUE (every single time).
Not to mention design patterns cults :slight_smile: Those brave programmers that still try to use silver hammer to dig a hole. They do not understand the issue they are solving but they are very sure that the silver hammer is the only solution to solve it :smiley:

5 Likes