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

Greentext

4437 readers
1071 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 3) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 30 points 1 week ago (1 children)

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

load more comments (1 replies)
[–] [email protected] 28 points 1 week ago (19 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

[–] [email protected] 22 points 1 week ago (4 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 9 points 1 week ago (2 children)

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

load more comments (2 replies)
load more comments (3 replies)
load more comments (18 replies)
[–] [email protected] 28 points 1 week ago (1 children)

Not using Eclipse helps. Using Scala helps even more

load more comments (1 replies)
[–] babybus 26 points 1 week ago (1 children)

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

[–] [email protected] 12 points 1 week ago (6 children)

We bow to your wisdom, wise gatekeeper

load more comments (6 replies)
[–] [email protected] 17 points 1 week ago (7 children)

object orientated programming is the wrong idiom for almost all problems, and even in the few cases where it makes sense, you have to be very careful or it'll hurt you

[–] 31337 10 points 1 week ago (1 children)

Idk. Maybe it's because I learned OOP first that it makes more sense to me; but OOP is a good way to break down complex problems and encapsulate them into easily understable modules. Languages like Java almost force everyone on the project to use similar paradigms and styles, so it's easier for everyone to understand the code base. Whenever I've worked on large non-OOP projects, it was a hard-to-maintain mess. I've never worked on projects such as the Linux kernel, and I'm hoping it's not an unmaintainable mess, so I'm pretty sure it's possible to not use OOP on large projects and still be maintainable. I am curious if they still use OOP concepts, even though they are not using strictly OOP.

I also like procedural python for quick small scripts. And although Rust isn't strictly OOP, it obviously borrows heavily from it. Haskell is neat, but I haven't used it enough to be proficient or develop good sense of application architecture.

I've done production work in C, but still used largely OOP concepts; and the code looks much different than code I've seen that was written before C++ was popular.

load more comments (1 replies)
load more comments (6 replies)
[–] sentient_loom 15 points 1 week ago

You're not stuck with it Anon. You can use something different!

[–] [email protected] 14 points 1 week ago (3 children)
[–] [email protected] 13 points 1 week ago (3 children)

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

load more comments (3 replies)
load more comments (2 replies)
[–] [email protected] 13 points 1 week ago (5 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.

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

I started with java for school. The day I tried C for the first time I was flabbergasted, "what do you mean it doesn't matter which order I put things in?"

[–] [email protected] 10 points 1 week ago (1 children)

I don't think Lemmy would've let you post a smaller image.

[–] [email protected] 9 points 1 week ago (1 children)

Looks fine in the Eternity app.
Unless OP fixed it already.

load more comments (1 replies)
[–] [email protected] 9 points 1 week ago

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

load more comments
view more: ‹ prev next ›