Sunday, November 7, 2010

Plus sign in email address

I ordered a micro sd memory card from a random Finnish webstore today. The website appeared to have emerged via time machine from the mid 90s. However I have to give them credit. They did not try to be too clever and validate (incorrectly) my email address in their web form. They allowed a plus sign in the email address.

The plus sign is a very handy tool in organizing/labeling email automatically. Anything after the plus sign is ignored by email servers. Thus it can be used as a label. For example, if I order something from Amazon, I use an address like me+amazon@example.com. In my email client, I can then recognize anything that has amazon as the label and do what ever organizing I want automatically.

So good job, you, the webstore from the mid 90s! Many, many others do it wrong. The programmer's lesson is this. Do not try to validate an email address yourself. If you really need to validate it, use a library that does it right. Often the best way to validate an address is to send mail to it.

Saturday, October 2, 2010

Imagine an all-display phone

There are two major forces that are pushing into opposite directions in mobile phones' physical design. One is the space we have for the apps on the phone screen where the screen size and screen resolution matter. We like to have space. Another is the physical size of the device. We like the device to be small, thin and light.

Look at the physical appearance of the current top mobile phone models. The iPhone, for example, has a screen that is almost as large as the front side of the device. However, the utilization of the available area of the whole device is under 50%. There are clearly space for significant improvement.

Imagine a device that utilizes closer to 100% of the available area. This way, we could increase the space we have for apps dramatically without increasing the size of the device.

In this kind of a device, we would have a uniform working area folded around the device. Some applications could use all of it, or you could have a music player on one side and a browser on the other. An e-book application could always have the next page waiting on the other side, and swapping the page could happen by turning the device 180 degrees around its axis. Turning in the opposite direction would naturally work as expected. Scrolling a webpage would make the page flow over the border neatly. The innovative possibilities are vast.

I did not discuss the technical issues here and on purpose. As in UI design, it is often good to forget about the possible constraints, think outside the box, and just imagine freely. Often the engineers can do it anyway sooner or later.

Wednesday, September 1, 2010

Interfacing Win32 API from Qt

If you ever need to do this sin, just include qt_windows.h and you are free to access native Win32 API.

To ensure the monster still compiles on other platforms, you may even use #ifdef Q_WS_WIN evilness as well.

Enjoy your objectionable life.