• Ginny [they/she]@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    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?

      • babybus@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        Thank you. If you bothered to read a 5 minutes tutorial instead of posting to 4chan, you could also reach this level of knowledge.

        • Malfeasant@lemm.ee
          link
          fedilink
          arrow-up
          0
          arrow-down
          1
          ·
          1 month 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.

    • Serinus@lemmy.world
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      1 month ago

      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.

    • schteph@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 month ago

      Java is religiously backwards compatible. Modern java projects are not as enterprisey and boilerplatey, but, as jdk21 is backwards compatible with jdk1.3, you can still happily write code as if it’s 2003.

      Additionally, the java space is huge, so just wildly googling will probably not help you that much.

      • Hawke@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 month ago

        Is that why every single application will only work with some ancient version of Java?(usually 8, sometimes 1.6 or 11)

        I can’t think of many cases where Java 21 is a drop in replacement, and I don’t think anyone actually used 17.

    • chunkystyles@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      I’ve been programming in Java professionally for 11 years. It’s not just embellishment, it’s outright lying.

      Threads giving you race conditions? All concurrent programming will do that if you’re shit at it.

      Java has come a long way. I will admit that UI in Java is terrible. I would never do that.

      • extremeboredom@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 month ago

        It’s not accurate to accuse Anon of “lying,” when both their story and yours would point to the race conditions from threads being a symptom of someone who’s just learning the language.

        It’s not that serious though; because it’s a greentext, it is both artificial AND homosexual.

    • kitnaht@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 month ago

      I’m pretty sure Java doesn’t have pointers, so writing a hello world application isn’t gonna fuck up nearly that hard.

      The one thing he forgot though is that your source file is probably in the folder

      com/companyname/net/classes/factory/factoryfactory/worker/lib/bin/refresh/jdk/model/ui/closebutton/press.java

      And spread out among a bunch of other directories, and the java file is like…3 lines. But there are 10k files spread all around directories like this that are all 3 lines a piece with a class definition.

      • Valmond@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        They have sort of pointers, like references, that can be null…

        You just “new” stuff to it and let the “garbage” collector deal with freeing stuff up. When it feels like it.

      • perviouslyiner@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 month ago

        wait, so when .io gets deregistered, are a load of companies going to have to rename their root directories and rewrite all of their include statements?

        • kitnaht@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 month ago

          Thankfully, despite naming them like that, it doesn’t actually seem to have any real purpose. Apparently they just wanted to make sure that different companies making different libraries didn’t accidentally use the same name for their project…

          • Hawke@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 month ago

            That’s exactly the reason. And also no company is going through the bother to refactor that shit, so everything is named based on some other company 5 mergers and acquisitions ago.

    • Scott@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      1 month ago

      I’ve worked on a corporate project with multiple Java services, anon isn’t really exaggerating. Java can be a hell scape at times

        • Scott@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 month ago

          You would be surprised, errors right out of the box on a freshly initialized project aren’t uncommon

      • taladar@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        arrow-down
        2
        ·
        1 month ago

        They forgot to mention that production Java applications apparently need to log a certain minimum number of completely meaningless stacktraces per hour to work properly. Or at least I assume that is the case from the fact that all of them do that.

        • HackerJoe@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          1 month ago

          Best with an old and vulnerable log4j on a Windows log server.

          We don’t know what’ll happen if we update. And we don’t know if the dude who coded it will answer our calls. YOLO!

    • darthelmet@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Only have a beginner perspective, but in school I did really well in intro CS class that used Python. 2nd class was in Java and it almost broke me I was so confused.

      • naeap@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        Hated Java in school

        But before Java I learned a bit of Pascal and C/C++, and I’m so fucking happy that I’m currently working with C++ in my job and not with fucking Java

        I still hate it with everything I’ve got …

  • Black History Month@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 month 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

  • Zement@feddit.nl
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    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
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month 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

  • AusatKeyboardPremi@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    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.

    • frayedpickles@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      0
      arrow-down
      1
      ·
      1 month ago

      Tell us more ancient one, your heroic tale of “giving up against the endless weight of capitalism” is fascinating.

      • lurklurk@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        “giving up against the endless weight of capitalism”

        We just call it “having a job” nowadays

  • Orbituary@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    1 month ago

    My old boss is one of the 3 initial creators of Java. He ran our department the same way this greentext reads.

    He was also a paedo. You can figure out the rest if you dig.

  • yamanii@lemmy.world
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 month ago

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

  • WormFood@lemmy.world
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 month ago

    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@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      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.

      • LH0ezVT@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 month ago

        The Linux kernel actually uses quite a bit of OOP ideas. You have modules that are supposed to have a clear interface with the rest of the world, and they (ab)use structs to basically work like objects. If you try hard enough, you can even do “inheritance” with them, like with their struct kobject. It is actually somewhat well-thought-out, imo. No need to go full OOP, just pick some of the good parts, and avoid the MappingModelFactoryServiceImpl hell or the madness that is C++.

  • _____@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    1 month ago

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