Category Archives: misc

Sydney

Wow, it’s been a long time since I’ve posted here. I’ve actually had a lot of material for blogposts, most recently about my adventures with scsh, but it somehow doesn’t manage to get from my head onto the blog.

So, what’s new with me? Well…

A few months ago I left the v8 project which I had worked on almost since it started. I’ve enjoyed working on v8 a lot and it’s been a great experience to be an active part in the browser race over the last few years. However, I always knew that I wasn’t going to spend the rest of my life implementing JavaScript.

Last year I visited Sydney and spent a few weeks working at Google’s office there. I happened to be there during the first big demo of Google Wave and watched it with the team which is mainly located in Sydney. I was totally blown away, and that feeling never really wore off. It’s now one year and quite a bit of paperwork later; I’m now living in Sydney and working on wave.

Wave is a very different kind of project than v8 and a departure from the programming language related projects I’ve worked on so far. That’s a feature, not a bug.

Of course, now that I’m drinking the wave Kool-Aid I simply must include a wave element for comments.

Gestures

I’ve been pretty unhappy with Firefox for a while — I think it’s just annoying and crashy. I’ve tried various other browsers, I used Epiphany and Safari for a while, but today I thought I’d try something new so I installed Firefox 3 Beta to see if it really was as good as Mozilla claim. And the news is good: it’s probably fair to describe it as the best browser ever. I like the new UI, I like the combined URL/search box, I really like the new dialog-less would you like to save your password UI, and so far it hasn’t crashed on me. Yay!

And the best thing I discovered today isn’t even the new firefox — it was the FireGestures extension, which I think has been around for a while. This extension is seriously cool!

FireGestures works very straightforwardly. When you hold the right mouse button down it keeps track of which direction you move the mouse. For instance, when you draw a counter-clockwise circle it records that you moved the mouse left down right up left, or LDRUL, and when you release the mouse button it executes the associated action. In the case of LDRUL it opens the FireGestures configuration dialog. There is a bunch of predefined gestures: L goes back, R goes forward, LR opens a new tab and DR closes the current tab. I like the DR gesture because it draws an upper case L, and l is the first letter in the Danish word for “close”.

The best thing about FireGestures though is that you can add your own gestures with a custom sequence of mouse moves and an action implemented in JavaScript. The code for custom gestures have access to information about the page, for instance the DOM node on which the gesture started and the text currently selected.

I’ve used this to add a custom gesture that triggers when you draw a W (or DRUDRU) and searches wikipedia for the currently selected text, or if no text is selected goes to the wikipedia front page:

var text = FireGestures.getSelectedText();
if (text) {
var encoded = encodeURI(text);
var root = "http://en.wikipedia.org/wiki/Special:Search?search=";
gBrowser.loadURI(root + encoded);
} else {
gBrowser.loadURI("http://www.wikipedia.org");
}

Pretty easy — just a few straightforward lines — but really useful. Another gesture I’ve added shows the bug tracker page for the selected bug number in a new tab when I draw a ‘b’ (or DURDL):

var text = FireGestures.getSelectedText();
if (text) {
var root = "https://bugzilla.mozilla.org/show_bug.cgi?id=";
var encoded = encodeURI(text);
gBrowser.selectedTab = gBrowser.loadOneTab(root + encoded);
}

(I’ve replaced the URL to our internal bug tracking system with firefox’).

This is a great extension — simple, straightforward and extensible.

Elsewhere

There was a time, maybe a year and a half ago, when I would post here almost every week. Now, I’m lucky if I post once a month; for instance, it’s been almost three months between this and the previous post. What has happened since then?

Besides being kept pretty busy at work I’ve been spending basically all of the time I set aside for extracurricular activities, like blogging, on a new hobby project. It is a new programming language (what else) which is a child of Saturn and grandchild of Neptune (note to self: find out if there is a roman deity with the same lineage). This is where I’ve been spending my time and in fact this is probably the longest I’ve managed to stay focused on a hobby project without losing interest at any point — and I think the lack of blogging is caused by that. I recently read Vampires of the Internet, which is about writers who blog instead of writing, but which I could also relate to in part. Here is a relevant quote, adapted slightly:

Every day, when you try to sit down to code on your project, you will notice a strange weariness in your fingers. You mind will go blank as you look at the blank screen. And then, almost of their own volition, you fingers will dance on the keys, typing in the dreadful www.blogger.com

Don’t get me wrong, I’m not saying that it’s a waste of time, but sometimes less blogging activity is not altogether a bad thing. If you come back in another three months and I haven’t posted anything new then hopefully all it means is that I’m over at antineutrino (don’t ask about the name) working on my language.

Speaking of language design I came across this great talk, The story of the Ribbon, about the evolution of the most recent Microsoft Office UI. Besides being an all-round interesting talk about UI design (with, however, surprisingly tasteless slides and use of music) he made a number of important points that apply to programming language design as well.

