Sunday, the 28th of December, 2003

Christmas in Madeira

Spent the christmas in Funchal, Madeira. It would have been more fun to be home for christmas (apparently -11 degrees celsius and snow) and be at Madeira some other time (a week of listening to christmas carols gets pretty taxing, and half the time everything was closed.)

The island was in some places breathtakingly beautiful, with lovely flora and absolutely stunning views (or scary views, depending on what you think about a bouncy, narrow road with a low fence and a 200 metre drop right next to it.) Walking along the levadas was quite an experience, too: we only traced one suburban levada and a part of another easy one a bit west of Funchal, but it was a lot of fun and we got to see the nature — and the sheer bluffs — a lot better than through a car window. And the weather was a lot nicer than what weather.com would have had us believe: instead of constant rain and thunderstorms, it was mostly sunny. Some very nice colonial architecture, too. And when the shops were open, there was a surprisingly large number of them, for such a small town.

But then there was the food. And the restaurant scene in general. I wasn't expecting a culinary dream world, having visited Lisbon earlier in the fall, but still it was a disappointment. Probably 95% of the restaurants served similar cuisine, I guess it's what would be called Madeiran. And in all those restaurants, the menu was nearly identical. There were the four salads, the four soups, the six omelettes, a bunch of fish and red meat courses. As a vegetarian I didn't sample most of that — the tomato and onion soup with a boiled egg wasn't nothing to write home about, though — but a reliable source informed me that at least the fish was mostly mediocre (no espada with banana next time, I guess.)

And the wine... I know there are good portuguese wines, but when you can't remember the brands you are left wandering in a wilderness of barely drinkable dishwater. Occasionally, with luck, it was OK, but sometimes you just had to concentrate on water. And of course trying to find anything from, say, France, Italy or Spain was pretty much a lost cause. Mostly it was all Portugal all the time. Mind you, the local beer was very nice light lager, just the sort of stuff you want in hot weather.

To top off the wonderful dining experience, add totally ham-handed service. Hot tips for waiters everywhere: don't remember who ordered what. Don't remember who drinks what. Serve the dishes one at a time, not bothering to serve everyone in a table at the same time. Ignore the empty wine glasses of customers; when they start pouring wine themselves, come over, remove the bottle from the hand of the customer without a comment, and see if there are any empty glasses left, for example, in front of people who don't drink the wine in question. Or half-empty, so you can make them too full. You wouldn't want to be forced into a pouring intervention too soon again, would you? Oh yeah, and a really nice touch is to forcefully make the customer read the awful Finnish translation of the menu when she is reading the English version. I know tourists are probably tedious, but it would be nicer if they didn't treat us as children and try to speak the three words they know of our native language, especially as we have little trouble speaking English which will probably make communication a lot easier.

Mind you, there were exceptions. And I'm sure you could find more if you looked well enough. There was a decent indian restaurant there, and Villa Cipriani, the Italian restaurant of Reid's Palace, was fabulous, with flawless service, a good wine list and superb food. The quality was mirrored in the price, too, though.

I don't know, of course you can't avoid all the effects of an economy ran by tourism, but having people in front of the restaurants trying to get you in very aggressively is unpleasant when you are just trying to have a walk. Not to mention the taxi drivers who think they know better than you do where you want to go. No thanks, we've already seen the botanical gardens, we just want to get to the centre of the city. No, we're not going to Monte at this time, our plane is leaving in four hours. And no, no levadas either, just get us to the centre of the city, will you?

It was twenty years since the last time I was in Madeira, and I have to admit I don't remember too much. Maybe we'll go and see it again in another twenty years.

@ 16:14 +0200 [ ] archived

Saturday, the 6th of December, 2003

Categorizing in Straw

I've been working on adding feed categories into Straw for the last two weeks or so. Well, for a few evenings during the last two weeks.

I first attacked the problem with the traditional(?) hierachy. We have a tree widget for the feeds anyway, so it was just a question of adding the hierarchy. I got pretty far with it, it displayed the hierachy, you could open and close branches and it would remember their status, and you could drag things around (this thread was immensely helpful when hacking on the d'n'd stuff.) At least it mostly worked for me, even though I heard some conflicting reports :-)

Naturally by the next morning I had in the back of my head a different approach to the problem. I've never much liked navigating tree views — yes I'd love to see a column view in Nautilus — and hierachies are a bit restricting, aren't they?

