Why did RememberYourFriends fail?

September 11, 2006
6 comments Web development

Why did RememberYourFriends fail? I've emailed three friends about RememberYourFriends asking them what they think. The response has been the same from everyone: "brilliant!", "clever idea", "could be a big success", etc. But none of them actually signed up. Why??!!

RememberYourFriends.com is a reminder app that periodically reminds you to keep in touch with your distant friends. The idea came from the fact that I needed something like this for myself and thought it could be a good excuse to try some new web app techniques. It's fully web 2.0 compliant except for the lack of a shiny web 2.0 logo.

Truncated! Read the rest by clicking the link below.

Google London Automation Test conference

September 8, 2006
0 comments Work

I'm writing this from Googles office in London, UK where Google is hosting a conference on Automated Testing. Testing of software that is. There's been very little talking about usability testing or hardware testing. There's been a lot of talks about taking unittesting taken to the next level.

I'm going to blog again about the stuff I learn today. Below is a summary of the stuff I learnt yesterday. Just coming to see the Google office was a very interesting experience. It's very impressive. The office building is beautiful and has a nice feel to it. One of the most impressive things about this office is the free-food canteen which I've used almost excessively but nobody except my girlfriend and my kung fu teacher will minds. I'm only here for two days and they can afford it :)

Truncated! Read the rest by clicking the link below.

Redirect stderr into becoming dots in Bash

September 2, 2006
3 comments Linux

Here's a whacky idea; in a shell script I want to convert every line of stderr into a . on the same line. I'm still a shell scripting newbie but I know that bash can be quite powerful if you know what you're doing to it.

To begin with I've written a little wrapper on cvs commit called ~/bin/cvs_commit which does the following:


#!/bin/sh
cvs commit -m "$1" | grep -v '\.bak*' | grep -v '\.pyc'

Because cvs prints all folders it recursively traverses I if it's a big tree all of that ugly stuff is print to screen via stderr. To get rid of that, I've changed my command to:


#!/bin/sh
cvs commit -m "$1" 2>> /dev/null \
| grep -v '\.bak*' | grep -v '\.pyc'

Let's improve even more...

Truncated! Read the rest by clicking the link below.

Web 2.0 logo generator

August 20, 2006
1 comment Misc. links

Fuckr Hilarious pun where anybody can create a Web 2.0 logo that looks like pretty much any other web 2.0 company's logo.

If you don't know what the Web 2.0 hype is, perhaps you've heard of the "dot com" hype that happened a couple of years ago. Now they're doing it again but instead of "dot com" it's "web 2.0". more info here

Losers like me who haven't been bought up by Google or Yahoo! yet hate the "web 2.0" phenomena and considers it a bad thing. Am I just jealous maybe?

A "web 2.0" buzzword cloud can be seen here if you're wondering if your IT supplier is taking you for a ride.

Madonna's birthday party at the Lounge Lover

August 17, 2006
23 comments Photos

Madonna mugshot Yesterday it was Madonna's birthday. To celebrate her 48th birthday she put on a concert somewhere in London and after the concert throw a little party at the Lounge Lover. The Lounge Lover is a uptown cocktail bar tucked away on a little side street off club row where I live.

It was a lot of commotion. Staff of the bar swept the floor outside and put up barricades. Some paparazzis came already at half eight but the first celebrity didn't arrive until half nine. That was Gwyneth Paltrow

More and more celebrities came. One of the early arrivers was Kevin Spacy but he came in and walked past us so fast that I never had a chance to take a picture of him.

There were a lot of people that the paparazzis seemed to recognize that I didn't. In those cases I just took some wild pictures in hope that someone can explain who that was later. (for example, Lawrence Dalaglio who my flatmate had to explain to me who he was. Sorry Lawrence, I don't watch much television)

Last night was without a doubt an experience. I haven't seen that many nice Mercedes lined up since I was in Monaco a couple of years ago. Pet Shop Boys was the only people arriving in a limo and Jason Statham arrived in a regular black cab.

Now, let us see the pictures

Fastest way to uniqify a list in Python

August 14, 2006
92 comments Python

SEE UPDATE BELOW

--

Suppose you have a list in python that looks like this:


['a','b','a']
# or like this:
[1,2,2,2,3,4,5,6,6,6,6]

and you want to remove all duplicates so you get this result:


['a','b']
# or
[1,2,3,4,5,6]

How do you do that? ...the fastest way? I wrote a couple of alternative implementations and did a quick benchmark loop on the various implementations to find out which way was the fastest. (I haven't looked at memory usage). The slowest function was 78 times slower than the fastest function.

Truncated! Read the rest by clicking the link below.

Unicode strings to ASCII ...nicely

August 8, 2006
20 comments Python

This has been a problem for a long time for me. Whenever someone enters a title in my CMS the id of the document is derived from the title. Spaces are replaced with '- and &' is replaced with and etc. The final thing I wanted to do was to make sure the Id is ASCII encoded when it's saved. My original attempt looked like this:


>>> title = u"Klüft skräms inför på fédéral électoral große"
>>> print title.encode('ascii','ignore')
Klft skrms infr p fdral lectoral groe

But as you can see, a lot of the characters are gone. I'd much rather that a word like "Klüft" is converted to "Kluft" which will be more human readable and still correct. My second attempt was to write a big table of unicode to ascii replacements.

It looked something like this:


u'\xe4': u'a',
u'\xc4': u'A',
etc...

Truncated! Read the rest by clicking the link below.

More crappy album covers

August 6, 2006
0 comments Misc. links

Manowar Some people might think I have a fetish for bad album covers. I do.

Here's another site which seems to be quite focused on metal records and other 80's glam rock stuff. I actually have MP3s with some of those bands, namely Manowar, Pantera and Yngwie Malmsteen.

Check them out here