So I've noticed that almost all the books etc. in Java are basically living in Java 5.0 land.
They teach an old, crusty and hard to use language. They don't teach modern Java, which is sad, because the 12 years of experience formed since Java 5 was released should actually be used for the benefits of the new learner.
So I ask you Sup Forums, if we were to teach modern Java, warts and all (there is no need to shy away from the fact that the language is imperfect), how should we do this?
My suggestions would be some basic fucking changes to the average curriculum, because I'm sick and tired of kids not knowing BASIC NECESSARY SHIT.
> What is maven/gradle/etc.
Just pick one and stick with it throughout. Don't build using eclipse. Don't use fucking javac. Javac are for those with special interests in this sort of thing.
> Don't teach java.io and neglect java.nio
FFS. How do I read a file?
USE:
java.nio.file.Files.readAllLines(path, cs)
If I see one more
InputStreamReader reader = new InputStreamReader(FileInputStream(new File("/path/to/file")));
I will fucking scream. I swear to the gods. Fuck this shit.
At least teach them the scanner trick.
Scanner sc = new Scanner(file).useDelimiter("\\Z");
String content = sc.next();
sc.close()
I mean, yeah, delimiter sounds strange, and explaining that EOF is a thing is strange. But people managed to learn that when we were taught C. Milennials aren't stupid. So stop treating them like idiots.
> Not teaching them how to talk to an RDBMS
What the flying fuck even is this?
You cannot rely on ORM tools. ORM tools deal with the boring shit for you. You still have to query manually from time to time.
If a new hire doesn't know how to use JDBC, then we have a problem.
Furthermore, how can you avoid teaching people about how classloaders work and claim you're teaching them Java? Don't teach them the subset that they have in common with C#. Actually teach them Java.
What do you think, Sup Forums?