World time is more than GMT offsets

April 10th, 2008

A lot of technology today seems to ignore the complexities of world time, timezones and daylight savings. In fact, as far as I know, there doesn’t even seem to exist a good watch that makes it easy to accurately know the time around the world.

The following picture is from Montevideo, Uruguay. It is 3 hours from GMT. And so is Nuuk (aka. Godthåb), Greenland. So while I am in Montevideo in South America I am sort of in the same time zone as Denmark - how about that? This time of year, though, most of Greenland observes DST, so local time in Nuuk is now GMT-2, not -3.

Clock in Montevideo

If only adjusting your clock to local time around the world was a question of offsets from GMT, figuring out the local time around the would be relatively easy. What really complicates things is summertime (aka. Daylight Savings Time or DST).

In Venezuala there is a certain mad man in charge that wants to create a new seperate time zone! The timezones don’t change that often, but recently there has been changes regarding DST. In USA the days when DST starts and stops was changed in 2007. DST starts and begins on different dates in different countries. Some countries within a certain timezone have DST and some don’t. A European I know asked a local person in a northern African country “Tomorrow at this time, what time is it?” The local person looked very puzzled after hearing the odd question. DST isn’t used in that particular country.

I don’t wear a watch regularly, but use my iPhone to get the time. When travelling to a different time zone, I can go to the time settings in the phone and select the city that I am in or a city that I think is in the same time zone. The iPhone will then use it’s internal clock and timezone information for the different cities to calculate the local time in the city in question.

Recently I was in Buenos Aires and, since it is a big city, of course I could find it in the settings on the iPhone. But… I came to find out that my clock was not showing the correct local time. I talked to an employee in the hotel about it and he said that Argentina in 2007 had readopted DST.

This change made by Argentina had not been reflected in my iPhone nor my MacBook Pro.

I learned that political changes can unexpectedly change timezones and DST. And current “world time” clocks don’t seem reflect these changes.

A lot of technology is developed in Europe or the US, where timezones don’t change that often. And some software developers seem to assume that it works the same way around the world. For instance there is JavaScript software that get a visitors local time from his browser and compare it to GMT to get the visitors GMT offset. That’s fine if you know that the user is in the US for instance. But in most of the Carribean DST isn’t used and in some parts of South America DST is reversed along with summer and winter.

Here’s the lesson for software developers: To accurately calculate a users time zone, knowing a GMT offset is not enough. Getting the closest (politically and geographically) city is best. Furthermore, time zones and DST policies change, so for a world clock to be up-to-date it should probably be updated with the newest time zone changes once a year or so.

3 wanted me to pay DKK 7000+, but have now backed off (and a sailing trip to Sweden)

February 16th, 2008

About 6 months after I complained to Scandinavian telco “3″, they have called me and said that they no longer want me to pay 7000+ (~1000EUR) for something that was supposed to be free. They promised a free trial of up to 3+Mbit mobile Internet access. I took them up on the offer and used the connection while sailing in the Swedish archipelagos.

3G Huawei USB “modem”

In the summer of 2007 I was about to go sailing for a few weeks in Sweden. I wanted to be able to go online during that time. If I hadn’t been able to get Internet access I probably wouldn’t go sailing for more than a week or so.

I had seen an ad for “mobile broadband”. 3 offered more than 3Mbit (today the offer up to 7.2Mbit) Internet access via a USB dongle made by Huawei. Because 3 is a Swedish company with coverage in both Sweden and Denmark, the price was supposed to be the same in Denmark and Sweden. 3 offered a free trial for 30 days. So I ordered it to use in Sweden. A box with the hardware arrived and there was a brochure in the box saying that in foreign countries you would have to pay a rate per MB in addition to the Danish subscription, but that Sweden was exempt from this. Very well. I tried it out in Denmark and it worked well.

Then we set off from Rungsted Havn and sailed south towards the Stockholm Archipelago. The first place we stopped at is a tiny island called Utklippan. There was no fresh water available for the visiting boats or in the latrine. Fresh water probably has to be sailed to the island. Visiting boats have tanks with fresh water so it’s not a big problem. While there was no running water, there were two different open wifi networks with internet access! I tried the 3 adapter too, but that couldn’t me online on Utklippan.

There were a lot of seagulls on Utklippan:

Seagulls on Utklippan

I took a picture of the toilet/latrine. In traditional Swedish style, yellow with heart shaped windows:

Latrine on Utklippan

We then sailed on to harbors at large towns and natural harbors in the “wilderness”. The wilderness was not too far away from areas with Swedish summer houses though. Surprisingly, even in rather large towns the coverage was not good enough for a stable Internet connection through the 3 USB modem. For instance in the harbor of Kalmar I could not get online. Some places I could get a connection with decent throughput though.

