Wednesday, September 19, 2007

I heart Python

For the past year, I've been taking classes that required me to code in Java and C++, and in GUI IDEs, no less. So it's been a while since I've done any Python coding for myself. I finally was able recently to do a bit of Python and re-encounter the joy of using Python. I wrote in vim, and ran my scripts from the command line.

It delighted me how quickly I was done writing the simple scripts I needed - and it reminded me of how much I appreciate that quality. It's so much easier for me to get into the habit of thinking, "I could just program something to do this" when writing the code is so easy. And I was amazed at how fast it was to code the simple scripts I needed. With Python, I'm less likely to talk myself out of it ("oh, it'll take too long" or "it'll be too hard" followed by "find some bloatware that already does it for me...")

I look at my code, and it looks so spare, so bare, almost naked. No curly braces, no semi-colons, few parentheses. The for loop is so clean and simple. No wasted pixels or keystrokes. Only the bare minimum needed to get the job done. I kept thinking "there must be something missing" - but there wasn't.

My scripts do just what I need - and no more. Clean, simple, perfect. Thank you Guido. Python rocks!

No comments: