Tuesday, January 15, 2008

Python Homecoming...

After about thirty years of wandering around the planet, living and working on four continents I recently settled back to a small beachfront town in Australia, the country where I was born.

And after over thirty years of wandering among computer languages I have finally settled on one that I feel will last me for the rest of my career.

The language is Python, and using it makes me feel like I have come home: hence the title of this blog.

I started with FORTRAN on punched cards many years ago. And with Python, I can still write FORTRAN if I need to. Both literally and figuratively as I will get around to discussing.

Most of my software development is numerical algorithmic in nature: my code tends to consist of long series of primarily numerical expressions interspersed with logic. So Python is the closest language I have found to FORTRAN when it comes to writing numerical expressions. And one regular but ill-judged complaint about Python - its use of indentation as a structuring mechanism - is no obstacle to anyone who grew up with FORTRAN!

FORTRAN:
y = x**5 + sin(z)

python:
y = x**5 + sin(z)

compared to

tcl:
set y [expr {pow($x,5) + sin($z)}]

c++:
y = pow(x,5)+sin(z);


So my software environment started with FORTRAN, moved to C in the early 80's, then to C++. There were various side excursions: FORTH, Pascal and Java came and went. Along the way I became aware of scripting languages, which were an easy way of doing a lot of things that didn't need the full power of a compiled language and let you make GUI's for applications with comparative ease. I started with Tcl/Tk, had an occasional foray with perl, but when I came to do a fairly major project, I picked on Python for the job because it seemed like a good language with class and GUI support, and particularly well documented.

I learned the language, finished the application and never looked back. Python has let me solve a lot of interesting problems, write a number of useful applications, got me a Knuth check and generally made life easy. I figure I am 'retired' now, I don't need to learn any new languages because there is more than enough new useful stuff still going on in the Python world to keep me interested.

Anyway, this blog will talk about the history of how I ended up coming home to Python, undertake a bit of advocacy, and generally be a post for interesting and useful (to me) stuff that I run across in my daily work. The emphasis will be on numerical/analytical techniques rather than hardcore language issues.


And I enjoy Monty Python as well! Thanks Guido for giving us this wonderful language.

No comments: