Wednesday, June 10, 2009

Learning Python

I’ve been spending a good amount of time recently learning Python. Why?
  • ego – I want to be able to walk the walk and speak somewhat intelligently with other tech heads
  • staying relevant – I have another 20-25 years of employment ahead of me…
  • seems like the new Java – I never learned Java (not sure why ) and always felt left out (back to #1 – ego)
As a project manager, my needs for learning Python are different than they would be if I were a developer, the level and depth of understanding are different, but the need to understand the basics and application are the same. I’ve always felt that a good project manager needs to have a good technology background, this provides for insight into development and a common ground for communication. Imagine a PM with mainframe and COBOL knowledge only talking to a 19 year old php/MySQL developer…could be lots of talking going on, but little real communication.

What does learning really mean? I’ve seen a lot of people learn a lot of things, but few actually gain an understanding and the ability to apply the learning. To me, the true test of learning is the direct application (base learning) and extrapolation (advanced learning). Reading a book, typing in examples and getting expected output is just the knowledge that there’s something out there – here’s an excellent Buddhist look into knowledge: ..
Another aspect of learning is understanding WHY it’s important to know what you’re studying, why other people see it as meaningful (insight into others) and why it’s getting the focus. Much of which I’m still trying to get my hands around in regards to Python.

So, what steps did/am I taking in learning Python? Basic google’ing Python was the start, which quickly lead me to - the official Python website. From there I moved to Active Python- - where I downloaded the interactive Python interpreter (and later Komodo edit for a better editing environment). Having an interactive/interpreter made learning and experimenting a lot easier – typically a new language means a new IDE, finding a host or setting up a development environment, etc. – nice thing about Python (one aspect of why its getting the buzz) is the low pain threshold of starting. Being ‘old school’, I also purchased a couple of books – O’Reilly Learning Python and Expert Python Programming: Best practices for designing, coding, and distributing your Python software which I’m still reading. I followed the typical approach of skipping around to interesting sections and trying the code out in the Active Python Interpreter….another important source of help was StackOverflow ( – tech heads ready to answer the most basic questions.

So, now for the good, bad and ugly aspects of Python – SO FAR, I see Python as a very clean, easy to use multi-platform programming language. In many ways it reminds me of Pascal, back in the 80’s (aging myself), a step in helping programmers program correctly. Being a new language, specifically developed for its currently environments, it does not have a lot of the quirks and kludges php, c# and other languages have (if I offend…oh well). The ease of learning (or unlearning and relearning) is there and the interpreter provides for ready/quick feedback. I’ve:
  • .played around with creating a UI (Windows) – not a pleasant experience
  • interacting with various data sources, like websites, files and databases – fun and easy
  • built classes, generator functions, modules – very easy and eye opening to the strength of Python
I see Python (my opinion) as a solid clean language – good entry for non-tech heads and experienced programmers alike (similar to BASIC), the typical evolutionary but not revolutionary steps of technology. Would I recommend it as a platform for development? Yes (depending of course on the actual needs), would I recommend it as a learning platform for new techies or those needing something more than excel – YES. I’m not sure of its stability or performance issues – but, seeing its implementations and uses would expect them to be at an industry strength level (outside of high use sites like Facebook – but I could be wrong).

Next steps for me include:
  • finding a project that I can use Python on (currently looking into creating an opensource requirements management project)
  • looking into Python web development frameworks (seems to be a decision between Django and Pylons)
  • still looking into the interesting python’ic aspects of Python. One pattern I’ve found interesting were the generators (using yield within a function) and redefining superclasses…huge improvements over what I’ve experienced in other languages…
If you’re interested in Python, I strongly suggest installing Active Python (about 5 minutes) and going through the tutorials…

No comments:

Post a Comment