I’m learning Java (for College Reasons™) and it sucks exactly as much as I thought it would
the course requires me to use NetBeans and then it’s kinda just like “don’t even worry about the build process or the pom.xml files or the .tmcproject.yml files. just let the magic IDE do everything”
and that’s super uncomfy for me - I hate having aspects of the build process hidden from me like that. because if something breaks I won’t know how to fix it. and also I wouldn’t say that I “know Java” if I can only write Java code through an IDE. I want to be able to write and run Java code using only a JDK and a basic text editor
also I miss neovim a lot T_T the MOOC.fi Java course I’m taking specifically uses this weird thing called “Netbeans with TMC 1.5.0” and it feels terrible to use - it feels like it was made in 2004 or something
but there’s no way that I could figure out how to configure neovim to work with this Satanforsaken language, so I’m stuck with it :/
simple, convenient languages are fun to learn because you can understand them quickly and then start doing cool, complex things with them
simple, inconvenient languages are fun to mess around with because they’re easy to learn and doing almost anything in them is an interesting challenge to solve
complex, convenient languages can be worthwhile to slog through so that you can get things done once you’ve wrapped your head around them
Java is a complex, inconvenient language. and that’s the problem
why is there documentation for java.util for Java 8, but not for Java 11? the MOOC that I’m taking uses Java 11 but it also uses java.util so where is the documentation for it??
wait okay so in order to see documentation for java.util I have to click on java.base? but it’s not called fucking java.base.util is it? does java.base somehow contain java.util inside of it despite the fact that the name strongly implies that it doesn’t? fuck this language
fuck any language that:
@kasdeya to be fair it has BOTH traits AND inheritance making its object orientation system more robust than both c++ (uses multiple inheritence to get a similar effect to traits) and rust (uses traits to get a similar effect to inheritance) imo. but yeah it sucks to write in, even in IDE, and it mandates an entrypoint object instead of just an imperative entrypoint function which is just plain weird. i think(?) you can do functions as values, which isn’t lambda but is at least enough to give one a stockholm syndrome - esque feeling like they are using lambda somewhat
[Viridi Vix]
@kasdeya i would rather not have a module system at all than even try poke the half-baked eldritch one that java has 
@kasdeya i'm going to respond to a number of these in the spirit of trying to be helpful and make things suck less (or at least tell you you're not insane), but there's no obligation for you to read it all 🙃
@kasdeya java's reliance on an IDE is definitely *the* bad thing, and even if you get away from an IDE and use an editor + command line (as I often attempt to do), the build systems in isolation *all* suck. these days i just use `javac` (the java compiler) directly, as it's actually gotten quite a bit simpler to use directly since "modules" were added to the language way back when.
@kasdeya unfortunately it's a relatively low-level tool (like most compilers) and you have to either spend some time figuring out how to configure it exactly right, or have a resource that just gives you a template to work from. of course, as you can imagine, most resources use anything other than straight `javac`, so it is not the friendliest way to go (even if I prefer it for its total lack of over-engineered abstractions compared to higher-level tooling).
@kasdeya in conjunction with `javac`, i use Apache Ivy as a dedicated dependency manager. Ivy is significantly lower-level (and more encumbered with over-engineered abstractions) than i'd like it to be, and its documentation is usually less than helpful, but it is *possible* to use standalone without relying on another build system, and it's basically my only option sans managing my own folder of dependencies.
@kasdeya so in sum: yeah, it sucks. IDEs are the golden path to success, and IntelliJ is probably the "best" of them, but "best" does not imply "meets expectations".
@kasdeya every JDK up to the latest (version 24 or so by now) has official documentation, but navigating it or finding it at all is a bit hit or miss. i tend to use duckduckgo's !java11 search bang as a starting point. there should also be a "Packages" index you can look at; modern documentation prioritizes the "modules" those packages are grouped in, but that just makes it hard to find what you want. sorry :(
@kasdeya it does have lambdas! they look like (args) -> { body }, or (args) -> expr. unfortunately lambdas do not automatically have a type; they're shorthand for implementing single-method interfaces like Function<A, B>. you can define your own interface types and use them as the type for a lambda, so it's usually fine, but it can definitely trip you up if you're expecting otherwise.
@kasdeya i agree with every point you made though lol.
@kasdeya there *is* a purity of concept to Java and its runtime that i genuinely enjoy; but none of the tooling that people use make it very easy to apprehend. and i can guarantee that a course teaching java 11 (we're up to like 25 now!!) is not going to teach it either. :(( try to glean what you can, at least! ❤️
@kasdeya The java.base thing is the module system introduced by Java 9.
Don’t worry, the average Java developer (me included) doesn’t understand it either and uses the magic JVM flags to use the pre-module system of classpath soup.
@kasdeya I wish we could draw a line between Java 8 (last version that was largely un-oracled, still gets security updates, nothing really wrong with it) and Java 9+ (introduced a ton of features, some useful, most absolutely hot trash). Java 8 wasn't awful to write using a text editor and a bit of lightweight build automation (a shell script or maybe ant), about on par with C++. I actually kinda like the JVM conceptually, but I refuse to touch anything tainted by Oracle
@liese oof okay I’m glad I’m not just wrong about Java needing an IDE, but also that sucks tbh
I guess I’ll just learn to use NetBeans and stick with that, since it’s probably not worth the effort to figure out how to use javac directly, since I don’t need to know too much Java anyway - just enough to get by
[Viridi Vix]
@kasdeya yeahhhh. Java Platform Module System
that's why the java.util doc is in java.base because java.base is the modularized version of the JDK since Java 9. depends what JDK you use really, some of them aren't shipped in the modularized form even today in java 25 land
and unlike other languages where modules make sense with namespaces, module names in Java are arbitrary half the time, and never seem to match any of the packages included therein
Importing is also weird in java, some jdk stdlib shit is implied imported and the rest isn't. everything in java.lang.* (a member of the java.base module) is auto-import but java.util.* (also a java.base member) requires explicit import
they fucking hard fumbled application packaging in the very original version of java and decided We Will Not Fix Because Wahh Backwards Compatibility and slapped bandaid after bandaid after bandaid on it, using genuinely strange and unusual roundabout mechanisms compared to any other language who realized "oh yeah people might need to be able to send a compiled binary package to another computer from time to time" from the start of the design phase
they wanted it all quirky style and wanted to go "Actually Put Every .class File You Ever Obtain Into One Massive Collective Local Repository Directory In Your Harddrive I Love Dynamic Linking" and then very very very early on realized that applications are maybe larger than one .class file and you need to ship them together.. and also two different applications might use two mutually exclusive API revisions of the same fully qualified class, and their holy mission to spread the word of Our Savior Duke Java and his Sacred Quest To Dynamically Link The Entire World Serial Experiments Lain Style were FUCKED and had to invent the JAR to pretend to fix it (google Classpath Hell for further information). but it's already too late You Will Use Dynamic Linking Forever For Everything Forever And You Will Enjoy It Forever
This is why coding in Java in modern versions without an IDE is impossible because there's so much duct tape boilerplate bullshit that the IDE has to clean up for you or else you'd spend 5% time coding the app and 95% time getting all the extraneous shit around it to play nice together. IDE generally twiddles all the JPMS interactions and whatnot for your output artifacts. sometimes. if you ask nicely on a night that isn't full moon
if not obvious, yes i hate java too, hating java with one's full might is just the rite of initiation for any new Java developer 