Toxic Elephant

Don't bury it in your back yard!


Posted by matijs 18/06/2007 at 13h13

Last week, I did some work on my website, upgrading to the latest Typo trunk and Rails 1.2, and changing from mod_fcgid to a Mongrel cluster.

Last Friday or so, I rebooted my server. Unfortunately, I had neglected to make the Mongrel cluster start at boot. So for the past weekend, all you have seen here is a Service Temporarily Unavailable message.


Tags no comments no trackbacks

A DSL for making SQL-like DSLs

Posted by matijs 14/04/2007 at 14h42

Setting the stage

Some time ago, I came across SQLDSL, a DSL for building SQL queries. The benefit of using a DSL over plain old string concatenation is that syntax is checked before the database server is hit. Unfortunately, SQLDSL does not deliver. It will happily accept

q = Insert.into[“frot”][“zop”][“blob”].values(“kng”).values[“kgn”]

resulting in

  1. => “insert into ‘frot’ (zop) (blob) values (‘kng’) values () (kgn)”

which is hardly acceptable SQL.

Tags no comments no trackbacks

Who told you to come to this book store?

Posted by matijs 10/04/2007 at 22h22

Say you’re an online book store, and you have an affiliate program. Of course, affiliates come and go. So, what do you do when, say, slashdot stops being your affiliate, and someone clicks on an affiliate link left lying around in an old book review? Do you

  1. Show the book anyway, but not pay the affiliate? Or…
  2. Tell a potential customer to go elsewhere?


Tags 1 comment no trackbacks

Strike, Stones

Posted by matijs 30/03/2007 at 11h44

For work, I’m in Chennai in India. Up to today, I have seen the apartment where we are staying, the office, restaurants, and the streets in between. That is actually already a lot to see: There’s always a lot going on on the streets.

For tomorrow, a trip was planned to Mahabalipuram, but now there’s a big strike planned, and the trip was canceled. The reason is not that there won’t be transport, but that people will be allowed to throw stones at cars without fear of punishment.

Tags 1 comment no trackbacks

Resistance to Posting

Posted by matijs 25/03/2007 at 13h05

Daring Fireball talks about about an interesting post by Tantek Cilek about Human Interface Design. It’s true that there is some cognitive load in posting a blog entry as opposed to just answering What are you doing?

Partially, that resistance is good. Like forums, or blog comments, the Twitter entries are mostly like noise. A soothing background hum that lets you know other people are alive and going about their business. Unfortunately, that business is often uninteresting in the long run. So how long are we willing to store it, even for ourselves?

On the other hand, it is annoying that I have to come up with a title that covers this little post that wanders all over the place. Or that so many thoughts end up as half-finished posts in my drafts pile.

Tags , no comments no trackbacks

crontab -r

Posted by matijs 20/03/2007 at 18h27

I don’t use the crontab command on my own machines (I just put files in /etc/cron*), but recent experience on another machine made me wonder why crontab has the following options (this is from crontab --help):

    -e      (edit user's crontab)
    -l      (list user's crontab)
    -r      (delete user's crontab)

Right. E is for edit, L is for list, R is for delete. Makes sense. And as a bonus, it is easier to accidentally delete your crontab when you want to edit it.


Tags 2 comments no trackbacks


Posted by matijs 13/02/2007 at 09h43

Last night, I had a dream. There was a gathering of people for dinner. It was probably not my house. I mean, it didn’t look like my actual house, but in my dream it was also not my house. We sat at a table with a thick rough wooden top. The light was soft, coming mostly from the simple lamp hanging over the table. The floor was also wooden, as were the low shelves lining the walls at the other side of the room.

I was sitting at the head of the table. I’m not that tall, so I was looking slightly up at the other people at the table. On the second chair to my left sat a young man who was somehow connected to Microsoft. Probably he worked there. He was very enthousiastic about Vista.

At some point he said something that really upset me. I think it was about how something could not be fixed, and users just had to either live with it, or buy something new. I told him, how can he say that when there are people how have to get by on very little money, and can’t afford to buy the shiney new stuff, and that Bill Gates is really out of touch with reality. I don’t remember the exact words, but I was clearly very angry. The young man decided this animosity was too much for him, and left.

Afterwards, I was standing on the other side of the room, shaking so badly that I dropped two glasses that I was trying to drink from to calm down on the floor.

Tags , no comments no trackbacks

WNT Online

Posted by matijs 27/01/2007 at 12h40

As of today, the ‘Woordenboek der Nederlandsche Taal’ (Dictionary of the Dutch Language) or WNT is online. It is a massive dictionary of Dutch, apparently comparable to the Oxford English Dictionary. I first heard about this dictionary when I was a young boy, and my father made a documentary about it (sorry, those links are in Dutch). At the time, the WNT was not finished and already occupied several bookshelves. People had been working on it for 125 years, and it seemed it would not ever be finished. Since then, they’ve clearly come a long way.

[Unfortunately, their interface is in Flash. Why, why, why? Three of the ten questions in their FAQ have to do with problems caused by choosing Flash. That should have made some bells ring.]

By the way, I was alerted to this historical event by the invaluable Language Log. Be sure to also read the resulting discussions of Babel Fish name mangling.

Tags , no comments no trackbacks

I Want Cells-GTK for Ruby

Posted by matijs 22/01/2007 at 13h21

For some applications, a spreadsheet is the perfect development environment. The UI is a no-brainer, while the relations between the different values is clearly visible, and changes are automatically propagated from what could be called properties to derived values.

The problem is, of course, that you’re missing out on the features a programming language could offer. Macros are basically a dead end, unless you like to solve user issues like ‘It doesn’t work because I disabled all macros.’

What I want is something that gives me this easy linking within a model and between model and UI, but from withing Ruby. It is my prefered solution to the Gnome on Rails problem.

Cells for Common Lisp promises to take care of the automatic propagation and dependencies between cells:

Cells is a mature, stable extension to CLOS that allows you to create classes, the instances of which have slots whose values are determined by a formula. Think of the slots as cells in a spreadsheet (get it?), and you’ve got the right idea. You can use any arbitrary Common Lisp expression to specify the value of a cell. The Cells system takes care of tracking dependencies among cells, and propagating values.

That seems to take care of the automatic updating of derived values. The second part is the no-brain-UI. What’s needed for that is a dead-simple way to link settable values to input widgets (text boxes, spin buttons, etc.), and to link derived cell values to labels. By dead-simple I mean that it should be done in at most one line per widget/value pair.

It seems for that part, the solution would be to use cells-gtk:

Cells transparently link GUI elements with each other and the application model to greatly simplify development of rich interfaces. Cells also automate how Lisp GUI instances drive their GTK+ counterparts.

Sounds great!

The problem (for me at least) is that this is all in Lisp, and I don’t know Lisp yet. So, I want this, but in Ruby (since that’s the language I like to use most right now). Some basic ingredients are already there: We can use blocks as formulas for the derived values, and there’s the Observable module. Also, Ruby has bindings for Gtk+.

I have some more wishes, but they’re mostly about Gtk+, so I leave those till later.

Tags no comments no trackbacks

Hurray! A Forum That Doesn't Suck

Posted by matijs 20/01/2007 at 10h28

Wow, compare the eye-friendly layout and colors of a Twelve Stone forum thread, to a completely random example of pbpBB.

There’s also a refreshing lack of the unwelcoming five *cannot*’s that grace nearly every forum I anonymously surf to.

Tags no comments no trackbacks