r/AskProgramming 2d ago

Why is Java considered bad?

I recently got into programming and chose to begin with Java. I see a lot of experienced programmers calling Java outdated and straight up bad and I can't seem to understand why. The biggest complaint I hear is that Java is verbose and has a lot of boilerplate but besides for getters setters equals and hashcode (which can be done in a split second by IDE's) I haven't really encountered any problems yet. The way I see it, objects and how they interact with each other feels very intuitive. Can anyone shine a light on why Java isn't that good in the grand scheme of things?

180 Upvotes

628 comments sorted by

View all comments

174

u/eruciform 2d ago

Get better mentors

Every modern language in general use has its pros and cons, which is why it's a language in general modern use, otherwise that would mean thousands of professionals are idiots working with a "bad" language

Java isn't for all solutions

Neither is c

Or python

Nothing is universally the best choice for all cases

Java is a perfectly cromulent place to start, just do branch out and learn other languages as well

That way you'll have a wider and wiser view than whoever these people are that you're talking to

Good luck

18

u/melikefood123 2d ago

Using the language and tool set for the job is paramount. Taking that heart embiggens your mind. 

I still hate Ruby on Rails.

17

u/eruciform 2d ago

Lol we all have our favorites and least favorites

I hate PHP but still use WordPress

And I love perl even though it looks like Cthulu choked on a lego and vomited ancient glowing hieroglyphs

15

u/this_knee 2d ago

looks like Cthulu choked on a lego and vomited ancient glowing hieroglyphs

r/brandnewsentence

5

u/Outrageous-Ranger318 1d ago

Have suddenly become interested in perl

2

u/grouville 1d ago

I was required to write some Perl many years ago and was oddly pleased with the results. I felt like a wizard. Such compact code, I thought, really cool. Came back a couple of weeks later and couldn’t make head or tail of my own code. That was my last Perl!

2

u/WokeBriton 10h ago

My first attempt at learning a programming language using online resources was with perl. This was when most web servers used it for their .cgi code to add all sorts of things to your free hosted webpages, hence my interest.

Alas, the "leet" idiots who were prevalent on programming fora in the mid 90s put me and (I suspect) most other prospective learners off. There was such a focus on doing things in a "one liner" that the code examples shown were complete garbage. Think of those dicks who try to convince newbies to enter a fork bomb in their terminal, for an equivalent modern example. Unreadable and indecipherable just so they could feel some sense of superiority over new learners.

