• Lysergid@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 month ago

      95% exaggeration. Here is reality:

      • yeah you need main class coz it’s OO-language. Though, not required anymore, which should’ve been done once Java got scrip language capabilities (jshell) back in JDK 9. But as of today not required anymore
      • imports exist in most if not all languages. Gotta be insane writing them manually in 2010 let alone 2024
      • installing Java runtime (JRE) is as simple as installing any app. Though for installing JDK you need 5 mins for setting PATH. Think about JDK as like TSC or Webpack and JRE as a Browser. I’d argue installing and configuring JDK is simpler than TSC or Webpack
      • Unless you doing some non-trivial multi-threading your stack trace will tell you exactly where is your NPE. You gotta be as blind as my teammates to spend more than 1 minutes to find where it is coz it literally tells you file and line numer where Exception occurred
      • I mean, yeah if you use IDE from 2000 it will look like it. IntelliJ looks modern, though I don’t like the fact latest versions look like VSCode
      • I hardly reach 3G of deps from all 10 projects I have on my workstation.
      • IDK what anon means by ecosystem here, Java ecosystem is quite standard across the board. JDK(std lib), Maven/Gradle(deps, build, publishing), Spring Framework (all sorts of blueprints and solutions to standard app level problems), Hibernate/JPA (ORM), JUnit+Mockito (testing). These are tools and libs used in 90% of projects I worked on. Of course there will be more depending on project needs. Layers? It’s not like language imposes any layers whatsoever. It’s just common practice to have 3-4 layers and some glue in-between.
      • don’t do GUI in Java it sucks and will suck until Java gets string interpolation. Hopefully soon
      • concurrency is actually the only thing which is really bloated in Java. Which will change with next LTS version if I remember correctly. And it’s not that hard if you actually read the f manual and not just “try and hope”. Again it will become much more efficient and easier to follow soon. As of now - yeah, not trivial. But people mostly prematurely optimize, so karma
      • Java is kinda have 20 ways to do same thing but actually no. Java built with idea of providing simple building blocks. Then it provides more specific API built on top of those building blocks. It allows to have API which solves typical problems and provides capability to solve custom problems with those building blocks. People often confuse this as many ways to do one thing but it’s like saying “I can have byte array why I need string data type”. Those are different levels of abstraction

      Edit: typos

    • 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.

    • Scott@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      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

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