Pathway to Python
April 21st 2010I really like learning new languages. It’s a challenge and the change in perspective is refreshing. We spend all day trying to solve a problem with the tools our employers pay us to use. Sometimes we have tunnel vision on the means to solve the problem. Some of the things we pick up along the way are language features that give us a new understanding of what is possible.
5.upto(10) { |i| print i, " " }
Some language features, such as Ruby’s method_missing features that aren’t possible in my benefactors language of choice. It’s not only new language features, but new ways to solve problems. For example, the way Ruby on Rails versions the database and provides the ability to version up and version down the database is impressive.
My newest journey is Google App Engine and Python. GAE supports both Java and Python, but being familiar with Java and it being so similar to C#, Python sounds more fun. Python is a dynamic language, like Ruby, and offers value as a scripting language outside GAE.
So far both Python and GAE have proven very approachable. The app engine is very well documented and the examples are clear and useful. Python is sexy. It’s all that you really need to say. I am not that familiar with it yet, but its string manipulation is very powerful. Take this example.
"something cool"[-4:]
In C# it would look like this.
var s = "something cool"; var c = s.SubString(s.Length - 4)
There’s no denying Python is sexy. You could argue that it is cryptic, but even in this simple example, I believe it’s more readable than the C#.
I have an idea for a pet project in GAE. Hopefully in the next few weeks I’ll have some updates. I’m excited to see how things go.It will not only be an exercise in Python, but also HTML, CSS, usability, UI design. On a day to day basis I rely heavily on our talented designers to make my markup looking great. This is an area of my expertise that needs to improve.