this post was submitted on 13 Nov 2024
669 points (96.1% liked)

Greentext

4375 readers
1793 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
 
top 50 comments
sorted by: hot top controversial new old
[–] Batman@lemmy.world 6 points 43 minutes ago

My inner mathematician respects Java. The first step in any problem is defining your universe

[–] yamanii@lemmy.world 2 points 21 minutes ago

I still think Java is good for teaching newbies precisely because it will throw an error quickly if they are doing it wrong.

[–] mlg@lemmy.world 1 points 3 minutes ago

Forgot the JVM eating the entire machine's RAM for breakfast

[–] lurklurk@lemmy.world 10 points 2 hours ago (3 children)

Hello World

30 minutes of boilerplate

writing imports

$ cat <<EOF > Hello.java
public class Hello {
  public static void main(String args[]) {
    System.out.println("Hello world!");
  }
}
EOF
$ java Hello.java
Hello world!

ok

[–] meowMix2525@lemm.ee 2 points 53 minutes ago* (last edited 52 minutes ago)

I got the impression they skipped the hello world cause it was too easy and they wanted to get right to writing their app, so they moved on to more advanced stuff without having a real grasp of the basics

[–] MooseTheDog@lemmy.world 7 points 2 hours ago (3 children)

Welcome to java, we have a couple unconventional ways of doing things, but overall I'm like every other mainstream oo language.

People: AHH! Scary!

Welcome to python. your knowledge of me wont help you elsewhere as my syntax is purposefully obtuse and unique. Forget about semicolons, one missed space and your code is as worthless as you after learning this language.

People: Hello based department

[–] Classy@sh.itjust.works 3 points 52 minutes ago

Oh my god I got fucked by a python script once because of a single space. It took forever to figure out what went wrong

[–] lurklurk@lemmy.world 2 points 2 hours ago

Python has its drawbacks but it also has a pretty useful standard library so as a language for small scripts, one can do much worse

[–] PanArab@lemm.ee 1 points 2 hours ago* (last edited 2 hours ago)

It is possible to dislike both. For me SmallTalk-like languages are peak. Message passing for life!

[–] yarr@feddit.nl 3 points 1 hour ago

He types REALLY slow.

[–] Malfeasant@lemm.ee 3 points 1 hour ago

Must be several years old - otherwise, javafx deserves quite a bit more ire.

[–] Zementid@feddit.nl 7 points 2 hours ago (2 children)

I really enjoyed the text.

From the perspective of a python programmer it all seems valid.

A Java-Dev would probably write the same about an embedded engineer.

[–] MajorasMaskForever@lemmy.world 2 points 9 minutes ago

As embedded dev, the stack trace alone scares me. It would be funny to watch the Java runtime blow the 8 frame deep stack on a PIC18 tho

[–] MooseTheDog@lemmy.world 5 points 2 hours ago

Sorry, you had a small error in the spacings of your post; Therefore I cannot parse a thing you're saying. Didn't mean to scare you with a semicolon either. It's just a tool in language's to end a clause and begin a related, independent clause. That could be useful somewhere...

[–] lennivelkant@discuss.tchncs.de 5 points 5 hours ago (5 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.

[–] ebc@lemmy.ca 4 points 2 hours ago

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.

load more comments (4 replies)
[–] MooseTheDog@lemmy.world 0 points 2 hours ago

I'll never get the hate for java and love for python. It's like learning mandarin because you think it's easier than Spanish. When you know java you also kinda know javascript, C, Php, and others. When you know python, it's probably a government sponsored course, or a programming class talked your school district into buying their "intro to programming python course". Plus you only get to know python. I'll die on this hill

[–] Clbull@lemmy.world 11 points 7 hours ago (2 children)
[–] PanArab@lemm.ee 2 points 2 hours ago

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

[–] Gumus@lemmy.world 8 points 4 hours ago (1 children)

I'm sure that's Fireship, without clicking the link.

load more comments (1 replies)
load more comments
view more: next ›