I was out shopping groceries with my girlfriend the other day. Actually, shopping groceries is a bit of an exaggeration; we were only buying ice cream. I wanted the same ice cream we had bought some days earlier, to which my girlfriend asked me: “Are you a person of habits?”
I had never really thought of myself as a such. But when she asked it struck me, I am. At my local fast food (not to be confused with junk food in this sentence) joint, I always order either a sandwich with chicken and jalapeños or a classic burger. I sometimes edit it a tad — by swapping beef with falafel in the burger, for instance — but in general it remains the same. And I do so with many other things.
I also tend to do this with programming. If I find some cool new technique, I often use it in a lot of cases, also cases where it doesn’t necessarily belong. Fortunately, I didn’t buy that much into AJAX. But a lot of other things tend to stay with me, just because I’ve used them before.
So I hereby declare myself a person of habits.
Men of good fortune often cause empires to fall.
While men of poor beginnings often can’t do anything at all.
Sometime this summer, I started diving into Python. By then I had been doing PHP for about four years, and I was growing mildly tired with it. Being a language aimed at the web definitely had its strengths, but it seemed as though it also limited the language design from the start. Rasmus Lerdorf created it as a way for him to integrate C-code into the HTML he was doing, and it seems as though they never left that path, even as PHP was turning into a somewhat full fleshed programming language. And well, that was starting to annoy me a bit.
So I turned to see what alternatives was there. I started off with everyone’s new favorite, Ruby. I like Ruby, I really like it a lot. The language design is really clean. The problem with Ruby is, it seems as though the only option you have, if you want to do web stuff, is to use Ruby on Rails, and I really didn’t want to. RoR might be all very fine (I don’t wish to get into that debate), but it just seemed as far too big for what I would ever want to do on my own hand. web.py on the contrary, gives me just the tools I need, and then gets out of the way.
So, I chose Python. Two things I thought stands out from the two (who I think largely are very similar) was these:
- A huge standard library. And, contrary to PHP, these comes as modules, so they don’t mess up the scope, you just select what you need.
- Named arguments. While this might seem as a bit of a minor feature, I can’t count the number of times I’ve wanted to be able to do this. I really like named arguments
And after having written Python for some months, I must admit I’m thrilled. I still do PHP at Verk and at GMTA, but at GMTA they let me do some Python occasionally. That’s nice.
I like Python.
A list of things I don’t like about PHP:
- Inconsistent parameter placement
- Inconsistent naming (with a variety of using _ as separators, and not using separators at all)
- No really good command line tool — I know PHP is aimed at the web, but being able to try out simple things in Python and Ruby is really one of the things I like about those languages
Some day I might expand on this list. I might also explain some of the items in greater detail.
I just saw an article at Coding Horror that linked to a page at AIIM E-DOC Magazine. I glanced at the URL and realized that it contained information about what header image should be shown. That’s what I call customization.
knock knock. Anyone there?