Tuesday, 22 November 2011

Being God

Because I don’t spend enough quality time with computers I’ve decided to climb a new [computing] tree. Actually, it’s an old tree I haven’t climbed upon for years.
Back when personal computers entered my life, shortly after the Atari 2600 did, computer programming was one of the main feats one was expected to perform on their computer. In fact, my choice of first proper personal computer was made by virtue of it having a decent version of the Basic programming language: it was Microsoft Basic for the Dragon 32 computer (a British computer that was otherwise the same as the TRS-80), and it beat the hell out of the primitive Basic available on the otherwise superior Commodore 64.
I did a lot of programming on my Dragon. I did some fooling around with graphics, creating all sorts of patterns; I manually typed in programs from books, mainly games; I programmed games of my own. I even wrote some machine code / Assembly for the Dragon’s Motorola 6809 processor!
However, as computers became more sophisticated the need to write one’s own programs waned. Eventually it got to the stage where I did not even have the tools to write my own programs anymore. With some exceptions at the office and at uni, I stopped writing my own programs on a regular basis as of high school graduation.
I miss it, though. I miss things like being able to solve math riddles, the type that occasionally appear on the weekend papers, using my computer’s brute force and a short ad hoc piece of code. I miss that ability to relate to what I normally see on my computer screen by virtue of understanding how it all works behind the scenes. I miss that feeling of having an intelligent being, a computer, execute my commands to the letter – for better or worse (usually the latter). I miss being god.
So I thought I’d remedy the situation and have a bit of a play in the process. Following Cory Doctorow’s recommendation in Little Brother, I had my eye on Python as a modern day coding language I can easily have a play with. Then Twitter friend @piecritic (aka Brendan Molloy) referred me to Learn Python the Hard Way and Software Carpentry to act as my teachers.
I had a look and quite liked the style of The Hard Way. Its obvious bias towards Linux/Mac did help: I liked the way it spends a lot of space explaining how to set Python up on Mac and Windows, but then settles Linux in only five lines while mentioning that if you’re using Linux you know what you’re doing anyway… It may be a geek’s joke, but it’s pretty accurate: Ubuntu comes ready for Python action right out of the box, and all you need to learn is how to start your terminal. Which you should know already...
Thus I found myself last night doing that famous Hello World variation program. Actually, it a much less politically correct variation to the one I first did several decades ago as a little child. Back then, my uncle drove to a special university facility with mainframe terminals that had us waiting 15 minutes to see the result printed on a piece of paper.
It was cool then and it’s cool now. I’m looking forward to introducing my four year old to the virtues of being a god!

Image: Learn Python the Hard Way

No comments: