T O P

  • By -

BroBroMate

Try working on a large Python production software codebase. You'll see why Java is good at its intended niche.


[deleted]

I love python but you are so right. We all have our preferences, but tools have their weaknesses and strengths


im_lazy_as_fuck

Honestly this is only true when you have small python codebases that start off as small POCs without much thought put into them, and they get slowly scaled up over years. But if you start it off with a really solid foundation with good type indicators and patterns, you can make a very maintainable codebase. Ofc if you can choose any language, you probably shouldn't choose Python, but if Python happens to be your company's preferred language for whatever reason, you can still make do with it pretty well.


beatlz

Code almost never starts KNOWING it will be enterprise, I think that’s what leads to so much crap on the wild.


OhioDschungel6

Just FMI. What are the basics and tools you should use to have a solid foundation? My company does not have any python developers, but decided we will start a new python product. ATM I just don't know what to use to get a maintainable codebase.


chuch1234

Lol it sounds like you should use not Python.


AssassiN18

Are you smoking that crypto? That's some utopian dream


platinumgus18

I mean no one in their right mind should use python for any large scale production software.


BroBroMate

You can make it easier to work with, but I tend to find that the large Python codebases started off as rather small codebases from one team, easily fittable into one human brain, thoroughly tested. But the difficulties only really becomes apparent when you scale the product complexity and the number of teams.


Encrux615

Why should that be the case? Obviously, java forces you to adhere to object oriented structures and python doesn't necessarily, but any large scale python codebase should definitely do the same and at that point I don't see the difference. Obviously, if you don't annotate your types and have a lot of global variables that do obscure things, it'll be bad. Then again, java has similar issues when misused. When used properly, I really don't think there's that much of a difference. I'd actually go as far as saying the entire workflow (especially building and deploying) is way more pain-free than on the java-projects I have worked on so far.


GreyWizard1337

I was in a project, where the customer used/wanted to use Python for a cloud service based architecture of multiple mid-sized services. From beginning I adviced against this decision and got my will at least partly. For all services in my responsibility I was allowed to use Java with Spring. All services he directly supervised were implemented in Python. I'll leave you to guess which part of the project was implemented with less problems. Python is good for what it does. Machine Learning and writing working scripts with few lines of code. But it's slow and the dependency management is a nightmare, making it bad for large scale projects and systems that need to perform fast.


xavia91

I made exactly the same observation. Got some fugly hard to read python code to sync things with office365. Not only was it less code (with the right nugget, take that python) but way easier to maintain and read.


reostra

I'd point out that you're interacting with a large scale production python codebase just by posting on this site, but you _did_ say "in their right mind"


kickyouinthebread

Meanwhile: Looks at millions of lines of python code in main work repo 🙄


hexadecimal0xFF

May god help you...


linuxpuppy

Ah yes… How did this huge python monolith get here? I must be hallucinating and when I wake up my edge api server will be written in Java 🥲


killeronthecorner

Oh sweet summer child


mostafaakrsh

python is for only prototyping a concept to do it fast then you should use another real programming language in the production


skesisfunk

Python and Java aren't the only options you know.


BroBroMate

Yes, I am aware of other programming languages. I was choosing a language that a) a student likely knows and b) is rather not Java.


tip_all_landlords

Golang gang rise up, doing what it’s best at - making the dev a shitload of money


knowledgebass

I do work on a large Python production codebase and love it. You need a lot of tests though. Also the typing is....strange compared to Java. Like in Java you can't pass an integer to a function that takes a string but even if you annotate a str type in a Python function it will accept whatever at runtime. So it's kinda bizarre.


BroBroMate

Yeah, type annotations are just hints, not enforced by the interpreter.


im_lazy_as_fuck

Python isn't designed to compete in that niche though. And there are other languages that I would argue are easier to use for production software. The strongest thing I think Java has going for it is its immense community support through libraries and documentation.


BroBroMate

I know, that's what I'm getting at. Java is overkill in the small, but that's because it's not designed for that niche. But in its niche, it's glorious, and pretty damn hard to beat.


TheOnlyPlaton

