How I Learned Python Programming Language

Published Aug 18, 2017Last updated Feb 14, 2018
How I Learned Python Programming Language

About Me

I'm a military veteran, who currently works as a systems engineer for a government contractor, and the author of a book series, Learning to Program Using Python. I've been a self-taught Python programmer since 2008 and I mentor Python students at a programming bootcamp.

Why I Wanted to Learn Python

I had taken several programming classes in college (C, C++, and Java) but nothing really serious. I’m not a Computer Science major and I’ve only programmed professionally for the last year.

I didn’t really like the low-level work involved with C/C++. Things like pointers, memory
management, and other concepts were difficult for me to grasp — much less effectively
use. Java, as my first programming class in school, didn’t make any sense. I had never used
an object-oriented language before and object-oriented programming (OOP) concepts gave me fits.

These problems while learning to program left a bad taste in my mouth for programming in general. I never learned a language well enough to feel comfortable using it, much less
actually enjoy programming. Then, I heard about Python on a computer forum and noticed several other mentions of the language at other sites around the Internet. People
were talking about how great the language was for personal projects and how versatile it
was. I decided to give programming one more try and see if Python was the language for

How I Approached Learning Python Programming Language

To give myself more incentive to learn Python, I decided to recreate a role playing
game from my childhood as a computer game. Not only would I have a reason to learn
the language, but I would hopefully have something useful that I could give to others for
their enjoyment.

Having an objective also gave me a long-term goal to achieve rather than simply working on normal homework-style problems or small-scale tasks that had no immediate, practical value.

Challenges I Faced

After self-studying with a number of Python books, I realized that there
weren’t any good books available. Or, at least, none that I could get a hold of. While most books did a reasonably good job providing the information, many of the authors had a “look at what I know” attitude, and the examples frequently lacked clarification and insight as to why the author did something.

Because this was back in the mid-2000's, Python was still relatively new (only about ten years old at that point). The best book I found was more like a textbook, but it was written for Python 2.4, so a lot of the material was out of date in terms of improvements to the language.

It also didn't help that one of the key books I found, Programming Python, by Mark Lutz, was actually the sequel to "Learning Python." Unfortunately, I didn't know this at the time, so there were advanced topics that I didn't understand because I didn't have the foundations yet.

Key Takeaways

This experience, and the frustration I felt using those books, led me to write the first edition of this series — my goal was to write the book that I wish I had had when I first started programming.

This was actually very beneficial because, to paraphrase the saying, if you want to truly understand something, you have to be able to teach it to someone else. Learning Python well enough to write a book made me not only understand it well enough to use it, but to actually learn a little bit more about how the language works and some of the better ways to do things.

It also makes me more inclined to document my code through comments, docstrings, and other methods. One of the things I hate about reading other people's code is that they feel that, because Python is "self-documenting," they don't need to comment. Even if the code is readable, having a comment there can make explaining what's going on much easier and quicker compared to stepping through the code, line by line, to figure out the logic.

Tips and Advice

When learning a new language, pick out a moderately sized goal as the final "capstone" project. This way, you won't be overwhelmed trying to make it work, but it won't be too small to suitably stretch your programming muscles.

My second piece piece of advice is to understand what you're doing to the point that you can explain it to a non-programmer. This way you can "prove" that you actually understand what the code is doing and you aren't just copying/pasting other code you found on the Internet.

Final Thoughts and Next Steps

As the author of an ongoing book series, I'm continuously improving my Python knowledge so that I have new material for the next edition. I've learned about unit testing and the fundamentals of Flask so that I can improve the web application chapter for my next edition. I'm also looking at Kivy so that I can rewrite the GUI development chapter and studying data science so that I can mentor other students.

Programming is a matter of gaining the core foundation of a language and then striking off into different areas to be better able to deal with new problems. Resting on your laurels and not improving yourself means you will quickly fall behind.

Discover and read more posts from Cody Jackson
get started