Heavy clouds over Västervik - the “3″ mobile broadband coverage wasn’t very good here:

Bad weather over the Swedish town of Västervik

After I came home I sent the 3 USB modem back to 3. Eventually I received a letter with a invoice of more than 7000 DKK (more than $1300 USD). Wow, that’s a lot more than the price of “free” I was expecting. So I called 3 customer service, and they told me I had been using the network of Telia - another Swedish telco. I said that the brochure said that usage in Sweden was supposed to be free. But the guy from 3 told me that it was my responsibility to know that I was using Telia’s network and that it wasn’t free.

I did not plan to pay for something that I was told was free. As far as I was concerned the agreement between 3 and I, was that I could try the product for free for 30 days, and it was free in Denmark as well as Sweden. At no point did I get any warning on my computer that the 3G USB modem was roaming and using another network and that this would cost me money.

So, then I wrote an official complaint and sent it to 3 with certified snail mail. I got no written response but someone from 3 called my on my phone and told me that I should pay the invoice.

I then sent an official complaint to “Teleankenævnet”. A private institution that handles complaints related to telecommunications. After a while I was called up by a “Retention Solution Consultant” from 3 who told me that I didn’t have to pay the invoice afterall. He said that I might receive a request to pay the invoice anyway. I made him send me an email stating that I did not have to pay. This request later proved to be a prudent move.

I later received a letter from a lawyer firm/collection agency stating that I owed 3 some money. Then I called them up on the telephone briefly told them about the situation and forwarded the email stating that I didn’t owe 3 anything. Finally the lawyer firm/collection agency sent me a letter stating that things were settled.

The whole thing took up a lot of my time, but I’m glad that it is settled now.

My iPhone working with my Danish operator without hardware mods

September 3rd, 2007

I recently got a chance to buy an iPhone. After I had made sure that doable iPhone unlocking methods existed, I went for it.

iPhone

Unlocking
Engadget recently announced a software unlock. Mainstream media (MSM) has been picking up this story as well as different hardware based unlocks. The only problem with the software unlocks is that they are not available yet.

But it has been possible to use your iPhone with other operators than AT&T for quite some time now, before the ones that mainstream media is currently talking about. One hack is to use a small sim card enclosure called the “turbosim”, but they are sold out. Another one is called the “supersim”. Neither of these methods require you to modify the iPhone hardware. Basically the supersim method works like this: You create a new SIM card that works like your existing local SIM card. Then you use software to activate the iPhone in a way that makes it compatible with this new SIM card. I used the supersim method, and have been using the iPhone with my Danish mobile phone operator since wednesday last week. As far as I know there are only about 5 unlocked iPhones in Denmark right now.

Interface and exterior
The interface is awesome. It’s fun to flick between the pictures and music albums, to zoom in and out on pictures and websites etc. This is really a big step up from the interface of other phones. Like the interface from the Minority Report movie. My previous phone - a Nokia 7610 smartphone feels very 20th century in comparison.

The virtual keyboard works OK - much better than a numeric keyboard with T9. I learned that to avoid typos, you can make sure that the correct key is selected before you lift your finger from the screen - if you hit the wrong key you can slide to a different key before lifting.

The exterior is awesome too. It’s not all hard plastic like my old Nokia, but mostly glass and aluminium and a little chrome and rubber-ish plastic. Like a Mac, Apple has been careful about all aspects of the product and how it all works together. That said, it’s not perfect of course. There is plenty of room for improvement and refinement. I welcome software updates with new features. Preferably those updates should be compatible with the SIM unlock hacks ;-)

Email spam filtering
There’s an email application called “Mail” similar to the Mac “Mail.app”. It doesn’t have a spam filter like Mail.app does though. So what I did, was to run my email through a GMail account and use setup the GMail account with POP and SMTP on my iPhone. That’s an easy way to get server based spam filtering.

“Missing features”
The iPhone doesn’t do everything. You can’t use custom ring tones (without hacking it), it doesn’t send MMS etc. But I don’t care, those features aren’t important to me. On the other hand the iPhone has features that no other phones have, but it is really about the product as a whole and not a checklist of features. For what it is the iPhone is really good. Interacting with my phone is now fun instead of being a bit of a pain. If you want a nice phone with a nice interface, email, a proper web browser and an integrated portable music & video player, the iPhone does a good job.

PNG fix for MSIE now “Rails compatible” (howto)

August 10th, 2007

PNG transparency doesn’t work in Internet Explorer 5.5 and 6.0. Fortunately there is a fix from Twin Helix, which essentially a little piece of java script that makes PNGs work on MSIE version 5.5 and 6.0.There used to be a problem with the Rails image_tag because it adds parameters to the URL and the fix-script didn’t handle that. But this has now been fixed in version 1.0 RC5 preview 2.

