Archive for March, 2008

My flatmate found a wallet

Monday, March 17th, 2008

My flatmate manages a Hotel Chocolat on Kensington High Street and today one of his staff found a wallet. Before he could have a look at it the store radio that links all of the other stores in the high street and the police that another wallet had been found. And another. And another …

The wallets had been deliberately dropped by guerrilla marketers promoting a new TV programme Dirty Sexy Money. An interesting idea but probably not too successful unless loads of idiots blog about it.

Wallet found in Kensington

Protest outside the Chinese embassy in London

Monday, March 17th, 2008

Twice a day I ride past the Chinese embassy in London. It isn’t well marked so you would never know it was there if it weren’t for the permanent peaceful protest by supporters of Falun Gong. They are ticked off that their government imprisons them and sells their internal organs before they have finished using them. The other give away is the cop with a machine gun across the road.

Tonight the usual one or two man protest was slightly larger as about a hundred people turned up to protest the deaths of a number of protesters in Tibet. Naturally there was a much larger number of police with automatic weapons. The good news is that we live in a democracy where civil rights are protected by the law and the police don’t gun people down in the street who disagree with the government.

Protest outside Chinese Embassy London

Subprime hits Japan

Friday, March 14th, 2008

I got this today from my mate Brett.

Following the problems in the sub-prime lending market in America uncertainty has now hit Japan, in the last 7 days: Origami Bank has folded, Sumo Bank has gone belly up, Bonsai Bank announced plans to cut some of its branches, Karaoke Bank is up for sale and will likely go for a song, Shares in Kamikaze Bank were suspended after they nose-dived, 500 staff at Karate Bank got the chop, and analysts report that there is something fishy going on at Sushi Bank where it is feared that clients and staff may get a raw deal.

Denmark is awesome

Wednesday, March 12th, 2008

Rachel and I went to Denmark after Xmas to so a spot of sight seeing in the cold Scandinavian air.

We loved Copenhagen and the parts of (Old) Zealand that we visited. Zealand is the area north of Copenhagen and is different to the province in the Netherlands called Zeeland.

One of the things we really liked is the locals seem really honest. All over the city there are loads of bikes that are not locked to anything, In one shocking case a local left a six pack of beer on the back of the bike completely unguarded. There can’t be too many cities in the world where you could do that!

You have to love Copenhagen

They even have several beers called Carl. You can’t fault them for good judgement or taste.

Carl - the taste that refreshes

Converting px into percentage and em for relative CSS font sizes

Wednesday, March 12th, 2008

Recently I have started to get a lot of requests to make certain fonts on my websites this pixel (px) size or that pixel size.

For accessibility reasons I do not use pixels as a measurement of font size. Pixels are what is known in the trades as a fixed font size so they do not resize on some browsers when the user manually changes their browsers font size. The main problem is IE6 which despite all logical sense is an insanely widely used web browser.

So if a visitor to a poorly coded website had difficulty reading small text and they tried to increase the font size in IE6 and a lesser web developer had set the font sizes in pixels, then that user would not be able to read the web page. You could say that page would be inaccessible to them.

Thankfully there are some font size declarations that do resize in all the different web browsers. These are percentage (%) and em (em). I prefer percentages because that is what I started using way back in the day and they still haven’t let me down. But both effectively do the same thing.

To make my life easy I made the following table to convert fixed pixel sizes into % and em. The maths is quite simple. The basic font size on most browsers is 16px which is 100% or 1em. To work out the percentage of 17px I divided 17 by 16 and multiplied by 100. The result is 106%. For em I just divided 17 by 16.

The other thing to note is that web browsers do not display non integer font sizes. So a percent of 105 might display at 17px or 16px depending on the browser.

One final point I should add is that every time you decrease the font size by 1px a certain number of users will no longer read the text. For that reason I do not like to use font sizes under 12px/75%/.75em.

Px Size % Size Em Size
36px 225% 2.25em
35px 219% 2.19em
34px 213% 2.13em
33px 206% 2.06em
32px 200% 2em
31px 194% 1.94em
30px 188% 1.88em
29px 1.81% 1.81em
28px 175% 1.75em
27px 169% 1.69em
26px 163% 1.63em
25px 156% 1.5em
24px 150% 1.5em
23px 144% 1.44em
22px 138% 1.38em
21px 131% 1.31em
20px 125% 1.25em
19px 119% 1.19em
18px 113% 1.13em
17px 106% 1.06em
16px 100% 1em
15px 94% .94em
14px 88% .88em
13px 81% .81em
12px 75% .75em
11px 69% .69em
10px 63% .63em
9px 56% .56em
8px 50% .50em

Note: there might be some subtle differences on less popular browsers.

More cycle resources

Tuesday, March 11th, 2008

While on the TFL website I also noticed that they have a tube map that shows you where you can take your bike on the tube. The short answer is “not many places”.  London isn’t like cities like Copenhagen where trains are spacious and come with bike racks inside them.

They did have this link to bikeability who can general teach riding skills and how do avoid door ambush.

Cyclists not seeing car door opened = Ouch!

Tuesday, March 11th, 2008

When I ride through the city I give parked cars a wide berth because you never know when someone will open a door or someone will walk out. This morning I saw a stark reminder of why caution is the best policy.

While I was riding to work around Regents Park I saw a cyclist on the other side of the side of the road passing a parked car when the driver of the parked car opened the door without looking and knock the cyclist off his bike. From where I was it looked like the rider hit the door with his thigh and not his hand/handle bars. Luckily he wasn’t riding too fast but it still looked very painful.

I also found out today that the Transport for London website suggests that cyclists should look out for car doors being opened into your path. They should also suggest that cyclist should have reflexes of a cobra and the ability to read minds of other road users who don’t think looking is important.

  • Black cabs swerving to the kerb to pick up/drop off passengers
  • Pedestrians stepping out into the road without looking (and most of us do it on occasion)
  • Passengers hopping off or on Routemaster buses without looking
  • Vehicles turning left across you – even more serious if it is a bus or truck
  • Car doors being opened into your path
  • Vehicle creepage at junctions
  • Delivery vehicles parked in cycle lanes
  • Drivers failing to indicate properly leaving everyone guessing
  • Vehicles doing impromptu U-turns.