A big problem with previous versions of office was the it had become so compex that people’s sense of mastery was gone (around 23:55). “Sense of mastery is the feeling that you get when you use a piece of software and you sort of understand what it’s capable of.” His first example is notepad, where he says that “Even if you can’t recite all of the features that are in notepad I feel pretty confident that you could form an opinion on all of the things that are in notepad.” This applies directly to programming language design. It should be at the front of every language designer’s mind that programmers should be able master their language, to understand it and to feel that they and not the software are in control. Sadly, I can’t come up with more than two or three languages that even come close to having this property.

Later on he goes through the design tenets of the new office version (around 38:25) and I especially noted two of the rules. The first one is “Give features a permanent home. Prefer consistent-location UI over ‘smart’ UI.”When the user wants to accomplish something it should be clear where to go to do it. If you have several types of menus, toolbars, task panes, context menus and whatnot, it’s unclear where to look for the tool that you need. If you have all the tools the same place you always know where to go, especially if that one place is well organized. Of course this also applies to programming languages. In smalltalk, for instance, there is more or less just one thing you can do: send a message to someone. To accomplish anything you just have to identify 1) who it the subject of this operation I want to perform, and 2) how do I phrase this as a message to that object. If your code and libraries are well organized then this structure is very helpful. Conversely, the more specialized features your language has the more difficult it becomes to identify which feature to use in a given situation. Of course Tim Toady languages are especially guilty here; having the same feature present in different forms according to context is just like a “smart” UI that tries to adapt itself to fit what you’re doing. Introducing special “smart” features only highlights the fact that the standard features are stupid.

The final point, and one that doesn’t need any comments, is “straightforward is better than clever”.

Wikipedia

Notice anything odd about the picture on the right? It’s a piece of the wikipedia front page which shows that one of the handful of languages with more than 100 000 articles is, wait for it, Volapük, a language with an estimated 25-30 speakers worldwide. Hmm…

Obviously the vast majority of these articles have been created by a bot and it turns out that the culprit is SmeiraBot, which automatically translates English articles into Volapük. Most of the articles are about locations, for instance small towns in the US, and range from stubs a few lines long to longer articles of unknown quality to some mostly un-translated articles like this one about Monkeys Eyebrow, KY.

There is a proposal to close this wikipedia and I have to agree: it should be shut down. It exploits the wikipedia project to get attention for someone’s hobby language and devalues the effort that has gone into creating the other local wikipedias. However, the proposal apparently fizzled out so the “vükipedia” may survive. Hrmph.

On the subject of wikipedia, doesn’t it seem suspect when someone with an IP from within one of the largest Danish banks makes an article about a scandal in one of that bank’s subsidiaries less negative? See for instance these edits. Not okay!

Did you mean…?

Boy that firefox spell checker sure read my mind!


As seen on the Daily WTF.

Update: this has been fixed.

Update

Jeez, it’s been months since I’ve last posted. Partly I’ve been busy and partly I just don’t have anything to say. But now I’ve come up with a few half-interesting links to post so I thought I’d give a sign of life.

First, in case you haven’t seen it already, there’s this brilliant flash game that I’ve wasted far too much time playing: gravity pods.

Second, I keep meeting people who have never read Olin Shivers’ acknowledgements in the scheme shell reference manual. If you haven’t already, go read them.

Finally, I came across this great description of a person, from Tim Moore‘s Frost on my Moustache, which had me laughing out loud in the train. It is Lord Dufferin‘s description of his butler, Wilson:

Of all the men I ever met he is the most desponding. Whatever is to be done, he is sure to see a lion in the path. Life in his eyes is a perpetual filling of leaky buckets and a rolling of stones uphill. He brushes my clothes, lays the cloth, opens the champagne, with the air of one advancing to his execution. I have never seen him smile but once, when he came to report to me that a sea had nearly swept his colleague, the steward, overboard.

If you think that’s funny you should read the whole book.

What The F—

Jobs

If you’re interested in programming languages and their implementation (and since you’re reading this there’s a good chance that you are) you may be interested to know that google is currently looking for software engineers for our Århus office:

Google Århus is hiring software engineers to design and implement high performance virtual machines. We are looking for world-class software developers who know how to create robust and optimized system software. You should have a good understanding of programming languages and practical experience with implementing them.

Just, you know, FYI.

Lucky

Some time last week, I don’t know exactly when, a change occurred on the Danish version of the Google front page. Here it is before the change:


and here it is after:


See the difference? They’ve changed the translation of I’m feeling lucky from Jeg føler mig heldig to Jeg prøver lykken. The original phrase is more or less a word-for word translation of the english phrase, literally “I feel myself lucky”. To a Danish speaker this phrase sounds about as odd as the direct translation of the new phrase would to an English speaker: “I’ll try happiness”. It sort of makes sense, and you might imagine a situation where someone might use it, but it’s certainly not a common expression. So I was very happy to hear that they were considering changing it, and now they have. Well, they’re actually not quite done yet, the old phrase is still used in a few places including the personalized homepage, but they’re getting there.

Stuff

What is weirdest? Fálkarnir (I assume he’s an Icelandic country singer) doing a country version of flugufrelsarinn by sigur rós, or Jon Brion doing Creep by Radiohead in the style of Tom Waits?

Also, other videos of interest from YouTube: fun with corn starch, magnetic liquids and zero-g water.