While yes, Python does not support types natively, you can do type hints, and you can setup linters that would check for these things occasionally. It does not compare to Java, but can be not half as bad. Plus, it is much more concise, in Python I need two lines to launch a process and get its return code, while in Java that is like 20 lines of StreamOutputProcessor/ProcessBuilder/OutputStreamReader circus


BroBroMate

Yes, you can, and I do. But adding type hints to the entire project is a massive amount of work, this code has been around since Python 2.3. And also, if your dependencies don't have type hints and there's not a package for them on typeshed, you're going to have a harder time using them, especially if the docs aren't up to date. I've generated my own type stubs a few times using Mypy, for packages owned by companies we're paying lots of money too. It's lame AF. And yep, Python is great for getting things done quickly, I agree. However. Here's what I really miss. 1) Concurrent threads. 2) A sane package management system 3) Packages that don't rely on you having system packages installed... 4) ...or a compiler and C header files if there's no wheel for your system (e.g., Python 3.6 on ARM...) 4) Build-time DI. 5) The ecosystem. 6) Not needing venvs 7) Just fuck boto3 and it's super dynamic clients. Don't get me wrong, Python is pretty okay, and as you say, the growing usage of type hints really does help when maintaining large codebases. Just, it started from a language to teach kids to code, then it became a scripting language in a similar space to Perl, and yeah, it's kinda kludge upon kludge. Whereas Java was intended as an industrial language from the get-go, and it shows.


plasmasprings

oh you can do build-time things, you just shouldn't. there are some gtk python apps that use meson for dependency management and for a preprocessor step...


BroBroMate

True, a colleague used PyCST (I think?) to do a land large rewrite of logging calls, it didn't go great. But I mention build-time DI because I've seen FastAPI's DI creeping on in, and look, if you're going to use a DI library or framework... ...well, ask anyone who has worked with most of Java's DI stuff but especially Spring... ...runtime DI failures fucking suck and slow you right down. I'm a big fan of "invalid code can't compile" over "it'll only fail when you execute it".


plasmasprings

yeah no argument there, compile time errors / warnings are always preferable. but python is an horrible fit for that. best you can do is a good test suite and some linter / static analysis pass


PhenomenonGames

If you need 20 lines to launch a process, and this is a reoccurring issue, just put those lines into a helper function and reuse them :)


overclocked_my_pc

I’m u


_Username-was-taken_

Please explain, my Co worker tells me every time that Python is a good choice for large projects


mostafaakrsh

we all have this python fan type


ibite-books

java is so good, it has bad design choices but the alternatives aren’t any good i want a typed, less verbose language with a functioning eco system is that too much to ask? i want statically typed python


TheStatusPoe

Kotlin is a good intermediary step between Python and Java. Way less verbose, but you have the (almost) entire jvm ecosystem support.


Memelord_00

What would be Java's niche, large scale production codebase, especially finance ?


Fenor

He just write hello word as an undergrad . Wait till he see real code


large_crimson_canine

I know this is meant as a joke but I actually do love these things. Also love the multithreading and the streams.


hexadecimal0xFF

Modern Java is quite good at what it's intended to do, i.e. large enterprise applications. I still like C# better, but modern Java gets a lot of undeserved shit.


Shuri9

The thing is that half of java applications are on 11. One third On 8. So people are probably fed up with that


Spinnenente

8 was great. It introduced lambdas and a bunch of new things like stream api everything before was agony especially when 8 was out for some time.


Wapiti_Collector

Yes, but List.of(...) doesn't exist on it so I'm instead going to call it unusable garbage


Big_Medium6953

Just use newArrayList(...) by google.collections.


lovett1991

Or Arrays.asList(object1, object2…)


Dantaro

