by lindgrenj6 · 9y ago · 0 comments
I can firmly recall in my CS 101 class where they were teaching basic programming using Java, and the teacher seriously told us "just put static in all of your method declarations, don't worry about why yet otherwise you won't be able to use them in your main".
...didn't fully learn what static meant until over a year in my programming career.
Week 1: "it's just some magic, don't worry about it"
Week 2: arrays are a thing, hey look, args is an array of strings!
Week 3: functions are a thing, hey look, "void" is the return type, args is the parameter!
Week 8: objects are a thing, hey look, static mean's it's not a member of an object
Week 9: software engineering is a thing, hey look, public is an access modifier
If you start with
print("Hello world!")
you can already start explaining your subjects everything they've just written and build from there.So, you'll get around faster to teaching the mindset of programming instead of explaining access modifiers. Those are not needed for that.
Also, if you would start an explanation of anything new to me now with "oh, that's magic, just ignore it.", I still would walk away from your course if you can't explain that within a week.
At most universities I've seen, CS101 assumes no programming experience, so if you want to show a real Java code block there's going to be a lot of stuff a student's never seen before.
I also think this is why languages with REPLs and relatively few syntax modifiers (like Python) are good for intro courses. You can fire up a REPL and type `print "Hello World"` and it'll do just that. The students don't have to see any "don't worry about it" type stuff.
edit We may have been agreeing about the "print Hello World" part and the Python part. The problem is that some universities (like my Alma Mater) had the hard requirement of all CS and IT students started with Java.
Sounds like you're a really good instructor for that type of stuff. We need more of you.
I learned programming with Borland Turbo Pascal and later Delphi and have to admit I struggled with the OOP mindset at first. The according chapters of the book I used were filled with contrived examples that left me saying "I can also do this the old way!". Apart from this, I found the book to be very well written, though.
Then, I tried learning C++ (using a Book frome the same series) with Borland C++ Builder. Boy, was that a mistake. I didn't get around to understand why I had to keep using -> instead of . everywhere (before, I almost never used a pointer anywhere), the whole delete-dance was a nightmare and the Borland tooling was so filled with magical clicks that generated event handlers that I never understood how the whole thing really worked (you never got to see the whole code). Headers vs. .cpps was a similar disaster, and compiler errors could only be met with comparing your code with the example on a symbol by symbol basis[1].
So, while C++ is a nice language (far better than Java IMO), starting in it was a nightmare. The problem here is that you have to explain way too many concepts at the beginning (which still holds true even with C++17), and since APIs like the Borland GUI libraries or win32 are based on so much cruft and ages old crap, you'll never get to the point where a beginner can say "Look, I've drawn a circle!".
Honestly, if you ask me, programming courses should best just start with a modern version of Python. But even then you'll have trouble setting up on Windows and getting over the whole UI frameworks disaster.
[1]: This kills experimentation. That's the absolutely last thing you want to do if you're trying to teach a motivated kid how to program.
Edit:
Also note: Often, the mindset seems to be that "beginner" means someone at a university. In my opinion, that's a fallacy too. I started out when I was 11 - I'd never even had any decent english course in school back then. Think of that, and you'll start to see the flaws in starting out with some way too complicated concepts. We should get rid of the notion that a learner has to "push through" things (especially at the start!). It will be to the benefit of society.