Archive for the ‘Uncategorized’ Category.

Two handy Ubiquity commands

This blog has been very quiet, I guess our contributors are pretty busy with school work. Or at least they were. :) Since I’m pretty busy with mine, here are two ultra short tips.

Ubiquity is an ultra-handy (and geek friendly) tool for Firefox that allows for text commands. Today I created two Ubiquity commands that I find rather handy - especially for redditors :)

Automatic Markdown links

I write this blog in the Markdown markup format, which is the same format that is used for reddit comments (which I have been known to make occasionally). When writing blog posts, I often find that I mention a word or a phrase that is naturally turned into a link. This means I have to open a new tab, Google the word or phrase - open the relevant page and copy the URL into my post or comment, making sure it is in the correct Markdown format for links. Now, Ubiquity is very apt at solving these problems, so I wrote a command that allows me to do one of two things:

  1. I write a phrase, say “Reykjavik University”. I then select that phrase, invoke ubiquity (in my case it is Option+Space) and type “mdlink” and hit enter. This performs a Google search on the phrase, picks the first result and uses its URL to make the phrase a proper Markdown link, replacing the selected text: [Reykjavik University](http://www.ru.is/)

  2. Instead of typing the phrase and selecting it, I can also just invoke Ubuiquity and type “mdlink Reykjavik University” directly in the prompt - with the same result.

The command can be found and installed from Gist.github. Notice the (very cool) feature of Gist that it recognizes Ubiquity commands and inserts the appropriate markup to make FF offer you to install it.

Follow this link to see and/or install the “Markdown link” command

jQuery injection

When browsing, I often find the need to do it programmatically, executing Javascript in the context of a 3rd party webpage. For this it is very handy to have something like jQuery on hand and thus I’ve used a bookmarklet to inject jQuery into any web-page. That makes it very easy to do fancy stuff (like down-voting every comment by a reddit user) through the Firebug JS console.

I converted the bookmarklet linked above into a simple Ubiquity command, allowing for quicker access to the “Inject jQuery” operation. You can get the bookmarklet on its gist.github entry:

Follow this link to see and/or install the “Inject jQuery” command

Adobe Lightroom 2 beta

I know this is not programming, but one has to go out once in a while. Of course, after going outside, once I’m home I’m right back on the computer (my wife will be happy to tell you this).

I went on the Golden circle excursion with the ICALP attendees today. This is the “standard” tour given to most visitors and involves visiting the area around Geysir, Gullfoss and Þingvellir. After I got back I started selecting photos to put on the ICALP photo-webpage. I’ve been trying out Adobe’s new beta of Lightroom and I must say I like it. It has all the same features as the previous version, but feels considerably snappier.

One new feature is selective retouching, i.e. you paint a mask and can make some exposure/color changes to selected areas. Of course, performance goes out the window as soon as you do that but it is quite powerful and saves you from starting Photoshop.

While at Gullfoss, I took the following picture of Bláfell, a mountain north-east of there (if I’m incorrect and you know better, please correct me in the comments). The picture straight from the camera wasn’t that great…

… so I played with it for about a minute in Lightroom…

Edited version

While it is still not great, I think it is quite good less than 60 seconds of work. The correctios I made were exposure correction, removing the dirt from the lens with the spot tool and then I made the mountain and sky a little more pronounced by upping the saturation and using the clarity slider (which I think is just the high-pass sharpening technique).

So.. try it out yourself if you like photography.

ICALP’08, pre-conference workshops and first day

So ICALP 2008 is on. I’m fortunate enough that it is held at my school (Reykjavik University) and that I was offered the chance to sit in on the talks in return for helping a little with the organization and administration.

The activities started on Friday with the DYNAMO 2008 PhD school. I didn’t attend many of the lectures, but the ones I did were very interesting. To name one, Elias Koutsoupias gave informative talks on Game Theory and its use for example in online auctions.

Yesterday, Sunday, there were several workshops. I mostly attended SOS’08, a workshop on Structural Operational Semantics. Dale Miller, a hard-core logician, gave an excellent invited talk on formalizing SOS specifications in logic and although I didn’t understand half of it I somehow found it very interesting. His slides are available at his website.

Today was the first day of the conference proper and started off with an invited talk by Google’s S. Muthukrishnan, where he explained how Google runs auctions to decide what ads are displayed along with search results. Attendance to the talk was excellent, and while I had my hands full with other duties, I can safely say it was interesting on many levels.

After lunch I mostly attended track B, on logic, semantics and theory of programming. I’m afraid I can’t say much of merit about the talks as I had to do my best to understand them properly myself. I can say that this first day of ICALP went very smoothly in my opinion. As a bonus, the weather turned out to be very nice so in the afternoon and during the welcome reception, people could stand outside and enjoy the fresh air.

For photos from ICALP, check out our Picasa web album (updated at the end of each day). For more authoritative information on some of the talks, check out MohammadReza’s guest posts on Luca’s blog

The need to know

Earlier this week, Arnar wrote about silly form validation techniques. He specifically mentioned problems with providing Icelandic phone numbers in forms, which fail validation due to the lack of area or city codes. I agree with Arnar that form validation is surprisingly hard to get right and if not done properly it can annoy your users, possibly to the point where they cancel their registration.

However, in addition to improving the form validation code, I suggest (and I am by no means the first to propose this) that we stop requesting so much information in user registration forms, and focus on information that is relevant to the application. For instance, it is very rational to ask for a username and a password that the user wishes to have. It is also rational to ask for an email address which can be used to verify the registration, as well as provide a way to handle forgotten passwords.

On the other hand, I see no reason to require phone numbers, age and so on. In Arnar’s post there is a screen shot from Apple, where they fail to validate the phone number. Why does Apple require you to register your phone number in the first place? What if I do not, under any circumstances, want Apple to call me? If they really need to reach me, they can do so via e-mail. I’m also curious how often Apple actually uses this information, has anyone received a phone call from Apple after signing up for an Apple ID?

The form that led to this post is the account creation form at Digg. I saw an article that I wanted to bump up, an action that requires a Digg account. However, after I viewed the registration form I decided not to sign up.

In addition to the standerd username, password and email address, Digg requires you to provide your first and last name, gender, birthday, and full address. They provide no rational explanation for requesting this information, so I can only assume that they use it to improve their profiling. If I ever feel so strongly about a submitted story on Digg that I feel compelled to sign up, I will most certainly register with false information.

So to wrap this up: request only the information you need in order to provide the service. It leads to simpler form validation, better privacy and less annoyed users. Sounds like a win/win situation to me.