4 ms·
Java has some advantages over python in a teaching environment. Writing a basic hello world function you’ll learn about types, return values, references, impor
by eksemplar 8y ago
Java has some advantages over python in a teaching environment.
Writing a basic hello world function you’ll learn about types, return values, references, imports and access modifiers, all in three lines of code.
Java is also excellent for building stuff like various linked lists to see how the lists and arrays we all take for granted actually work behind the scenes.
The confines of Java’s strictness is also a really great sandbox in which to teach best practices without students ever getting in danger, because java will tell them every time they do.
I know a lot of teachers really struggle to do it well, but going through public void X, word for word can be extremely useful in teaching. For one, it’s very easy to spot who knows what is happening and who is just copying stuff to make it work.
I think python is quite terrible for teaching beginners, but it’s certainly fun to write. These days, I think JS and Node is more fun than python but that’s mostly because it’s where a lot of the fun is happening, I certainly could do without all the {s and ;s.
- earenndil 8y agoI disagree. Those three lines of code are three lines of utter black magic to a beginner. Things are only useful insofar as they solve a problem, and the beginner hasn't yet encountered the problem solved by types yet, so there's no reason to teach them.
- eksemplar 8y agoWell, after the first programming lesson, they are no longer magic. In python, they are never demystified.
- earenndil 8y agoRight. Let's learn 50% of all the mechanical aspects of programming in one lesson. Those just serve to get in the way of initial learning, general program flow and logic.
- eksemplar 8y agoThose few topics aren’t close to being 50% of the mechanical aspects of programming. What are you even on about? Furthermore they are all easily explainable concepts that any CS student will be able to grasp once they reach their first programming language course. I’d say most of the concepts are easy for non-CS students as well. Access modifiers, especially public and private aren’t hard concepts, are they? Yet they are insanely important to your basic understanding of what a function does. Private is like singing in the shower, you’re doing it for you. Public is like signing at a concert hall, there you’re signing for the audience. Return values are values functions return, your can think of them as the result a calculator gives your when you ask it to add 2 and 2, here the return value is 4. Types are typically the first thing you explain anyway, including when you teach python. Maybe you could get people writing complicated functions faster in python, but why would you want to? The purpose of teaching programming isn’t to have people writing code as fast as possible, it’s to teach them to understand what the hell it is they are writing, so they’ll know why they do it.