Older blog entries for ianmacd (starting at number 81)

Time for another diary entry, I think.

The move to Menlo Park was a disaster. On the recommendation of no fewer than three Google colleagues, we hired a local firm to take care of the two mile move from Palo Alto to Menlo Park.

Well, what a bloody disaster. They damaged furniture, dirtied upholstery, lost screws and bolts in the bushes, brought a truck that was too small, brought no tools (not even a screwdriver), brought no shrink-wrap to wrap upholstery and dresser drawers, and to top it all, they ran late because of all of these mistakes and have now charged my credit card for twice what they quoted us for.

Bastards. Needless to say, I'm disputing the charge with the credit card company.

On the plus side, we now have an apartment with three bedrooms and two bathrooms. It's nice and roomy and feels like a real home. There's a balcony here and swimming pool, but we've had to forego the pool table that we had at the old place.

The wedding is now just over fifty days away and the implications of this are finally starting to dawn on me. There's still so much to do: a cake to be chosen and ordered, suits to be ordered, music to be chosen, people to be instructed on what to wear, where to be, what to do, etc.

There's just no time left for anything any more. The move has consumed the last few weeks of our lives, but we've settled into the new place now and got most of our stuff unpacked.

The move from PacBell DSL to Speakeasy went like clockwork with just a couple of hours of downtime as the servers were moved. Trying to get the Speakeasy circuit up at the new place before losing connectivity at the old place was no easy task, with Speakeasy, Covad and PacBell all involved in a unholy love triangle of inefficiency.

I noticed tonight that bash-completion is now a part of Gentoo Linux, so there are probably even more distributions out there that have incorporated it.

I've been buying a lot of crap on eBay lately. Most of it has been CDs and old video cartridges for an Atari Lynx that I picked up. I also managed to get hold of a good inflatable mattress for when we get visitors in the new place, as we don't have a lot of furniture.

I was offered a job last week for a higher salary than I've ever earned; in fact, a higher salary than anyone I know has ever earned. The only problem is that the job would be with a financial institution in London.

I have no desire to live in London again. It's a great city, but I don't think I'll ever want to live in the UK again. It's too damn repressed.

What's that you say? Yes, the USA is even more repressed than the UK, but then I don't have any intention of settling here either. I'll continue to hang out in Silicon Valley for the time being, enjoying the Californian sun and vesting in my Google stock, and then when the time is right, it'll be back to Amsterdam to buy a nice canal house, preferably on the Brouwersgracht. Amsterdam is the only place I've ever really felt at home and I still miss it terribly.

Another distraction in the new apartment is the DirecTV satellite TV that we've invested in. Now I can watch umpteen church channels, Hispanic minority channels, the game show channel, the love channel and innumerable other stations broadcasting mind-numbing anaesthetic drivel designed to pacify me and turn me into a drooling conformist couch-potato.

Great. I only wanted BBC America, anyway, but it's nice to have OLN for the Tour de France, the HBO channels and things like Discovery, National Geographic and Animal Planet. The rest is absolute bollocks, not fit for the TV room in a hospice full of dementia patients.

Oh well. Time for bed.

Time for another diary entry, methinks.

Sarah and I are moving to Menlo Park next week. It's just a couple of miles up the road from where we are now in Palo Alto, but trying to get DSL organised for the new place is proving to be a great challenge. Even now, I'm not sure we'll be able to make the move without some period of downtime.

Ruby-DICT finally made it out the door a month or so ago. That's another project destined for total obscurity. Still, I find it very useful for my own use, so it wasn't without purpose.

This month's project was borne out of necessity at work last week. I needed an interface to CrackLib to enable me to check the strength of user-supplied passwords, but no such interface existed for Ruby. As is the ideal, I wrote one, which is no small feat for one who sucks so badly at C.

Anyway, check out Ruby-Password if you have a similar need.

Work is getting busier and busier. It's so hard to find time for all the things I have going on in my life right now: work, continuing to gain skill at Ruby, preparing for the wedding, packing and organising our move, etc., etc. I'll be really happy to put this phase behind us.

It's been a very busy month, I can tell you.

Ruby/Google is at release 0.4.0 now. This is a beta release and will probably be the last for a while. All the useful features that I can think of are now present and, to the best of my knowledge, functioning correctly.

bash-completion continues to do well. It's in Debian and Mandrake's Cooker release, but was pulled from Red Hat 7.3 for the fourth beta. Oh well...

I'm currently working on Ruby/DICT, which will be a client and client-side library for the DICT protocol, as defined in RFC2229.

I really can't speak highly enough of the Ruby programming language.

Just look at this piece of code:

module HTML
  def method_missing(methId, data, attrs={})
    tag = methId.id2name
    attr_str = ''
    attrs.each do |key, value|
      attr_str << sprintf(' %s="%s"', key.upcase, value)
    sprintf("<%s%s>%s</%s>", tag, attr_str, data, tag)

Assuming that has been saved as html.rb, you now have a very simple module that returns strings marked up as HTML, just like CGI.pm in Perl.

You call it like this:

#!/usr/bin/ruby -w

require 'html' include HTML

puts a('Google', 'href' => 'http://www.google.com/') puts ul(li('item1') + li('item2') + li('item3'))

The output looks like this:

<A HREF="http://www.google.com/">Google</A>

Voila, no more arsing around with HTML tags in your scripts.

This is how it works. You simply call the tag that you require as if it were a method in the module HTML. However, no such method is defined, so Ruby invokes the method method_missing to handle the error. By default, this method is, itself, undefined, which leads Ruby to raise an exception.

However, in the module above, the method has been defined. As its argument, it is passed the method as a symbol name, then the original arguments to the non-existent tag method. The last argument is optional and is a hash of attribute/value pairs, common in so many HTML tags.

The method then converts the tag and attributes to upper-case, formats the tag around its content, and ultimately returns it to the calling code.

The thing that's remarkable about the above code is how brief it is and how easy it was to write. It took me all of five minutes. Consider how the same code would look in Perl or Python.

Sarah and I are leaving for a long weekend in Vancouver, Canada on Friday. I'm rather looking forward to that. It will be another nice break, probably our last in the run-up to the wedding in August.

It looks like we're going to have to move. Our landlord wants to sell our apartment and we're not about to cough up the $425,000 he wants for the place, so we're going to be on the move again.

I think we're going to end up in Menlo Park this time. We've seen a couple of really nice places and I hope to sign a lease later this week.

It'll be a shame to leave this place. I really like Palo Alto and being close to University Avenue has been fantastic, but there just seems to be a dearth of large apartments in this town. Menlo Park's just up the road, though, so it's not like we'll be travelling very far.

Dinner with Dave Thomas and a bunch of other Ruby users was good fun. The second meeting will be held next Sunday at Pizza Chicago in Palo Alto, where we'll hopefully decide on a name for our motley crew.

Dave also came in to give a Ruby talk at Google today. I'm not sure how many people will now go away and play with the language, but I'd like to believe that one or two will be intrigued enough to try it out.

It was a very enjoyable talk and I'm very grateful to Dave for taking the time to come in and present it.

Ruby/Google 0.3.0 is now out. This version returns slightly different data structures to previous versions, so be warned. It's not labelled alpha code for nothing.

I'm having dinner with Dave Thomas tonight, one of the authors of The Pragmatic Programmer and Programming Ruby, a.k.a. the pick-axe book.

Dave's coming into Google on Tuesday to give an introductory talk on the Ruby programming language. I wonder how many of my colleagues will be inspired to give the language a try after his talk.

Sarah and I spent much of this weekend putting together wedding registries at some of the shops in Stanford shopping mall, a truly mind-numbing experience.

We still need to work out where we're going to go for our honeymoon. Another short break in the meantime would be nice, too. Maybe we'll manage to get away for a long weekend in Vancouver in May, although I'd still like to visit Amsterdam, too.

So many things to do and places to go, but so little time, as ever.

This week, I released my first piece of Ruby code to the outside world. Ruby/Google is a Ruby interface to the Google Web API that was released earlier this week.

If you haven't already looked at the Google Web API, you should. It's a great way to programmatically query Google for standard search results, cached pages and spelling corrections. You're limited to 1,000 queries per day, but you can still do a lot with that. It seems to have created quite a bit of buzz on the Web.

United States: Je naait 't steeds

Coincidence? Toeval?

22 Mar 2002 (updated 13 Apr 2002 at 21:43 UTC) »
Allemachtig, nog maar 161 dagen tot de huwelijk.

My Ruby hacking continues apace.

I'm writing a system to write DSA keys into a MySQL database for account management purposes. This uses the Ruby DBI and is proving very educational. I could have written this much more quickly in Perl, but I took the opportunity to get to grips with an aspect of Ruby that I wouldn't really use otherwise.

At home, I've written a simple whois client, just to try out some network programming. Perhaps I'll even release that for the hell of it.

I hope to have my Ruby coding skills up to the level of my Perl skills within a few weeks (months?), at which point I'll be able to code pretty much anything I need.

Friday tomorrow. Thank God.

Learning Ruby is turning out to be a lot of fun. If you're a Perl fan, do check out this relatively unknown language. Mark my words: a few years from now, it's going to be in extremely widespread use.

The next release of bash completion will feature the ability to complete on remote paths when performing scp completion.

Why the hell are flights to Amsterdam so damn expensive? I can purchase a return ticket to San Francisco from Amsterdam on-line for $450, but a return ticket in the other direction would cost me over $700. It would be great to get to go home for Koninginnedag.

jules finally updated his diary. Bravo!

By the way, Jules, I like your dingen page. Web logs definitely seem to be the flavour of the month right now. It looks great, too.

Well, the save-the-date cards have gone out. That's one more wedding item taken care of. Now, all that's really needed is to arrange some music for the ceremony and possibly book a videographer, although I don't think we'll bother with the latter.

bash completion is doing really well. The next release, which I'll probably put out on Monday, will contain vastly expanded completion for cvs, making it much more useful than it currently is. As usual, the new release will also contain lots of bug fixes.

72 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!