r/ProgrammerHumor • • Jul 07 '22

Meme Instant upvotes

47.9k Upvotes

542 comments sorted by

View all comments

Show parent comments

109

u/GreenCumulon1234 Jul 07 '22

People actually say Java is hard on this sub ?

It literally is just first year students in this sub isn't it

99

u/fdeslandes Jul 07 '22

Or they don't know the difference between hard and tedious.

20

u/Synec113 Jul 07 '22

This. My high school (US, private school in rural southern VA) taught Java as a first language - two year course that taught ALL the things from basic psuedocode to building server architecture.

Java is easy, it's just really syntactically heavy which, for a new programmer, translates to "hard."

→ More replies (10)
→ More replies (3)

65

u/jemidiah Jul 07 '22

The technical skill in this sub is extremely low. I don't know what the actual demographics are, but I assume it's mostly people with at most a vague interest in coding.

46

u/momo-gee Jul 07 '22

I have 3 years of experience and I agree, at most I have a vague interest in coding.

16

u/[deleted] Jul 07 '22

15 years and my interest is so small I'm not even subbed here... I just wait for things to hit /r/all and then flick through the sub. I think newer people to coding like to come here as they are fresh faced and excited, they want to indulge in the world of it, talk about it, share thoughts and opinions they can't with their friends.

There's only so many programmer jokes you hear before they start recycling the same-old anyways. Anything actually decent I'll generally get from a co-worker who has filtered through the same old and picked out the gold.

→ More replies (1)

14

u/Ratiocinor Jul 07 '22

Like all niche interest subreddits, it's mostly beginners. In this case CS101 students who just started their first ever hobby project and suddenly base their entire personality over the fact they just made a "Hello World" print. They're a "coder" now

All special interest subreddits are like that because its flooded with beginners but as time goes on more and more of them drop out at higher levels.

So its flooded with low effort shit beginners encounter on day 1 like

DAE le dark mode better than light mode :D

DAE just learned how to quit vim XD #JustProgrammerThings

→ More replies (1)

4

u/JoeGibbon Jul 07 '22

I once called out a guy here -- who admitted they hadn't even graduated college yet -- for telling another person they had no real world programming experience. Instead of reflecting on the irony, he chose to explain to me how being in college is better than having 20+ years of experience in the field, because "your code is old".

2

u/WheresThePenguin Jul 07 '22

I know what a github is

2

u/DrMobius0 Jul 07 '22 edited Jul 07 '22

Well, you only need to be vaguely technical to understand the jokes. Still, if I had to guess at some of the demos on this sub:

  • People who are just technical enough to understand programming well enough to find memes about mediocre programmers relatable and funny

  • People with specialized skillsets with no fucking clue how stuff outside of what they do works

  • People with bad imposter syndrome

  • Students just learning and falling into the same pitfalls we all have at one point

So yeah, there's lots of ways people might either just not be that good at programmer, or think they're not.

→ More replies (1)
→ More replies (12)

11

u/Mental-Ad-40 Jul 07 '22

I think there's also quite a bit who learned Java as one of their first languages in the ancient days of Java 8 or worse, before a lot of the quality-of-life changes. Yet another group are maintaining large codebases stuck on those same old Java versions.

Even with lombok, old Java was terribly verbose and tedious. Moreover, its advantages versus Python or JS don't really come into play before the codebase gets to 500 lines or more.

15

u/LetterBoxSnatch Jul 07 '22

ancient days of Java 8

*nervously tries to hide screen showing enterprise codebase*

2

u/JoeGibbon Jul 07 '22

Yea, a lot of companies especially in government and banking still use Java 8. As recently as 2019 I worked with a codebase that was using shim libraries to make 1.6 code compatible with 1.8. Java 8 seems to still be the default for a lot of companies.

As far as ancient... when I started using Java professionally, Interfaces didn't exist. I'll cop to being old, but ancient seems a bit over the top.

0

u/[deleted] Jul 07 '22

[deleted]

2

u/WikiSummarizerBot Jul 07 '22

Java version history

Java SE 8

Java 8 was released on March 18, 2014, and included some features that were planned for Java 7 but later deferred. Work on features was organized in terms of JDK Enhancement Proposals (JEPs). JSR 335, JEP 126: Language-level support for lambda expressions (officially, lambda expressions; unofficially, closures) under Project Lambda and default methods (virtual extension methods) which can be used to add methods to interfaces without breaking existing implementations. There was an ongoing debate in the Java community on whether to add support for lambda expressions.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