Here’s a guide on how to make it work in Ruby on Rails.

1) Download the IEPNGFix v1.0 RC5 Preview 2 (iepngfix.zip) file from http://www.twinhelix.com/test/ and extract.
2) Create a directory called “iepngfix” in your rails /public/images directory and place the file blank.gif there
3) Place iepngfix.htc in the /public/javascripts/ directory
4) Add this line to your CSS:

5) Open the /javascripts/iepngfix.htc file and change the line that says

(line 15) to:

That’s it.

Troubleshooting: Make sure that the height and width parameters are not missing from your IMG tags.

Macs preconfigured to confuse. Copenhagen is in New York, right?

July 2nd, 2007

My grandfather complained that the weather widget on his Macbook was inaccurate. No wonder - it’s displaying what the weather is on a different continent! Not a good user experience. After setting up the location and timezone of Copenhagen, Mac OS X automatically adds a weather widget for Copenhagen.

The widget on the left in the following picture is what is displayed as default. The one on the right is a widget where I changed “Copenhagen” to “Copenhagen, Denmark” and degrees F to degrees C:

Screenshot of Mac OS X dashboard widgets. Configured for two diffrent places both named Copenhagen.

89 degrees on Wednesday, that’s a lot for Denmark. Water boils at 100 degrees. Oh wait, that must be Fahrenheit. Like every other country in the world, except one, Denmark measures temperatures in degrees Celsius. In the widget settings you can change the units to degrees Celsius though. But if you don’t look out the windows to see what the weather is like you might not notice that something is very, very wrong.

There is a small village in the middle of nowhere in upstate New York named Copenhagen after the capital of Denmark. If you don’t change the default “Copenhagen” to “Copenhagen, Denmark”, the weather displayed is from the small NY village. The problem seems to be that AccuWeather, a service that the widgets are using, ranks American locations higher than others. For instance if you type in London, “London, AR” is proposed. I wonder if Londoners have the same problem. Do they get Arkansas weather by default?

There are many other cases of multiple towns or cities with the same name. I’ve lived in Portland, Oregon which is named after Portland, Maine. Today, if you just say “Portland” most would assume Portland, Oregon (the World Clock widget in OS X does). I can see why the people in Portland, Maine might get upset that another city has the same name. But in the case of Copenhagen there should be no contest about which city is the “true” Copenhagen. Most people would assume that when you say Copenhagen you’re talking about the capital, which, among other things, has a bad ass metal named after it (period table 72) - not a tiny village in the boonies.

What if Steve Jobs was going to Copenhagen and he wanted to know what the weather was like? I don’t think he would be happy about getting a weather report from NY instead. (Some might say that he would pack black mock turtlenecks and Levi jeans no matter what the forecast would say, though.)

This is an example of computer systems trying to be clever and helpful, but where the user would be better of without the artificial cleverness. Defaults are great if chosen with care. In this case it would be better if the default city of the weather widget was a foreign city - San Francisco for instance. You would might confuse “Copenhagen” with “Copenhagen” [sic], but not with “San Francisco”. And when changing the widget to display Copenhagen weather instead you would be presented with a choice between the different Copenhagens of the world. Rather that, than to be mislead into thinking that you’re presented with the local weather, when you’re not.

Apple, you should fix this.

Keeping track of Ruby gems in a Rails project

June 11th, 2007

On a project I’m working on were are two developers. To keep track of the gems needed, we had a file in the root rails dir called GEMS.txt with a list of gems. Then I thought: verifying if I had the right gems installed is a repetitive task the computer should do for me. So I converted the text file to a YAML file, GEMS.yml, that looked something like this:

# Required gems
#
# Version example: version 0.7.5 or higher: ~>0.7.5
# Version example: exactly version 0.7.5: =0.7.5
-
  name: diff-lcs
-
  name: ZenTest
-
  name: RSpec
  version: =1.0.5

This means that you need any version of “diff-lcs” and “ZenTest” and exactly version 1.0.5 of RSpec. You would probably have more gems in there, but I’ve kept the list short for this blog post. Let’s say that another developer has added a new gem to GEMS.yml or changed the required version. Now you simply run “rake check_for_gems”:

$ rake check_for_gems
Gem found: diff-lcs 1.1.2
Gem found: ZenTest 3.4.2

2 of 3 required gems found.
Warning: Gem not found: RSpec ~>1.0.5

Either you don’t have the gem installed at all or you don’t have the correct version. So you install the correct version of the gem and now when you run “rake check_for_gems”, you get “3 of 3 required gems found.”

