I'm a mechanical engineer, which in my case means that I have some very basic experience with computer programming and scripting. I'm also pretty good with PLC language, but when it comes to making an actual computer do my bidding in the “real world” or online, my skills are somewhat lacking. Python is sometimes touted as a fairly easy language to learn, and I'd seen a lot of interesting examples of things people had done with it. It seemed like a good place to start.
In addition to purportedly being easy to learn, there are quite a few good resources that one can use to learn this language. I chose a lesson program called “Learn Python the Hard Way.” You can purchase a book, or even videos, but I chose to go through the free HTML lessons. This worked out quite well for my purposes.
These lessons are divided up into 52 exercises, going all the way from setup and “hello world,” to writing an engine for a simple web-based game. Exercises get progressively harder, and later lessons can take much longer to complete than the first few. The first few lessons may take an experienced or even novice programmer only a few minutes. Lesson 52, however, according to LPTHW's text, is predicted to take between a “week to months” to complete.
I got to somewhere beyond lesson 30 before I took an ongoing “hiatus.” Not to say that laziness didn't play a role in this, but by this point I had learned much of what I needed to start pursuing my own simple projects. Many of them involved using Python to translate an image into some other form with the Python Image Library, or PIL. These included an automatic laser light graffiti machine, which translates an image into servo and laser movements, as well as halftoning with a CNC router which translates an image into G-Code.
During my learning process, I was given a board called a pyMCU, which allows for real-world interaction while running Python on your computer. This is reminiscent to how an Arduino works, however, in this case, the processor is the computer. This makes for some interesting possibilities, including the aforementioned servo control.
I'm certainly not a Python expert, and I didn't even finish all of LPTHW (yet). I was, however, able to go from a novice programmer knowing nothing about the Python language to someone who could do some useful operations with it in around a month. Early lessons are mostly copy-and-paste operations, which should help one memorize the format, and hopefully absorb some of the concepts. This may seem like tedious “yak shaving” at times, but the plan does have “The Hard Way” in it, so you shouldn't expect anything less.
Based on my experiences, Python was a fairly straightforward language to take up. LPTHW seems like a great way to go about the learning process, and can be had for free, so what have you got to lose?
— Jeremy Cook is a manufacturing engineer with 10 years experience and has a BSME from Clemson University. In his spare time he enjoys writing for DIYtripods.com.