Python is not Java

I recently read some old stuff on Phillip J. Eby's blog, and the Python Is Not Java entry really hit home. I'm not a new Python programmer, I've been using it from around 1996 or so, about as long as Java. But every now and then I see Java-isms creep into my code. It's usually after I try some fancy approach and later on come to wonder why my code stinks. I've been especially guilty about writing completely unnecessary getters and setters and doing (or even converting module level functions to) class methods that end up being just painful to use.

The parts that are more Lisp-inspired tend to be a whole lot better. I've never yet regretted returning a function from a function. Too bad about Python's lame lexicals.

Article page

Sweet screenshots and various other things

GNOME Launch Box is looking sweet. Well, at least from the screenshots, not that I've tried it yet. I was hacking in the autumn on something a bit similar; it's called Pepper but it sits abandoned for the moment. (For anyone interested, it's written in Python and available with tla at juri@iki.fi--2004a/pepper--mainline--0.1, http://www.helsinki.fi/~pakaste/arch/) If the hack by the Imendio boys is any good, it can stay abandoned.

In other news, feeling that PyGTK is becoming mainstream, I seeked out a new ghetto and started hacking with λgtk and SBCL. λgtk is a bit painful to install at the moment, requiring a new core with the sbcl-af stuff for SBCL, but it looks like Brian Mastenbrook is working on it. I was thinking of using OCaml, but then decided that the type inference stuff of CMUCL/SBCL is good enough a compromise between decent typing and flexibility. If anything comes of this project, I'll probably have to take a look at the libglade bindings I pointed at previously and also bind gconf and stuff.

Also, in the category of nifty languages building on other people's VMs, yet another one I wasn't previously aware of: Nice doesn't look too bad. Also see Scala, Boo and Nemerle. For the record, I think Groovy looks like what happens when a dozen languages collide with each other and someone is picking up the pieces and trying to match them together. With little success.

Article page

Moving, part two

We've now lived here for one week, and it's slowly starting to look like home. We've unpacked half of the boxes and assembled most of our furniture. We even have some curtains, although not quite enough. And we've painted one wall; the rest are still all white, we are going to paint three more walls at some point.

The new place is farther from city centre than the previous apartment, but I've discovered it's not quite as bad as I thought it would be. With luck and good timing, you can make downtown in less than half an hour. The commute time varies a lot: I've made it in something like 35 minutes, but it's also taken an hour once.

Article page


Geeks and cameras

Reading Planet GNOME recently, I'm reminded of something a co-worker said while we were in Prague: It didn't take more than the invention of the digital camera to turn this bunch of engineers into Japanese tourists.

I was one of the people who was snapping pictures all the time.

Article page

Prague

Went to Prague last weekend on a company trip. Fabulous city, cheap and decent beer. Culinary side of things wasn't that impressive, although it was better than Lisbon where we were last year. Main point of excitement on the trip was four people of our group getting their luggage stolen two hours or so after our plane landed, when they left them in our minibus and the driver wasn't guarding it.

We went to see Faust in a black light theatre. It's apparently a local speciality. As a co-worker put it, it was slightly worse than a piece of shit. We were all in agreement. Never, never again.

Also went to see the Czech - Germany world cup hockey match, which wasn't anything to write home about (not that it prevents me from blogging about it.) The result was clear from the start, even though the Czech team played a lazy game. They did win 8-2 or something like that, going on pure routine. It was the second time in my life I've been to a hockey game, and the commercialism was something painful, with multiple ad breaks in the middle of the periods. The tackiest moment of all was someone proposing (and apparently getting yes for an answer) to his girlfriend in the middle of the game, with the whole arena watching it on the screen. I thought that happened only on Friends.

Article page