At first I was just pointing out the possibilities for discussion, but by next evening I had decided to do it. Multiple categories per feed, no category hierarchy, one category visible at a time.

Savannah being sort of dead at the moment has put bit of a damper on progress, but still, it's starting to look sort of working, even though it'll still need quite a bit of love before 0.22. There are still things broken, unfinished, or working non-intuitively, but the categories are sort of

@ 00:48 +0200 [ ] archived

Tuesday, the 18th of November, 2003

Scheming for freecell

I didn't really feel like starting work on Straw's subscription categories today, so I was procrastinating playing freecell. Then I got once again annoyed by the fact that the Aisleriot freecell doesn't support supermove, so I decided to fix that instead. I think that was the first time I did anything in Scheme beyond a hello world (so the patch isn't big, but I needed a bit more code to create an initial deal to make testing things fast.) Gotta love Aisleriot, it was just so much nicer than it would have been had it been in C.

@ 00:18 +0200 [ ] archived

Thursday, the 16th of October, 2003

PCL-CVS

Argh. PCL-CVS (299, comes with Debian's XEmacs package) is giving me Connection refused to Savannah when plain old CVS works just fine, even from a shell buffer. Can't figure out why.

...

Oh well, it works from GNU Emacs. Maybe time to switch Emacs families once again, I've been now three years or so with XEmacs, that's about as long as I usually stick with one of them.

@ 23:07 +0300 [ ] archived

Monday, the 8th of September, 2003

Lisbon

Flew to Lisbon early Friday morning with coworkers, saw some sights, got plenty drunk and afterwards a two day long splitting headache caused by neck pain (luckily painkillers helped at least the first day), ate several servings of absolutely lousy food (you get the idea that the Portuguese aren't big on vegetarianism), thought the city was really beautiful, was extremely happy to get back home at midnight yesterday.

@ 17:58 +0300 [ ] archived

Thursday, the 21st of August, 2003

Burden of history

It's true that users shouldn't have to know how things like the X Window System clipboard/selection mechanism works. But really, they don't have to: as the freedesktop.org documents points out, users are really expected to use the CLIPBOARD mechanism which works pretty much like clipboards on the competing platforms and live happily without the select/middle click thingy. Jarno, you only have this problem because even without an unix beard, you've been using these things long enough to know the PRIMARY selection mechanism.

@ 23:02 +0300 [ ] archived

Clippings

I expect Jarno has heard about this already, but just to nitpick a bit: in X Window System, selecting a piece of text does not normally copy it to the clipboard, despite this being a widely-held belief. Or well, it does, but it's not the only clipboard, and in X parlance, it's usually called the PRIMARY selection. There are three standard selections: PRIMARY, SECONDARY and CLIPBOARD.

To copy things to "the" clipboard — the CLIPBOARD selection, that is — you usually have to invoke an explicit copy operation, typically via the menu choice Edit -> Copy (or your localized equivalent) or via a keyboard shortcut, typically Ctrl-C. You might notice some similarities to certain other systems. And the same goes for the opposite actions: middle clicking only pastes the PRIMARY selection. To paste the contents of the clipboard, Edit -> Paste or Ctrl-V is typically the way.

For more information, see the explanation at freedesktop.org.

@ 17:27 +0300 [ ] archived

Sunday, the 17th of August, 2003

Straw 0.19

Yow. Just released it. Finally. It's bloody late. Late as in it was supposed to be out three months ago, and late as in it was supposed to be out earlier today. Or yesterday, really, seeing what the clock says. It involved adventures with CVS (My First Branch) and stuff like that. Plenty of new stuff there, though mostly rather minor. BTW, have I ever mentioned that doing releases is way too much a hassle? I announce them on the Straw news page (hasn't updated yet when writing this, but the updated pages are in CVS), Freshmeat and the GNOME Software Map (which I see still sports the old look), and it always feels like it takes ages.

I hope I didn't screw up too badly when fooling around with CVS.

@ 02:57 +0300 [ ] archived

Friday, the 11st of July, 2003

Straw and Dashboard

As you might have noticed if you follow these things, I actually did something about that Dashboard thing and now the changes to Straw are in CVS. I don't have screenshots of it myself, but Nat has.

@ 13:54 +0300 [ ] archived

Tuesday, the 8th of July, 2003

Groan like it's 1997

I used AIX today. The last time was in 1997. Except for the fact that the black POWER (tee hee) box packed quite a bit more punch than the horrible Apple-branded POS the size of a small fridge I had to use six years ago, it felt like nothing had changed. CDE. ksh. It all came rushing back.

Man, this old slow Linux box running GNOME feels good.

@ 22:45 +0300 [ ] archived

Monday, the 9th of June, 2003

UI infatuation

As an excercise in pain, I've been installing quite a bit of software on a old IBM ThinkPad 600 running Windows 2000 today. I only have to use the machine for two weeks or so, but for that time I do need software. Like a sensible browser. And because W2K makes Galeon and Epiphany non-options, the next choice was Mozilla Firebird.

It's not too bad. It seems to fit in a lot better in the Windows UI than Seamonkey, the previous version of Mozilla's browser, ever did in GNOME. Maybe because my Windows looks the same as every other Windows out there, but my GNOME is running non-default theme (oh, I just checked: Firebird is better at mimicking GNOME than Seamonkey is. Cool.) Mozilla does manage to assimilate some of the customizations, but not nearly all. It's fast, too; it feels faster than IE6.

And, man, I stumbled upon the coolest thing. The RadialContext extension is sexy: good looking, fast, functional. I've heard of pie menus before, but never used one. Partly because all the screenshots always looked butt-ugly. Well, not with RadialContext. In fact, in real life it looks better than in the screen shots. And it feels good to use. It does mostly everything gestures do, but better. Fast and easy gestures accomplish all the operations in the context menus, and you get visual help while still learning where everything is.

Highly recommended.

@ 19:53 +0300 [ ] archived

Monday, the 5th of May, 2003

Mark Watson on automatic accessors for Java

Mark Watson proposes a change to the Java language, in the form of making it possible to automatically generate accessor methods for class attributes. It would work a bit like the generic functions created by the :reader, :writer and :accessor slot options given to defclass in Common Lisp.

However, I think that if that part of the language is to be changed — and I agree it should be — the new design should go all the way to hiding the methods from the users of the class. It should be possible to optionally define the accessor methods you want and then have them accessible by simply using the attribute name. So object.attribute = value would invoke object.setAttribute(value) behind the scenes, if such a method was defined. For backwards compatibility, it would need to do the normal assignment if it was permitted and no method was defined. A close relative to look at for inspiration would be C#. This one of those places where the language is, simply put, better.

[UPDATE]

Reading Bruce Eckel's great blog, I stumbled across this: The Java team is clearly not ignoring the threat of C# [...] along with the new features already on the list for "Tiger" (JDK 1.5), including true enumerations, autoboxing, and generics (templates), they are adding attributes, something (along with autoboxing) taken directly from C#, because it's a good idea.

@ 15:15 +0300 [ ] archived

Thursday, the 17th of April, 2003

99 bottles of GOO

Here's a version of 99 bottles written in GOO. I have submitted it.


(df bottles (n)
        (cat
                (cond ((= n 0) "No more bottles")
                        ((= n 1) "One bottle")
                        (#t (cat (num-to-str n) " bottles")))
        " of beer"))

(df bow (n)
        (cat (bottles n) " on the wall"))

(do 
        (fun (n) 
                (post (bow n)) 
                (post "\n") 
                (post (bottles n)) 
                (post "\nTake one down, pass it around\n") 
                (post (bow (1- n))) 
                (post "\n\n")) 
        (range-by 100 >= 1 1-))

Happy easter.

@ 16:27 +0300 [ ] archived

Saturday, the 15th of March, 2003

Berkeley DB XML

I just went surfing Sleepycat Software to read some documentation (don't ask me why, I just realized I have it all installed locally), when I noticed this: Berkeley DB XML. Apparently not yet released, but interesting anyway. I'm not big on XML DBs, but with Sleepycat doing it, it might be worth checking out. At least they have a great history of doing high-quality, simple, lightweight products that just do their thing with minimum fuss. And if they continue with their licensing policy, all the better. Then we just need some Python bindings...

@ 08:59 +0200 [ ] archived

Monday, the 10th of March, 2003

The pain of going back

DTML is really arse after two months of ZPT.

@ 14:13 +0200 [ ] archived

Tuesday, the 4th of March, 2003

Content management tools fail, Plone marches on

A Jupiter study — I'm usually highly sceptical of these, but hey, maybe they're right for once — says businesses are often dissatisfied with their content management solutions. Complexity, lock-in, overengineering, ridiculous prices abound.

Meanwhile, in Plone land: Plone Improvement Process (a formalized approach to improvements: this sort of thing seems to be pretty popular in the larger free software projects these days, have you noticed?) has a few interesting improvement proposals for an already fine system: Oslo Skin system and Navigation and validation rewrite.

These coupled with improvements to and integration of CMFTypes and possibly the brand spanking new TTWType promise a bright future. It's not perfect and probably not suitable to all situations (there's a clear community site bias, but it doesn't have to be used that way) but it is easy, powerful and has a lot of momentum. And clearly there's still lots of space in the CMS field to conquer. Zope 3 is coming, but this Zope 2 thing is nowhere near its end of life.

@ 12:33 +0200 [ ] archived

Friday, the 14th of February, 2003

Asynchronous fetching seems to be working

Coolness. Straw is actually successfully fetching the dozens of feeds I'm reading, asynchronously, without the troublesome network thread. DNS lookups with ADNS (ha, yes, another dependency), reading stuff off network via asyncore. And the UI is pretty responsive. It's still slower than it used to be, but I think that's a tradeoff I can make. And, as I said earlier, things can possibly be tuned to work out better.

However, one somewhat serious usability problem remains: the stuff is basically fetched off a queue, where things go like this: request an URL -> resolve the host asynchronously -> add the split URL + IP to the fetching queue -> fetch data asynchronously -> stuff the results into the internal datastructures. Now, when you press 'g' or when the timer triggers a polling run, we request all the RSS URLs, then when we have finally gotten something, we parse it, see if there are any images, and request those. See the problem? Unless name lookups are in some cases seriously slow, all the articles are fetched before any of the images. I suppose that's fine if you are interested only in the text, but if not, and you are sitting in front of your aggregator, waiting to read the words of the bloggerdom hot off their keyboards, you get to read the items without images.

So maybe I should prioritize the images higher. That is, stuff the image requests to the front of the queue. And I suppose that as long as we are talking data structures instead of, say, things you see in Helsinki in front of bars Friday and Saturday evenings, it won't be a queue any longer. Oh well. That's theory for you.

@ 00:07 +0200 [ ] archived

Tuesday, the 11st of February, 2003

Asynchronicity

The asynchronous networking rework of Straw is progressing pretty nicely. I've already got the basics working: feeds are polled successfully and images are fetched. The only significant bit of code to be converted is the subscription tool / rssfinder.

It hasn't been totally easy. Converting an existing code base which depends on synchronous network operation to be asynchronous is a bit hairy in places. In fact, rssfinder is one beast which makes me consider leaving some synchronous networking in place, but we'll see about that.

Things aren't all peachy in the brand new asynchronous world, though; first of all fetching data over the network is, at the moment, noticeably slower than in 0.15. However, I suspect that tuning a few constants (timing and limits on open sockets) a bit might help here a lot. And Straw speaks HTTP 1.1, I could try using the same connections for multiple files, even though that would complicate the code a bit.

The second problem is that DNS lookups are still freezing the program. First thing to do, I guess, is to implement a name cache, so it'll be an one-time (per session) cost. But I suspect I'll have to do something about the lookup part itself. The options are, I guess, either using ADNS or forking a separate lookup process. I've been dependency-happy in the past, but I'll have to think what to do with this one; I have no idea how common ADNS is.

Oh, and a big THANK YOU to Fredrik Lundh for the series about building EffNews on his web site. I have no prior asynchronous networking programming experience, and his examples have been extremely helpful.

@ 11:48 +0200 [ ] archived

Thursday, the 2nd of January, 2003

The Problem With XML

XML, despite still having immense momentum, is not without problems. These days it probably is the pragmatic solution for many jobs, thanks to the multitude of tools for various platforms for processing it. That doesn't mean it couldn't, and shouldn't, be better. Not surprisingly, people persist in discussing its faults and how it should be.

Erik Naggum, in his characteristic style, details his beef with XML with a very long article [via Python Owns Us] where he makes many good points about the evolution of data formats and gives his suggestions on what should be changed in the XML format to make it better. While I'm not totally convinced about the binary format bit, otherwise I do agree with his points.

However, I think Aaron Swartz put it best in one little sentence, even if he didn't suggest any improvements: "XML [...] encourages you to be conservative in what you accept and liberal in what you put out.", in direct contrast to the traditional — and sensible — ethos of protocol designers. That is the single thing that is most damning to XML. Thanks to Aaron for articulating it.

@ 00:00 +0200 [ ] archived