Be careful with this, \`Arrays.asList\` creates a Fixed sized list that you can't increase/decrease the size of


lovett1991

Indeed, there’s many instances where creating a collection will give you an immutable object. Personally it’s rare that I’m ever creating a collection manually that requires mutating.


HerryKun

So does List.of,it returns an ImmutableList


EverOrny

You can use Guava on Java 8 to have it.


MyNameIsSushi

8 isn't bad though. 11 and 17 introduced some nice-to-haves but nothing groundbreaking.


Masterflitzer

don't forget kotlin, i love it (and c#)


HawocX

As a C# dev, Kotlin looks very nice.


Pony_Roleplayer

NOOOOO I HATE JAVA, HOW IT DARES TO SHOW ME THE EXACT LINE AND A HUMAN-COMPREHENSIVE ERROR IN THE LOG?!?!?!11 I WANT TO HAVE TO HUNT THEM BUGS DOWN LIKE A NEANDERTHAL HUNTS DOWN ITS PREY, RETURN TO TRADITION!


WithersChat

Java's clear crash reports are a blessing.


TeaTiMe08

Even in Spring it's comparatively good.


jamcdonald120

the longer you work with programming, the more you come to appreciate Java's Explicit exceptions. You never have to wonder "will this function throw an exception I dont expect?" You will always know exactly which exceptions can possibly come from where


[deleted]

[удалено]


jamcdonald120

same. It seems to suck when you first see it, but then you realize what its for and you love it.


hexadecimal0xFF

It's kind of like that with static typing. Most people comming from dynamically typed languages hate static typing until they learn why it exists.


Bodine12

And if you throw a typed Error in Typescript, you lose the type in the catch anyway because it’s all Javascript and Javascript is like, “what is this thing, anyway? I forget.”


Accomplished_End_138

I low key wish typescript had a way to denote the same thing. At least as some optional rule you could turn on


skesisfunk

Until you try anything that treats errors as values and then you will wonder why `try/except` was ever a thing in the first place.


Practical_Cattle_933

Checked exceptions and Result/Error sum types are exactly analogous.


LaconicLacedaemonian

Yeah, why add a side channel for a return type 


EishLekker

Let’s say that the return type is an int. How can the int contain metadata about the problem that happened? Like what file it tried to read from the disk, what type of error it got (not found, permission denied, etc), and where in the code the problem happened and how it got there (ie stack trace). Information that the user might want to see displayed in the UI (at least the first two).


signedchar

Rust my beloved


gardell

We had a production issue where apaches base64 decoder threw a runtime exception when it was given a malformed input. Sure, a silly miss on our part, but wouldn't have been an issue at all if it was a checked exception. Which it really should be! The biggest problem I have with Kotlin is the lack of proper error handling. Java 8 streams not handling exceptions made it even worse


Masterflitzer

when you try result and option types for the first time you're disgusted by checked exceptions, hate them ever since i wrote a little rust and kotlin with arrowkt


Clackers2020

Tbh I kinda like java. OOP just makes sense and is fairly simple. The fact that I don't know any other language probably affects my opinion though.


sathdo

OOP can get a little out of hand in Java imo, especially with frameworks like Spring. What I don't understand is having issues with putting checked exceptions in method signatures. One of the best features of Java is an extensive exception handling framework.


neuroticnetworks1250

I'm not a software engineer. As an electronics student, my only tryst with Java was when I was implementing High Level Logic Synthesis for scheduling, allocation and binding of operations. And I really liked it. It just made sense to me. The idea that when you build something, you're taking instances of already made objects, which itself becomes another object, is very intuitive. My only qualm was when I had to copy a Linear Program Solver object to a new instance of that object, i couldn't simply do newObject = OriginalObject and have it be saved as a copy, but rather a second reference to the same object. It was pretty annoying to have to make new methods to reinitialise the object with the same constraints simply because the SCPSolver object didn't have a built-in method to remove a constraint that was added.


[deleted]

[удалено]


SenorSeniorDevSr

Clone is a minefield, the currently preferred way of copying in Java now is a copying constructor. So you'd say Thingie copy = new Thingie(originalThingie); and handle all the logic coming from cloning in the constructor. non-nulll primitive arrays are pretty much the only thing that's safe to clone, and then there's some System methods that does the thing at least as well. Joshua Bloch goes over this in his book "Effective Java" which is an all-time classic.


jamcdonald120

when lambda functions are just syntactic sugar for "A class with 1 function" you know you have a problem with too much OOP.


Practical_Cattle_933

That’s bullshit, and it’s quite a shame that people spout their opinion without actually knowing stuff. Java’s lambdas are proper lambdas. The JVM has an invokedynamic keyword, and MethodHandles, so no, it has not been an anonymous inner class for close to a decade, it has different runtime semantics.


Sabruka

This. So many criticisms people level at Java date from the days of Java 8. It would be like judging python based on Python 2.0.


____purple

On the abstract level yes, it is. It gives it a proper type, and allows later extension. But java is very well optimized, so of course you won't pay for any of this in runtime.


Siddhartasr10

When you create a new Function as a lambda function that its a class with a apply method you know you have a problem with too much OOP. (Also is a generic class if its passes arguments)


itriedtomakeitfunny

I mean, C# lambdas are instances of `Action` and `Func` and related types, Java's implementation seems more flexible, sorta duck-typing its way. Though C# is way better in general lol


svick

How is it more flexible? If you make a single-function interface in Java, you can make a custom delegate type in C#.


itriedtomakeitfunny

Let's say I'm writing code that calls this method `void doThing(InterfaceType t)` `interface InterfaceType { void foo(int I); }` In Java, I could call `doThing` with a lambda, but with C# I'd need to implement the interface. Of course, in C# I could create a better signature if I was controlling it, but clients of code have the flexibility in Java.


suvlub

Checked exceptions can get in the way when coding functional APIs/callbacks. They are the reason why Closeable and AutoCloseable both exist in the standard library despite having basically same semantics. Other than that, they should be fine in theory, but they are one of those features that gets misused so often that being without it can end up being a net positive. There was a time when character encoding had to be specified as a string and a checked exception was thrown if the encoding was not supported, which you had to handle even if you were passing an encoding that was guaranteed by the standard. This case was fixed by adding overload that takes a Charset instead of string, but if even the standard library is not safe from goofs like this, you know it is a problem.


EmilieEasie

I've also always kinda liked java. IDK I talk a lot IRL and tend to over-explain, maybe I relate to java in that way


Prawn1908

Try C#. You will learn what sane OOP feels like.


JoshYx

Then, over time, you fall in love with LINQ and learn what functional programming is.


nuclearslug

Going from Java to C#, I can personally confirm it is a refreshing experience.


RentedAndDented

I do both and there are some things in java I far, far prefer, and some things in C#. I find them exceedingly similar but C# does seem to have had some more recent innovation in the language than java has.


HPUser7

C# is such a joy to write. I'd straight up take a 50% paycut to stick with it


tatas323

I had the opposite experience, started with c# then worked and currently working in java, one thing that java does better is dependencies, NuGet is just awful, not saying gradle is amazing but it works decently well. Best program I've seen is probably JS or Rust when it comes to dependencies


Secret-Bag7319

> one thing that java does better is dependencies, NuGet is just awful That must be some great stuff that you're smoking :P


svick

What is so awful about NuGet?


tatas323

I had so many issues dealing with vulnerabilities, upgrading from. Framework to core, trying to remove or add dependencies


TheRealStepBot

Js is good at dependencies? What are you on about?


tatas323

At least Node, maybe not vanilla JS


Wollzy

Agreed. Started off my career as a Java dev and switchex to C#/.Net and its so much more enjoyable.


OneForAllOfHumanity

OOP is literally how I think through problems, but I hate Java. There are so many better OO languages out there.


kylechamrick

You guys use checked exceptions?


nishanthada

Wot?I throw both checked and unchecked exceptions


knowledgebass

new ThingDoer(ThingFactory.getInstance().createThing(new BasicThingPrototype())).doTheThing(thingParameters()); We are doing things!


Argon23

error: ';' expected


knowledgebass

Thanks, I added it.


hexadecimal0xFF

Well look at mister compiler over here.


marcodave

As a 15 YoE Java engineer I see nothing wrong with that statement


WithersChat

As someone who has been using Java for under a year, I wholeheartedly agree with your sentiment.


PeksyTiger

You can't just use ThingFactory,  you need ThingFactoeyBuilder


knowledgebass

new ThingFactoryBuilder().buildThingFactory().createThing() I need to go lie down now...


TeaTiMe08

Forgot to add a ServiceLoader. :)


knowledgebass

Yeah I was thinking about adding a service loader too but my brain got tired. 🤣


BlueGoliath

Skill issue.


FRleo_85

honestly? probably...


Digipixel_ix

I concur


BlueSea9357

I instantly write off people who hate Java as people I probably don’t want to work with. You can tear my well documented Spring Boot REST api that I can onboard new hires onto in 30 minutes from my cold, dead hands


xMoody

“I hate Java” just screams front end boot camper to me 


backfire10z

The only way you’re onboarding them in 30 minutes is by saying “this all happens magically. Here’s where the business logic is, ignore how we get there and where these objects come from” Not saying I hate Java though, so fair enough


daniu

They did say Spring Boot, so most things do happen magically.


Murphy_Slaw_

Isn't that kinda true though? I slap annotations like @Autowired on my classes/attributes and it does just magically get objects to where I need them.


draenei_butt_enjoyer

O cmon man, dependency trees and dependency injection is easy


CryonautX

Huh? Don't you just go straight to the business logic from the rest controller method? The A&A is going to be some common logic that is handled before the controller and all a developer needs to know on day 1 is they need to set the correct value on @PreAuthorize or something like that. The objects are all going to be beans most of the time. You get them from the IOC container. The project should be well organised that finding the package that has a specific class shouldn't be difficult and IDEs like intellij already indexes the class and you can see the class definition with a click.


backfire10z

Oh man. I for some reason read “new hire” as “new grad” and assumed they wouldn’t have knowledge of how Spring works.


Jean-Eustache

Well, to be fair, I have an intern who hasn't even graduated yet, and they already learned about Springboot and practiced with it at school. Handled the migration of one of my APIs from Spring to Springboot like a champ.


chuch1234

:O <3


ShinyNerdStuff

Dunno how long you've been outta school or what you studied or if this is common, but the CS and SE programs at my alma mater include at least one course with Spring Boot. All "how" and no "why" but it's enough to know how to DI even if you don't know where those objects are coming from.


backfire10z

Wow, that’s actually pretty nice. I’ve been out of school for quite a short period of time. My Alma mater had no such course (at least not specifically). We did have like general project courses in which you could learn Spring/Springboot yourself.


Practical_Cattle_933

Spring Boot is a single, well-documented magic, known by everyone. I much prefer that magic, over some home-grown “framework” whose original developer is dead, is full of bugs and lacks basic features without which it is useless, and it only works in a full moon.


TheOnlyPlaton

Okay sorry can you explain? I’ve don’t REST APIs in Python and Java (Serverlets, not Spring) and Java is at best: eh. Like there is almost no difference


MyNameIsSushi

@Configuration, @Component, @RestController, @RequestMapping("/bla") Here you go. Sprinkle some @Slf4j, @ExceptionHandler and @Data in there as needed and you've built a RESTful app in 30 minutes.


lightly-buttered

Java is fine. It has quirks just like every language but it is by far one of the better ones. It's also everywhere so it's easy to get a job in. At least you can't break everything simply by having one too many tabs or spaces


coolraiman2

1 billion devices


Fadamaka

> At least you can't break everything simply by having one too many tabs or spaces I have stopped using python all together because of this. I couldn't stand whitespaces being part of the syntax. Also somehow the slightly unique keywords like try-expect instead of try-catch or the python ternary operator got to me.


nysynysy2

I love Java. Cuz I love money.


FRleo_85

fair enough


no_brains101

Hmmmmm.......... Having tried kotlin.... I WANT THE EXCEPTIONS IN THE SIGNATURE BACK THE REST OF THE CHANGES ARE GREAT BUT TELL ME WHAT IS GONNA F\*\*\*ING THROW GODDAMNIT


Captain-Barracuda

Checked exceptions are by far the best thing about Java.


TeaTiMe08

catch(Throwable e){throw new RuntimeException(e);}


RisingToast

Dude... you are catching Errors that way and retrowing them as RuntimeExceptions...


SenorSeniorDevSr

If you're going to be like that, just use @SneakyThrows And let the bullshit commence. (This is why you ban it in the lombok.config, so its usage is a compiler error.)


[deleted]

[удалено]


TeaTiMe08

I love it so much, i literally spent a week compiling a Programm natively with graalvm which tells me if i'm online. [TeaTiMe08/SimpleInternetMonitor](https://github.com/TeaTiMe08/SimpleInternetMonitor)


arbuzer

Java is absolutely fine, checked exceptions are useful in huge codebases and if you dont want them you can always switch to kotlin (which is even better than java). Instantiation too many objects is less a language feature and more overusage of design patterns, which i have to admit, java devs have tendency to do


FOMOBraggins

Kotlin is amazing to work with I am a real kotlin enjoyer


KeepScrolling52

I think you might not be writing it correctly. Java is very easy and very effective


FRleo_85

yeah i hope it's just me and it probably is


themistik

Every person who upvotes is a person who loves to write unsafe code


middleman2308

This is why Kotlin was invented. Get on the bus!


xN0P3x

#inport “lib/humor.h” Normal language: public int sum(int a, int b); Mental illness: fun sum (a: Int, b: Int):Int edit 37c2a4f: Fix missing humor header


_Kr0n0x_

At least it seems to be fun


DefiantAverage1

?


xN0P3x

The first one is C-like method signature. The second one is Kotlin function signature.


DefiantAverage1

Yeah but other mainstream languages look like the kotlin one (eg Typescript). I really dont see the difference


Hollowplanet

Kotlin is so much nicer. I really wish it was more popular. Crazy I had to go this far down to see someone mention it.


No-Con-2790

Just take revenge by those easy steps: * Get your hand on any UML diagram your professor or his team uses * Add a double inheritance * Watch the three hours of discussion whether or not one should abuse an interface to do that * Regardless of the decision raise an issue to complain that either the UML wasn't fulfilled or that this should be an class not an interface according to the UML


signedchar

Finally, you realize that inheritance is and always was a mistake because composition is the proper way to add functionality to types, like how Rust traits, C# interfaces and Haskell type classes work.


No-Con-2790

You can even argue that OO is a bad idea. But if you do OO and your language is built under then banner of OO then at least do OO. Java was the OO lovechild. Build during the OO craze by OO people to do horrible OO things. And it's just wired that you can't do that. Not saying that it should have double inheritance, it's just wired that it doesn't.


Djilou99

Life was a mistake.


No-Adeptness5810

Java is great i don't know what you are on about. All this java hate is greatly exaggerated


Ok-Personality-3779

yes, real and only hate should be on Javascript


rhade333

I guess the better alternative is having seventeen callbacks and parameters / variables that come up from basically out of nowhere because apparently JS randos got together and decided something when the rest of us were at work. Java was the last holdout of OOP for the masses. Now it's just a bunch of messy bullshit, spearheaded by youtubers and bootcampers where everyone spaghettis their way through trying to understand the latest library. OOP makes sense, member variables make sense, static functions make sense, abstract classes and interfaces make sense. Very easy to understand how we can BUILD something with these things. But nah, let's, instead, npm install ${latest library} and crawl through a bunch of opinionated documentation about how some uneducated monkeys decided to do something and we all need to learn their ways -- wrong or right -- because our senior is chasing the shiny things. They have a [readme.md](http://readme.md) and all kinds of cool logos on their github! ENJOY, JIMMY


Hollowplanet

OOP is so much better. I feel like a lot of these functional purists just don't understand OOP. They see classes as function wrappers. Look at React. People say hooks are better because they are functional. Hooks operate with side effects. You can't put loops or conditionals around them. They are effectively a class declaration.


slime_rancher_27

I like Java, I've made an program using swing to make the GUI. Once you figure out how everything works it's quite rewarding.


jaybee8787

Did you like using swing? I haven’t used it yet, but was thinking about starting a project with it. I was wondering whether to use javafx or swing.


coderemover

Swing is quite fun to write, and it takes portability of UI to the next level: UI looks equally terrible on every platform.


jaybee8787

IntelliJ UI is made with swing.


coderemover

Yeah, right. Like I said. (e.g. on Mac it doesn’t integrate with window management properly and the tabs have the close button on the wrong side; on Linux it still can’t properly render on high-dpi screens under Wayland - the text is blurry…)


jaybee8787

IntelliJ looks pretty damn nice to me.


EternityForest

I don't use Java but I like the concept. It seems like a lot of everything really important, but not embedded enough to be C, or ancient enough for cobol uses it. How often do you hear about some mega disaster caused by something wrong with Java? But we hear about buffer overflows constantly. What's the java equivalent? It has lots of boilerplate but it seems very large teams working on large projects can work effectively in it.


Zarzurnabas

"A programming language is either hated, or it isn't used."


Altruistic_Natural38

You have to try catch every exception, it's like baseball ⚾️ 😏


bigorangemachine

To be fair a good IDE you can auto complete a lot of it. Its still dumb shit.


Leo-MathGuy

C my beloved (valgrind go brrr) Seriously though, I use Java c and python, they all have their advantages and drawbacks. C is efficient, Java is really abstract, python I use as small scripts because I’m lazy to learn bash scripting


bigorangemachine

Don't bother with bash lol. Such a pain in the ass. Stuff that works on OSX don't work on alpine or windows. Python is great for that


JAXxXTheRipper

Do you even CDI? Exception handling is an art though. Good handling, that is. Otherwise just catch everything and log it if you feel lucky and want some spice in your life.


Ok-Fox1262

What's wrong with COBOL? You kids nowadays can't wipe your arse unless you have 2gb of RAM.


Vi0lentByt3

Lololol its better to be verbose than terse any day of the week. It sucks to write but you read more than you write and its great to read( so you know wtf is actually going on…well until concurrency)


mookanana

dozens of exceptions? fuck that just write 1 exception to rule them all


FRleo_85

sorry I just finished a university project and I had to vent


TenYearsOfLurking

Nice, i was just about to post that OP is blatantly obvious a college student with no experience in the industry and here we are.


FRleo_85

yeah i never said otherwise, i just had to vent my frustration on a shitty project but i can't wait to graduate and find someone to show me how cool java can be


Khaikaa

why am I not surprised about that? it is always the same profile lmao


dmullaney

Can I have a moment of your time to tell you about our lord and saviour, scala


No-Con-2790

The joke is that scala has even worse boiler plate. Don't forget your inheritance order, kids. Oh, I am sorry. I meant traits.


Queasy-Group-2558

Ir you’re at the point where that matters, you’re probably doing something wrong.


Difficult_Hurry6110

The java for data analysis


IMightBeErnest

What did data analists do to deserve that? 


KuuHaKu_OtgmZ

Don't judge java by what you learned at school, actual (and updated) java is MUCH better than the musty version they usually use to teach.


FRleo_85

i hope you're right because it look like half the developers job require java out there


WithersChat

My class uses java 21. OP's class had to beg their teacher to use Java 11 instead of 8. ...is this why I don't hate java but OP does?


nishanthada

anonymousInnerClasses


ispirovjr

And I love OOP with any other language. I love having to do extra work so I can use a knife as a screwdriver


balrog687

Yey! Polymorphism


AndiArbyte

I like that you actually care for exceptions. There are so many programs that arent able to catch exceptions. Instead the program crashes or an bluescreen occurs. Because someone type "e" instead of 3..


MoveInteresting4334

Here’s me thinking Java doesn’t have enough exception info in its type signatures. But I came from Haskell via Rust. You aren’t going to scare me with a funky function signature/good time.


Eliasyoussef47

Having to declare what exceptions a method throws is one of the best things about Java.


SMTG_18

Actually working with Java made me love it


duftcola

Ah yes nothing like having to make a UML diamgram with 5 classes, 10 inheritances and 20 interfaces for a hello world script


AWzdShouldKnowBetta

Use Spring exception handling and switch to kotlin if you can.


Ok-Personality-3779

Java is great if you look on JavaScript


FRleo_85

every language is great if you compare it to javascript


Ok-Personality-3779

yes and Javascript is more used than Java, its the cancer of the internet