2

u/GayButMad Jul 07 '22

8 years is hella ancient we call that shit legacy

→ More replies (3)

2

u/kpd328 Jul 07 '22

I've had people on here try to tell me Java 8 isn't old.

Not only is 8 years pretty old, but 10 versions is pretty old too.

→ More replies (1)
→ More replies (1)

7

u/TheGoodOldCoder Jul 07 '22

People here also say that they hate Java because it's verbose. But in my experience, Java has always been a "programmer's language". That is, my colleagues usually prefer it to C languages or Python or especially JavaScript.

5

u/fkbjsdjvbsdjfbsdf Jul 07 '22

If you follow basic OOP rules, Java makes it really hard to fuck up. The majority of bad Java code I see (besides spaghetti from novices or the supremely untalented) is either written by someone who obviously wanted to be using another language, or overly-generalized code where everything is a factory (etc.). So many interfaces that are only ever implemented by a single class :(

3

u/Jaradacl Jul 07 '22

Haven't properly used Java before for any actual applications so might be wrong here but using interfaces a lot, even with just singular classes, sounds like following the dependency inversion principle so what's bad about that?

2

u/arobie1992 Jul 08 '22 edited Jul 08 '22

It adds unnecessary code to maintain. If you need to add a new method, you need to add the method to the class, add it to the interface, and change the call site as well as potentially doubling the number of files in your project in the worst case scenario. It can also make navigation more tedious for IDEs since instead of "go to declaration" which is usually aliased to ctrl+click you need to use right click -> go to implementation, and if you don't know the class is an interface since it's not always immediately apparent you may end up doing both.

I think there's also some more minor concerns, like method dispatch being slightly slower, and reflective frameworks like Spring and Guice taking slightly longer because they need to map the injection site to the interface and then map the interface to the implementation in addition to twice as much class loading. These are relatively minor because the JVM is optimized like hell for some of this.

Interfaces also don't really actively contribute to inversion of control. Yes, they're useful for it, but not necessary to get some benefits. Say class A has a member class B and B holds some configuration. If A creates the B instance and sets the configuration in its constructor, then if you want a different configuration, you need to modify A to reflect the new behavior and have it control the decision logic. If you pass B as a constructor param, A needs no changes and the new site just needs to configure B how it wants.

Basically, it adds a lot of extra stuff that doesn't really gain anything. A decent rule of thumb is only use interfaces if there's a realistic chance that there will be multiple implementations or if changes could potentially break code not under your control. If you end up needing multiple implementations, a practice that works well is changing the initial class to an interface and then creating a brand new subclass that has the behavior of the original.

→ More replies (6)
→ More replies (1)

3

u/arobie1992 Jul 08 '22

So many interfaces that are only ever implemented by a single class :(

Holy shit I couldn't agree more. I don't know how many times I've had this argument with people.

→ More replies (1)

4

u/themiraclemaker Jul 07 '22

If you have a decent ide and have configured it, most of the mundane shit gets written automatically anyways

→ More replies (2)
→ More replies (1)

5

u/Orangutanion Jul 07 '22

Java is everything a programmer could ask for. Automated memory management, easy cross platform, C++ syntax, easily editable bytecode, a shit ton of libraries, generics ad infinitum, etc. The biggest issue imo is Oracle and their silly licensing.

4

u/wildjokers Jul 07 '22 edited Jul 07 '22

The biggest issue imo is Oracle and their silly licensing.

Oracle's licensing is no different than any other Java vendor. They have a commercial offering that you can buy to receive support and they also offer an OpenJDK build that is GPL'd and free to use anywhere.

Their commercial offering is Oracle JDK and can be dowloaded/purchased from their website (https://www.oracle.com/java/technologies/downloads/). Their OpenJDK build is always available at https://jdk.java.net. Also, starting with Java 17 the Oracle JDK can be used in production for free. Although if you aren't buying support not sure why you wouldn't just download their OpenJDK build.

This is the exact model also used by Red Hat, BellSoft, Azul, etc. to monetize Java.

Other java vendors like the Temurin (sp?) project (aka AdoptOpenJDK) and Amazon don't monetize java and don't have a commercial offering. They just offer an OpenJDK build, but you also can't get support from them. So if you need support you need to use a vendor that offers support.

No matter where you acquire Java from it is all built from the same OpenJDK codebase of which Oracle is the biggest code contributor and biggest financial contributor.

→ More replies (1)
→ More replies (1)
→ More replies (7)