this post was submitted on 13 Nov 2024
794 points (96.3% liked)

Greentext

4384 readers
1335 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 1 year ago
MODERATORS
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 37 points 1 day ago (6 children)

I might have agreed a decade or two ago, when I knew no better. But today, I find the tribalism surrounding programming languages comical.

I don’t particularly like Java, but I use it because it pays the bills. Similarly, I use C++ (which I prefer) when my work requires it.

load more comments (6 replies)
[–] [email protected] 148 points 1 day ago (1 children)

I also think Java is shit, but if you manage to get a NullPointerException while writing a hello world program, maybe anon is just not cut out for computers?

[–] [email protected] 80 points 1 day ago (2 children)

I always loved that Java has a NullPointerException but doesn't have the concept of pointers in the language (only references).

[–] [email protected] 42 points 1 day ago (2 children)

That is because they planed to add pointers and then gave up.

[–] RogueBanana 28 points 1 day ago

I can't tell if you are making a joke but I can believe it could happen if it's Java

[–] [email protected] 14 points 1 day ago

I mean... they have them. And unsafe. You're just not supposed to use them

[–] [email protected] 16 points 1 day ago

C# has NullReferenceException and it actually makes sense.

[–] [email protected] 26 points 1 day ago (1 children)

If it took anon 30 minutes to write hello world in java, programming is not for anon.

[–] [email protected] 13 points 23 hours ago (4 children)

We bow to your wisdom, wise gatekeeper

[–] [email protected] 3 points 20 hours ago* (last edited 20 hours ago) (2 children)

It's like 5 lines of trivial code

[–] [email protected] 5 points 19 hours ago

Some of us try to understand what we're doing, rather than just copy/paste. It's easy to discount how difficult learning the basics of something is when you're already past it.

load more comments (1 replies)
load more comments (3 replies)
[–] [email protected] 13 points 1 day ago (5 children)
[–] [email protected] 4 points 21 hours ago (1 children)

My experience with Java over the last 2 decades or so. Shame Android gave it extra life, thankfully Kotlin exists now.

[–] [email protected] 3 points 18 hours ago

Yup, I swore off Android dev almost entirely because of Java, and then Kotlin came out and Android programming was tolerable again. Not fun, tolerable, lipstick can only make a pig so appealing...

load more comments (4 replies)
[–] [email protected] 29 points 1 day ago (6 children)

C# masterrace and I'm tired of pretending it's not

load more comments (6 replies)
[–] [email protected] 2 points 17 hours ago (6 children)

Could be worse, could be programming Javascript (or Typescript).

load more comments (6 replies)
[–] [email protected] 160 points 1 day ago

Java

Thats your first mistake bucko

[–] [email protected] 28 points 1 day ago (1 children)

Not using Eclipse helps. Using Scala helps even more

load more comments (1 replies)
[–] [email protected] 5 points 23 hours ago (12 children)

Aside from the general stupidity, Java is a heavily front-loaded language in my experience. I'm not going to engage in any tribalism about it or claim that it's better or worse than others. As a matter of personal taste, I have come to like it, but I had to learn a lot until I reached a level of proficiency where I started considering it usable.

Likewise, there is a level of preparation on the target machines: "Platform-independent" just means you don't have to compile the program itself for different platforms and architectures like you would with C and its kin, as long as the target machines have an appropriate runtime installed.

Libraries and library management is a whole thing in every general-purpose language I've dealt with so far. DSLs get away with including everything domain-specific, but non-specific languages can't possibly cover everything. Again, Java has a steep learning curve for things like Maven - I find it to be powerful for the things I've used it in, but it's a lot to wrap your head around.

It definitely isn't beginner-friendly and I still think my university was wrong to start right into it with the first programming classes. Part of it was the teacher (Technically excellent, didactically atrocious), but it also wasn't a great entry point into programming in general.

[–] [email protected] 7 points 20 hours ago (1 children)

I'm not a Java dev, but I know enough of it to fix simple bugs in the backends I work with. My main issue with it is that 99% of the code doesn't seem to do anything. The clear, obvious place that looks like it handles the feature you're looking for? None of it does anything! It just instantiates another class from God knows where to actually do the work. I swear I spend most of my time in Java projects just looking for the damn implementation in a sea of AbstractSingletonFactoryBean shit.

[–] [email protected] 2 points 17 hours ago

The dev culture certainly contributes to the problem. In the attempt to modularize, isolate functionality from expectations and create reusable code, a mess of abstraction patterns have sprung up.

I get the point: Your logic shouldn't be tightly coupled to your data storage, nor to the presentation, so you can swap out your persistence method without touching your business logic and use the same business logic for multiple frontends. You can reuse parts of your frontend (like some corporate design default structures) for different business apps.

But you can also go overboard with it, and while it's technically a dev culture issue rather than a language one, it practically creates another hurdle to jump if you want to use Java in an enterprise context. And since that hurdle is placed at the summit of the mountain that is Inheritance, Abstraction and Generics... well, like I said, massively front-loaded.

Once you have a decent intuition for it, the sheer ubiquity makes it easier to find your way around other projects built on the same patterns, but getting there can be a confusing slog.

load more comments (11 replies)
[–] [email protected] 54 points 1 day ago (14 children)

Am I weird for liking Java? I feel like it just makes so much more sense than other languages.

[–] [email protected] 50 points 1 day ago (17 children)

C# is nearly the same, but much, much better.

  • It doesn't (usually) come with the Java culture 8 layers of abstraction. This isn't in the Java language. This isn't in OO. Yet nearly every Java programmer makes things way more complicated than it needs to be.
  • It's a prettier language. Similar syntax with less bullshit.
  • It's open source
  • It's still multiplatform. Modern dotnet / C# works on anything.
  • Both Visual Studio and Visual Studio code are great IDEs that blow Eclipse out of the water
  • It's one of the most common business languages.
  • It's going to be supported forever.

If I could restrict the world of programming to two languages, it'd be C# and Rust. C# for most things and Rust for a lower level language.

[–] [email protected] 7 points 1 day ago (4 children)

Honestly I would consider that a bit weird. At the very least, old-fashioned. If you like Java, it makes me think you haven't tried a better more modern language to compare it with.

load more comments (4 replies)
load more comments (12 replies)
load more comments
view more: ‹ prev next ›