MrValdez's Blog

My anecdotes on why I think Python should be a beginner's first programming language

Posted on May 8, 2018

Disclaimer: I'm primarily a Python programmer, a board member of Python Philippines, and used Python before it became popular (I don't remember the exact version, but I encountered the language when it was introduced in Blender).

I started programming with Pascal, honed my skills on C and C++, and made commercial products with Visual Basic 6.0, PHP and Python.

Python is the programming language that I found the most fun to work with [1]. Over the years, I've written a lot of code. Based on pure experience, I can see the programming foundation a beginner will learn from starting with Python first over other languages such as C.

For this post, I'll be talking on subjective reasons for using Python. On a future post, I'll be talking about objective reasons.

I am not saying that other programming languages shouldn't be taught

Other languages have specific use that their designers intended:

  • C was intended for low level systems and as an alternative for assembly. This is why C code is written so similar to how you would write in assembly, only in a higher level.
  • Java was intended for enterprise software. This is one reason that it is a very verbose language, the assumption is that there is a software architect who builds the skeleton before any code is written.
  • lolcode is for the lulz (because programming can be fun and playful).

I want to make the argument that for a beginner's first programming language, it should be Python

Python is inspired by the programming language ABC, a language designed for teaching programming and was built to also be used in normal programming. It was a happy coincidence that designing accessibility makes for a good programming language for creating software.

I've taken advantage of that accessibility to teach the fundamentals of programming.

Anecdotal evidence #1

I traveled and taught in different schools and commercial companies. Over the years, I have became confident that I can teach basic programming to a beginner in 1 day. I can teach practical programming in two days [2]. Some workshops let me have another day or two to teach how to use Python for specific projects. If time allows, the week would be capped by a hackathon where the students apply what they've learned and I, an experienced programmer, can give constructive feedback.

After my workshops, I often get these feedback:

  • the pace of learning is quick when compared to other languages. This is because of Python is a high-level language
  • many are surprised at how easy they were able to learn programming compared to what was taught at school [3].

I directly attribute these feedback to Python and that I am an experienced programmer with the lessons being second nature to me.

Anecdotal evidence #2

This is the story of the first time I've taught programming to a 1st year college class. The school was at a town in La Union, Philippines. The students' families are below middle class and most of my students are not tech-savvy.

On the first day, I taught Python. The students, who have friends at other schools, compared my approach. The other schools were surprised that I was teaching "an advanced programming language". I think its because their teachers didn't know better. An advantage I have is that I started as a programmer first before becoming a teacher.

On the first month, my students know more than the 1st year of other schools. I am quite confident in my fundamentals in programming, and I would focus on the fundamentals over superficial things like IDE choices and premature optimizations.

By the end of the first semester, a handful of my students can code better than most graduating students in neighboring schools. While I would love to say that the majority are good coders, in reality, not everyone have the motivation to become great students (a combination of their environment and poor job options for programming in the province [4]). But I have highly motivated but poor students that go to computer shops to install Python and do their homework there (having no computer is not a reason to learn programming).

By the second year of my teaching career, I heard that the other schools have started teaching Python.

Over the teaching career, my students have told me variations of these stories:

  • my students knows enough to teach their friends how to program.
  • students who've transferred to other schools told me that they get bored because of the pacing in learning other languages.
  • some of my transferred students ended up teaching their classmates and their teachers.

A common thread with my students is that they can teach programming because they understood the fundamentals of programming.

These stories were possible because I am an experienced programmer and I taught programming using Python.

Next, I'll be writing objective reasons why Python should be taught for beginners.

[1] I'll have a future post on what makes Python fun. But the quick answer is: I don't need to think low-level by default. This makes coding very productive.

[2] The teachers, students, or employees choose what I'm going to teach. Its usually something that they'll need for their thesis or work.

[3] I'll have a future post on how programming is taught in school and what can be improved.

[4] Most programming jobs are usually in the cities where my students can't afford to go. Online jobs are a no-go because of the slow Internet in the province.

Categories: Essays, Personal, Python, Teaching