Introduction to Programming with Python
November 25th, 2023
Retrospective
Part of what makes Harvard's Introduction to Programming with Python (CS50P) so great is Professor David J. Malan’s ability to teach programming concepts clearly and concisely. One problem I've encountered with many teachers is that they assume their students have a certain level of prerequisite knowledge. This can prevent the teacher from fully communicating a topic to their students, due to a lack of parity in implicit knowledge between the students and teacher. Despite his programmer proficiency, Malan has the unique ability to approach computer science from the outside perspective of a programming novice. He stresses incremental code improvement and a reliance on building off of previously taught concepts, and this makes his lectures easily digestible, even for a CS outsider. His high energy and passion during lectures makes learning programming exciting.
Malan uses Python as a tool to teach programming, not to teach Python. This was a sharp deviation from the "Introduction to Programming for Non-Majors" course I took previously at my university. That course's goal was to teach the Python programming language and expected students to learn computer science as a side effect. Unlike that course, CS50P sets students up to extend their learning beyond the Python programming language.
What I Learned
Given my previous experience with programming I did not expect to learn much. I was wrong. I found gaps in my knowledge being filled. For example, I now know that function parameters and arguments are two different things. I was surprised that I has gone years without knowing that. It's genuinely impressive how much content is crammed into CS50P’s ten lectures. The topics covered are diverse, practical, and foundational for a further education in computer science. Malan starts by teaching the basics like variables, conditionals, loops, and functions. The content quickly expands to cover APIs, data persistence, regular expressions, and more. Despite the large selection of topics covered, I never once felt overwhelmed by new information. Additionally, the homework was an opportunity to put what was learned in lectures into practice, and never once felt like busy work.
Dislikes
My one small nitpick is that the lectures are not a consistent length. Lectures lengths vary from less than an hour to almost three hours.
Suggestions for Students
Don’t be afraid to pause the lectures and go slow. You will learn much more if you code along with Malan during lectures and take notes. Conversely, don’t be afraid to go off the rails and try to predict what Malan will code if you feel confident. One great thing about this course is that it encourages you to learn through experimentation.
Key Takeaways
- Part of good programming is trying to find a balance between elegance and readability.
- Don’t try to write a program all at once. Incremental progress is important for catching bugs in one’s code and improving it over time.
- Testing code with unit tests is important for confirming that the outputs of a function stay constant, even if the code in the function body is refactored.
Table of Contents