Posted by celurian92 6 days ago
The biggest one is types -- students think in terms of meaning, not types, e.g. "this my variable contains first name", but they don't realize it's a string. Or "this is products in checkout cart", but the variable is an integer, so it's products count, not a list of product. Once students get idea of getting an item of a collection and getting a field of that item, while watching every type along the way -- that's a major breakthrough during learning.
The easiest to learn would be a language where you have to define all variable types on top, like Pascal (a language created specifically for learning). But Java is still better than Python, as it doesn't even run wit messed types.
Modern Java can be OOP, functional or procedural where useful. GoF patterns were never enforced by the language.
Or maybe that's even a bit rude to GoF. Some OO patterns - pretty questionable ones - were pushed pretty hard especially in Java EE.
Even then, you were never forced to use Java EE if you didn't need it.
Fwiw, I like that class names and file names must match. In python codebases I have had annoyances with this when I adopted others work.
As far as Java use in companies is an indicator, the horse is still running.
Javas biggest engineering upside was that its JIT compiler allowed the runtime to see through this mess and extract decent performance out of 5 layers of dynamic dispatch that shouldn't have been there in the first place.
Add to that the unclear licensing, which meant that there wasn't a single Linux distro that shipped it out of the box, and the development culture it fostered which required 10x the people each spending 10x the time to build features, and single-handedly was responsible for coining the term 'code monkey'.
As for the software - remember Eclipse? I sure do, but I haven't seen it in like half a decade or more, and that certainly doesnt make me sad.
Made an interactive map/index of the posts, linked by related topics. I made it to make the series easier to browse by concept instead of only by day number.
Toto.tech has a decent example. You have flight controls with wasd + mouse
Just use Apache Commons Lang Strings.CS.equalsAny . If not, List.of or Set.of (if N could be big) should be the best options. Streams are better when you chain many operations.
To name 2:
https://devdocs.io/openjdk~21/java.base/java/util/gregorianc...
https://devdocs.io/openjdk~21/java.base/java/net/url#equals(...