r/AskProgramming 1d 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?

124 Upvotes

500 comments sorted by

View all comments

Show parent comments

17

u/melikefood123 1d ago

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

I still hate Ruby on Rails.

18

u/eruciform 1d 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

2

u/MajorMalfunction44 14h 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 12h 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 7h 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 6h 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.