Simon Griffee Design Photography Writing Illustration

Learning to Program in Python

2016 September 26

A drawing Monty Python’s foot from the original in Venus, Cupid, Folly and Time.
The Python programming language was named after the BBC’s comedy series Monty Python’s Flying Circus created by, among others, John Cleese. Perhaps this in itself says much about the language.

A friend with no programming experience asked how to learn to program a computer using the Python language, so I wrote this list:

  1. Read What is Code.
  2. Download and install a nice free and open source text editor.
  3. Try these tutorials aimed at new coders. You can also try an interactive tutorial directly in the browser.
  4. Dig in by working on a personal project. Making a website about something that is meaningful to you is a good choice. Django is a web framework — a set of programming patterns to make websites — written in Python. It is one of the best ones, with plenty of good tutorials.
  5. Read Pragmatic Thinking and Learning and keep practicing the fundamentals.

Remember the Zen of Python:

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one– and preferably only one –obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea – let’s do more of those!