This is the source of the rake task: You can copy paste and save as lib/tasks/check_for_gems.rake

It’s just a simple tool, but it scratched an itch and was quickly made. Ruby is not only great for web applications on Rails, but also for small scripts like this.

The new RSpec format - testing/spec’ing in Ruby

May 27th, 2007

The RSpec API has been changed. So some of the documentation on RSpec syntax is now obsolete, including Dave Astel’s cheat sheet.

For instance this doesn’t work in the newest version:

I got an error message saying “undefined method `should_raise’”. It should be changed into:

I looked for documentation of these changes on the RSpec website. They are apparently not that easy to find. Pelle sent me this link to a page in the RDoc that describes the built in Expression Matchers and has examples. I haven’t found a super clear description of what “Expression Matchers” are, but they seem to be what goes after “should” or “should_not”.

Is it working? Did I do something wrong? Why aren’t the doors opening?

May 18th, 2007

The button to open the doors of a “kystbanen” train I rode today has a very annoying design flaw: lack of feedback. I’ve used this type of train quite a lot, and many times I’ve seen people being confused and pressing the button multiple times to open the doors.

The train door with button.

Now, let’s say that you have used this train before, so you know that the door takes a while to open and that you only need to press the button once. So you wait patiently. They take a while to open you know this. But after a while you will realize that it’s not opening. So you press it again and wait again. Did it work now? Yes. You’re out, 10 seconds later than you could have been and maybe slightly embarrassed that you didn’t know how to operate something as simple as a door and kept the 5 other people behind you waiting as well.

Why didn’t it open upon the first button press? Because button presses are only received after the doors have been unlocked. If you press the button when the train has stopped but before the doors are unlocked, you will have to press to button again.

The problem with this door opening design is lack of feedback. The passenger doesn’t know what’s going on.

Donald A. Norman writes about this in his book “Emotional Design” (my emphasis):

An important concept of understanding comes from feedback: a device has to give continual feedback so that a user knows that it is working, that any commands, button presses, or other requests have actually been received. This feedback can be as simple as the feel of the brake pedal when you depress it and the resultant slowing of the automobile or a brief light or flash or sound when you push something.

Emotional Design

Now the dark ring in the button (as seen in the top picture with the yellow door) has some LEDs that lights up and show a green circle when the doors are “unlocked” and you will hear a beeping sound. So the designers thought of giving the passengers a cue when the button is ready to be pressed. That is at least something. And the button has a tactile feel, so you can feel that you’ve pressed the button. But there’s no feedback telling you if the button press is received and the doors are actually opening.

How could the system give better feedback? How would I have designed it differently? One way would simply have the doors open immediately with a delay of no more than one second. I’m sure that there are good reasons for the doors to take longer to open though, so let’s look at another solution.

A sound or a visual cue could provide feedback when the button press is received. For instance play a sound and let the LEDs light up in an animated circle like an AJAX type spinner Ajax style spinner. Then you would have a clue that the doors were opening and you could relax and wait.

With this small design change, the passengers would be a little less annoyed, wait a little bit less and the trains could leave the stations a little sooner.

So the lesson is: let the user know what’s going on with the system they are using. Provide the necessary feedback.

Creativity destroys… the obsolete

May 15th, 2007

Welcome to my new weblog: Creative Deletion. I expect to write about technology and business. Does the name sound a bit odd? I was inspired by the concept of creative destruction. The process of new, better solutions replacing the old is very interesting to me. The sum of many improvements - big or small - can have a substantial impact on people’s lives. This gradual economic development is what makes the average person of today1 richer in many ways than a king of a few hundred years ago.

Technology is something I also find very interesting. Partly because technology is valuable to people - if it isn’t valuable to people, what’s the point?

An example of creative destruction in technology is the floppy disk. New technology that lead to bigger files and new ways to transfer and store data, such as the Internet, USB flash drives, writable optical media etc., has absolutely destroyed the market for floppy disks. And it’s actually a good thing that resources aren’t put into production and distribution of floppy disks anymore. Destruction like that can be positive. And it happens “automatically” in market economies. The floppy factories are closed or converted to something else. The retailer uses the storage space where the floppies used to be for other products - or closes the shop and makes way for online shopping.

So both business and technology interest me, and so does the intersection of the two. Delivering value to people is something that marketing and usability has in common. And just like a product should be shaped for the customer, a computer interface should be shaped for the user. I consider business and product development as a an activity that is just as creative as developing computer software or anything else.

In addition to writing about business and technology in general terms, I expect to write about some very concrete technology and source code. Mainly Ruby.


1 The average person living in the western world, or rather, in a place with a high degree of economic freedom.