jump to navigation

The Path to Python Mastery April 25, 2011

Posted by PythonGuy in Beginning Programming, Python.
trackback

I’m taking some new apprentices under my wing. Two of them have very little experience programming, and one only has a little. All three are very bright.

I’m noticing that Python is sort of the ideal language for beginners. One of my apprentices was lost on “for” loops. That’s a very good place to get lost. Once you’ve mastered the “for” loop, you’re 80% of the way to becoming a Python Master. So we spent more time than I thought I’d need, but less time than I took, to learn the for loop.

In my mind, the critical steps a Python Master must take are roughly something as follow.

  1. Understand the basic values: ints, floats, strings, unicode, lists, tuples, dicts. Know how to take slices and modify them.
  2. Understand variable names and how Python only stores a reference. Assign the same list to two variables and understand why changing the same list through one variable is visible from the other.
  3. Understand flow control: if, while, for, and try.
  4. Understand functions: how to define them; what lexical scope is and is not; how to write a function that takes a function. (Lambda calculus is a great topic here, if only to show that the fundamental building block of every program is the function.)
  5. Understand how to organize data and functions into classes. Understand all the weird things you can do with classes to make attributes appear mysteriously.
  6. Understand how to organize code into modules. Publish your own module on PyPI, or at least know how it is done. Become familiar with what modules are available in the standard distribution as well as on PyPI.
  7. Participate in a project that is beyond your understanding. Use other tools to find the right spot of code to modify. Modify the code, then test.
  8. Participate in design discussions, learning how to evaluate a program at a very high level. Understand the basic algorithms, Big-O notation, and how different components interact productively.
  9. Create a new project from scratch, and build it until you have five or six engineers participating in it. From this, learn how to manage code among a team.

As you can see, I am a true believer in “doing” versus “knowing”. For myself, a lot of my knowledge is stored in my fingertips (I use ViM a lot). You don’t really understand a piece of something until it has fully become incorporated in how you think about things.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: