Toxic Elephant

Don't bury it in your back yard!

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.

Brilliant.

Tags 2 comments no trackbacks

Dream

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

Skipping Python for Ruby

Posted by matijs 18/01/2007 at 18h59

Without an e writes

Well, ruby just isn’t that much better than python. If I’m going to relearn everything, why would I bother with ruby? Why not just jump straight to lisp?

I can really appreciate this argument, since it resonates with my reasons for not learning Python: I knew Perl, and was doing most of my programming in it, making nicely structured, readable, object-oriented programs. To me, Python didn’t seem like such a big step forward: It’s like a Perl with enforced readability.

And then came Ruby.

My introduction to Ruby was not through Rails, but through reading the online version of the Pickaxe Book. After reading the first chapter, I was sold. Here was a language that truly embraced object-orientation, and gave access to all kinds of interesting abstractions that I had only vaguely heard of (such as coroutines). There also was a pleasant lack of boilerplate.

So to me, Ruby is that much better than Perl, whereas Python is not. I wouldn’t know if I agree that Ruby is not that much better than Python, but at least I can understand the argument. Ruby is certainly no Lisp, although it comes close.

So what’s next? Lisp’s features certainly look appealing, giving basically the pinnacle of power of abstraction, in exchange for slightly unappealing syntax. I believe the syntax can be overcome, so my next language to learn may well be a Lisp. Which Lisp is still an open question. On the other hand, there are interesting languages like Erlang, ML and the like.

[Incidentally, Without an e is the creator of Scarlet Lambda, which is roughly a web framework written in, or at least used with, a functional style of programming in Python, with a Lisp-like syntax. Wow.]

Tags no comments no trackbacks

Hello, World

Posted by matijs 26/11/2006 at 21h30

On November 2nd our daughter Sophia Emiko was born. At birth, she weighed 3050 grams, and was about 48 cm tall.

In the photograph, she is about three and a half hours old.

Tags no comments no trackbacks

Finally, B'stilla

Posted by matijs 30/10/2006 at 21h36

More than ten years after my only trip to Morocco, I have finally had the pleasure of eating B'stilla. Amazing! It's sweet, hearty, rich, succulant and crunchy.

What I wanted to try but found hard to actually order in Morocco -- as I recall, few restaurants served it, and if they did it had to be ordered a day or so in advance -- I can now get right here in Amsterdam, at a restaurant just a short bikeride away.

Hurray!

Tags no comments no trackbacks

Trackback Spam

Posted by matijs 22/10/2006 at 11h23

The less said about it the better. I just blocked three IP ranges completely. I don't really like to take these kinds of measures, for two reasons:

  1. I don't want to block legitimate access to my web site.
  2. I don't want to spend my days adjusting my firewall, adding rules whenever new spam seeps through the cracks.

Since I was spending my days cleaning up trackback spam, reason #2 stopped applying. There also didn't seem to be any legitimate access from the blocks in question.

Damn Spam has more details on these particular spammers. You can see they've been at it for a while now.

Before, I only blocked one IP address. It was from a company called Webrescuer with a very impolite bot. Aparrently, being impolite wasn't a very good business model, as they seem to be gone now. I removed the block.

Tags no comments

How to write software

Posted by matijs 18/10/2006 at 10h29

Peter Armstrong hits it right on the head:

People Need Gaudy Shit

Instead of having a loose set of things that work, that are generally or even just sometimes good, that we mix and match according to the circumstances, we get everything put together in a box with a nice bow on top. Then, if you don’t use everything in the box, you’re an infidel.

I remember the first time I came across Extreme Programming (XP). I was at a bookshop looking to buy Design Patterns. This was some time ago, but there already were lots of books on XP. Most titles sounded like “XP explained yet again in a different way”. Marketing, indeed.

The thing is, talking a lot to your customers and pair programming have nothing to do with each other. Nothing at all. Both can be good ideas, depending on the circumstances.

When I write software at home, for myself, of course I can’t do pair programming. When I write something that only I will use, there’s no point in talking to my customers. I almost always use unit testing and version control. Using that for a one-off script written in ten minutes is insane.

I could make my own list of what works here, but Robert Fuller has done a pretty good job.

Tags 1 comment 1 trackback