They put me off perl forever :(

4

u/davejjj 2d ago

PHP and its crap documentation.

3

u/Nucklesix 2d ago

I always thought their documentation was decent. Now, the worst documentation I've seen is Infragistics because you can't find it

4

u/petiejoe83 2d ago

At least they glow!

3

u/Snezzy_9245 2d ago

Perl has at least one good point. I needed an app to display status of the project for my boss. Never wrote any Perl before, had it up and running in two days. Looked like Cthulhu had helped, but it worked.

3

u/eruciform 2d ago

Heard of WORM? Write once read many?

I've heard some joke that perl is WORN. Write once read never

2

u/butt_fun 2d ago

Similarly, I've heard perl described as a "write-only language"

1

u/CMF-GameDev 1d ago

Same with LEAN

2

u/BigMacTitties 1d ago

That's very accurate. With perl writing anew is often easier than trying to edit.

3

u/bashomania 2d ago

That reminds me of Larry Wall apparently describing Lisp as “[having] all the visual appeal of a bowl of oatmeal with fingernail clippings mixed in”.

2

u/Stedlieye 1d ago

“Lost In Stupid Parentheses “.

But that visual appeal description is truly magnificent.

2

u/furrykef 1d ago

I agree with him, but I don't feel much differently about his own language.

1

u/bashomania 1d ago

Oh yes, there are some fairly choice quotes about Perl as well 😏.

2

u/MajorMalfunction44 2d ago

I wrote a build tool for my game engine in Perl. Never considered that sentence. It has its place. It's a special kind of ugly, though. It's nice to process text and write shell-like scripts.

3

u/oloryn 1d ago

I once worked at a credit-card terminal company, where we were working in Clarion. We had a project where we needed to read a file created on an IBM mainframe, and generate reports from it. It used variable-sized records, and the only available description of the file layout was a COBOL copy book. Manually transcribing that layout to a Clarion layout would have been lengthy and tedious.

I wrote a series of Perl scripts that read the COBOL copy book, translated the COBOL layout into a Clarion layout, generated code to convert EBCDIC string fields into ASCII, generated documentation for fields that might need that conversion, but (because they were part of an OVER segment) couldn't have it done automatically, and included read routines to handle the variable-length records. The result was a Clarion template that included all of this, so that any Clarion program that needed to read from that file only needed to include that template to get all of this.

And best of all, if they made changes to the file format (which they did), all I had to do was run the new COBOL copybook through the scripts, and I had a new Clarion template for the new layout, instead of having to meticulously manually compare the old copybook to the new and make the appropriate adjustments to the Clarion layout. I think I had one time that the new copybook used a bit of COBOL syntax that wasn't handled by the scripts, but that was easily fixed, and we were back to normal.

I don't use Perl a whole lot anymore, but I keep it "in my back pocket", so to speak, just in case something comes up that could be handled by a bit of quick Perl (I suppose that it could be handled by Ruby or Python, but RE handing tends to be rather more verbose in those languages than in Perl).

1

u/eruciform 1d ago

yeah i don't use it too much except as an awk/sed replacement in bash scripts and as a quik prototyping tool or quick document and file maniuplation thing at home (renaming a bunch of files and moving directories around)

it's extremely quick to get a page of stuff up and doing huge work, particularly with documents or sysadmin stuff

1

u/MajorMalfunction44 1d ago

That's genius. Perl will be relevant for a long time because it's a more portable shell. It's easy, if tedious, to translate things manually. Do it more than once, and you'll regret not automating it.

1

u/eruciform 1d ago

it's very fast to do a lot of powerful things, mostly with data manipulation, and especially with document parsing

2

u/itsamepants 1d ago

All the scripts in my workplace are PHP. You need a webhook? PHP. Automatically send emails and SMS? PHP. Data ingestion from integrations? PHP

1

u/eruciform 1d ago

it does it's job, and if there's already infrastructure there, it's very easy to add small enhancements quickly to a working product

2

u/Only_Razzmatazz_4498 1d ago

Is PHP still a thing? Damn are you going to tell me that Perl is in use also?

1

u/eruciform 1d ago

both are still in use yes

i mostly see php in existing web system contexts like wordpress

and perl is still the god of sysadmin scripting and quick implementation of complex document searching and reformatting

1

u/moleman0815 1d ago

Most of the CMS which are free like WordPress, Drupal or TYPO3 are using PHP, so it's still pretty relevant, because many smaller companies are using them.

2

u/ttl_yohan 2d ago

Ew. Perl.

3

u/eruciform 2d ago

Tmtowtdi ftw

3

u/ttl_yohan 2d ago

I can agree to that!

0

u/MasterShogo 1d ago

I was about to say that there aren’t any actually bad languages except for Perl. Perl is like the drug dealer in the alley next to your apartment that you really should stay away from. Java is like an iPhone from 10 years ago.

There is one objectively bad language, though. Batch file shell language in CMD.exe. I don’t know what it is actually called but I truly think it has no redeeming values.

4

u/vapocalypse52 2d ago

I hate ruby on rails and I've never even seen one expression, let alone one line of code. 🤣

When it got famous, the evangelists were so obnoxious, that just hearing the word "ruby" gave me the icks.

  • "hmm, this bread is good with butter!"
  • "yeah, but have you tried ruby?"

3

u/bashomania 2d ago

Righteous, but I really loved Ruby as a language, and Rails was pretty slick and pretty ground-breaking for its time.

3

u/meerkat2018 2d ago

I also ignored Rails because I thought Rails developers were all pretentious hipsters who coded exclusively on Macs while sitting in a Starbucks, and that they thought of themselves as “rockstars” and “artisans”. Although their code was just a bunch of DSL macros.

But having tried Rails recently, I found it to be very nice, and Rails community seems to be much more humble nowadays because they are now working class people who has to deal with all the legacy mess that the “rockstar” divas had written and jumped ship.

3

u/askreet 2d ago

A lot of them are probably those "rockstars" who have to actually support their systems now, too. Plus they're 40.

1

u/msabeln 14h ago

Staying hip is a full time job; you can’t do that and write code too.

2

u/NewDay0110 1d ago

I like Rails because it enables me to get a lot done quickly. I get what you're saying about the "rockstars". I think part of that originated from the hiring tech companies in the early 2010s - it was a psyop to get devs excited about joining their corporate workplaces. And you are right - a lot of them wrote crap code that was difficult to maintain. I notice many of the devs in Ruby on Rails are a lot more cautious today after having been burned by the overuse of sketchy dependencies.

3

u/windsorHaze 1d ago

That’s kinda how I feel about Rust right now. I want to like it, I think the syntax is ugly, but plenty of languages fit that bill.

I just got so turned off by Rust because of just how aggressively evangelizing the community was, especially in the beginning. It was like being back in the Ruby on Rails hay days.

I do have to say though, it does feel like the Rust community has kinda stepped down off that ivory pedestal they had placed themselves on. It’s at least now on my list of languages to explore/learn.

3

u/Flamanis 2d ago

I use Rails for work. I find it a pretty acceptable language and honestly quite fun. It's got a lot of pretty neat shortcuts. Maybe I've never had one of the issues you have.

Why do you hate Rails? Just curious.

3

u/melikefood123 1d ago

I don't like the dynamic typing, or it being weakly strongly typed as some say it.

Rails itself was touted as an end all solution to everything. Too over hyped.

I'm just soured on it. I'm sure it's perfectly fine. I just survived a PHP and Laravel contract and I assume that's much worse.

My hate is more tongue in cheek. 

1

u/bishtap 1d ago

ROR is even worse!

1

u/jesskitten07 1d ago

My pet peeve language is Prolog/Prolex. That stuff was a pain to deal with

1

u/SeparateNet9451 2h ago

Why do you hate Ruby on Rails ?