Ruby & Python

    9 May 2008, terribly early in the morning

Tyler mentioned on his blog, in passing, that one reason he likes jQuery more than Prototype is that the formers syntax is a bit object-oriented.

prototype has syntax which strikes me as antithetical to OO principals. for example, Element.hide(‘comments’) instead of $(’#comments’).hide().

I was thinking about the above while writing some Python code at work. I now prefer Ruby to Python, but it took a little while for me to warm up to Ruby. Ruby has a very terse syntax, and there is a lot of room in the language to write programs that look like that are composed of magic and pixie dust. (This is especially true when you look at Rails code.) Once you have written a few programs in Ruby it is a bit easier to see what’s up: where people have decided to leave brackets off, etc. Ultimately I prefer Ruby because if I want to know how long a list is, I can do so as follows: [1,2,3].length(). In Python, the same task is accomplished as follows: len([1,2,3]). The later just seems ass-backwards to me now.

(Python’s object-oriented programming support seems pretty half-assed, but I’m no expert in the language so my opinions of it may stem from my ignorance more than anything else. Still, what’s with all the self parameters. And __init__? Come on, you can do better than that.)

Comment |  

Leon (The Professional)

    8 May 2008, terribly early in the morning

Shima and I watched Leon (known in the US as The Professional) last night. The movie is about the relationship between a very young Natalie Portman, whose family is killed by in a drug dispute, and Jean Reno, who plays a hitman. Reno ends up taking care of Portman after her parents are killed. This is the second time I’ve seen the film, and it was just as good as I remember it. The gun fights are crazy. The stars all are wonderful playing their respective parts. I think it’s one of Luc Besson’s best movies. (It is certainly a cult classic.) If you watch the film, be sure to watch the international version. The original version cuts out 22 minutes of the film. Apparently some of the sexual tension between Portman and Reno was a bit too much for viewers. The film also stars Gary Oldman. Who doesn’t like Gary Oldman? I love the film.

Read reviews of the The Professional at Rotten Tomatoes.

Comment  

← ← ←