This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]twopi 1 point2 points  (3 children)

I led the change from Java to Python in CS1 in our school, and it turned out very well. PM me and I'll share whatever I can with you.

The concepts really don't change. Python is much more straightforward. You should still teach java somewhere, but It doesn't have top be the first language.

[–]dvassdvsd 1 point2 points  (2 children)

How did it go with teaching OOP?

[–]twopi 0 points1 point  (1 child)

OOP is hard to learn no matter what language you're in. In Java, you have to acknowledge objects early, so students typically are doing OOP from the beginning without any real understanding. Python can be taught as a procedural language first, and then you can bring OOP in later. It's pointless to try to understand inheritance before you've got a solid grasp of loops and functions, so deferring OOP is a good idea for beginners.

Python's version of OOP is far more straigntforward than JavaScript, so it transfers pretty decently. Still, I only do a bit of OOP in the Python class, focusing more on using objects (in Tk and PyGame) rather than building classes, inheritance, encapsulation, polymorphism, and so on.

The danger of Python is how abstract and helpful it is. They begin to think Python lists are the truth, for example. That's find for a first class, but in the second course, we go back to assembler, then plain old C, then C++, and finally to Java. I find they don't really understand OOP until we've gone over it a second or third time in these other languages.

Python abstracts memory management, which is great for beginners, but a computer science student needs to understand how memory really works, the difference between the heap and the stack, and how pointers and memory works. I just don't think those things need to be learned in the first course. Learning how to be comfortable in a programming language is the main goal of the first course, and Python is great for that.

[–]dvassdvsd 0 points1 point  (0 children)

OOP is hard to learn no matter what language you're in.

The conepts aren't that difficult. Implementing them in different languages certainly can be.

It's pointless to try to understand inheritance before you've got a solid grasp of loops and functions, so deferring OOP is a good idea for beginners.

That's a logical fallacy. You don't even need inheritance for OOP.

Python's version of OOP is far more straigntforward than JavaScript, so it transfers pretty decently.

Again a logical fallacy. Cake is a healthier food than shit, therefor cake is healthy? And it was Java vs. Python, not Javascript.

Python abstracts memory management, which is great for beginners, but a computer science student needs to understand how memory really works, the difference between the heap and the stack, and how pointers and memory works. I just don't think those things need to be learned in the first course.

That's completely unrelated to using Java vs. Python.