Rest i Peace Hotmail

hotmaillogoOne of the oldest most recognized web services is no more, Hotmail has been turned off. What Microsoft describes as a successful transfer of Hotmail.com to Outlook.com marks the end for the former Internet giant.

Hotmail was cool back in 1996 for many reasons. The brand name was smart, HoTMaiL contained all the letters of the HTML acronym. The service marked the beginning cloud services. As a bonus it was fun to see friends who confused the word “mail” with “male” when typing the address of the service.

Microsoft bought Hotmail in 1997 for estimated $400 million.. and it has been downhill from there. I remember the outages and confusion when Microsoft first tried to migrate the service to Windows Servers. I wonder if there will be more of the same now that they have switched the whole service for their new baby Outlook.com.

Similarly to Hotmails failure Yahoo have AltaVista in the same state of hibernation. Google acquired YouTube, another “first Internet giant in its field”. Google however chose not to rebrand it but rather keep it as a separate “cool” brand. Ever heard of Google Video? They even had a competing service when they bought YouTube, yet they decided to keep the brand YouTube. Google Video have now gone the way of Hotmail and Altavista, but YouTube lives on of course!

RIP Hotmail.

Browser statistics – time to wake up!

Usage_share_of_web_browsers_(Source_StatCounter).svg

Hello World! Time to wake up and smell the browser statistics of 2013! All of those sites and developers who still claim that you need Internet Explorer for viewing or using their site needs to wake up.

According to several sources Chrome is now the individually largest web browser at roughly 35% market share. Noteable exception from this statistic is tracking done by NetApplications that pegs Chrome at only 19% (and Internet Explorer at 54%). Still, 19% market share means almost one in five visitors use Chrome!

It’s time to let go of the past. Reverse your conditions and say that this site is best view in ANY web browser EXCEPT old Internet Explorer versions. Adhere to standards instead of individual browser versions. A website can be made to look and work almost identical in majority of web browsers (including the latest version of Internet Explorer) if one simply takes the effort to learn how to do that.

The only case when I can accept shortcuts with limiting testing to a single browser (and even version) is for intranet applications in a controled environment. The rest of the world should head for the future and develop for Chrome, Safari, Firefox, Opera and of course also Internet Explorer!

2013 – my wish list

Things I wish for (professionally) in 2013:

  • HTML5 comes to your tablet, smartphone, desktop, TV and preferably also toaster and refrigirator – HTML5 is allready in most of those devices, I just hope people will stop using the argument that HTML5 is not versatile or fast enough for most applications.
  • SEO where content is king – when link schemes and other black hat methods become secondary to creating great content.
  • Apple, Google, Samsung, Oracle and the rest… PLEASE STOP THE PATENT WARS!
  • Android invading the game console market – I really don’t know what to expect of this other than that an open source alternative in the console market seems like a good idea (see: Ouya, Game Stick and most recently Shield). This also brings console programming one step closer to my line of work.
  • Facebook doesn’t turn evil and sell my life to the highest bidder – I must believe this or I couldn’t keep using Facebook. I try and fool myself for another year.
  • Perl … please come back! (OK, Perl never left, but it could benefit from more popularity in my opinion)

Word-problem

Idag hade jag väldigt stora och konstiga problem med Word. Till synes slumpmässigt gav den mig ett felmeddelande om “slut på minnet” och att jag genast måste spara mitt arbete så att det inte gick förlorat. Med cirka 3 Gb internminne och 280 Gb hårddisk ledigt så var det ett lite lustigt felmeddelande.

Efter många om och men har jag nu kommit fram till följande när man felsöker dylika konstigheter i Word:
Steg 1: Radera normal.dot och starta utan några inställningar.
Steg 2: Skapa en ny användarprofil på datorn och starta Word i denna nya “rena” profil.

Steg 3: Bränn datorn på ett bål under en ritual för att fördriva de onda andarna ur datorn

Sån tur var löste det sig i steg nummer 2.

ProgramData på Windows 2008 R2

Varför varför varför är katalogen ProgramData dold i Windows 2008 R2? Lär det vara någon annan än systemadministratörer som är inne och rotar i en sådan server? Vad hjälper det att dölja katalogen? Det ställer bara till bekymmer att man alltid måste lära sig att skriva in sökvägen c:ProgramData varje gång man vill till katalogen istället för att bara klicka sig fram. Andra kataloger såsom “Program Files” och “Windows” får man gladeligen klicka sig fram till även om jag tycker att dessa borde vara mindre åtkomliga än ProgramData.

Någon som kan ge mig en bra förklaring på varför ProgramData är dold?

Ny Explorer – Nytt gränssnitt

När jag studerade på universitetet så kommer jag ihåg hur vi läste om Microsoft och hur de skröt om sina användaranalyser. De hade till och med haft en utredning om från vilken vinkel en ikon skulle kasta skugga för att vara som mest “användarvänlig”.

Min fråga är, var tog den avdelningen vägen!? I varje ny version av någon produkt från Microsoft de senaste åren har de vänt upp och ner på sitt eget gränssnitt. Microsoft Office 2007 fick en total makeover. Windows Vista (eller ska jag säga Windows 7 eftersom ingen körde Visa?) möblerade om ordentligt i filhanteringen. Nu kom nyligen Internet Explorer 9 och visst har Microsoft lyckats med att förvirra även där.

En så pass “enkel” sak som att ladda hem en fil. Denna funktion har fungerat i stort sätt oförändrat i Internet Explorer sedan version 4. I senaste versionen av Internet Explorer så kommer denna dialog inte upp som vanligt utan lägger sig istället som en liten informationsruta längst ner i Internet Explorer. Vilken användarvänlighetsexpert kom på detta? Jag kan inte komma på någon fördel med att “gömma” den längst ner i bilden?

En av de återkommande anledningarna jag hört för att använda Microsofts programvara är att “användarna känner igen sig”. Nu har snart Microsoft sänk sig själva med detta.

Missuppfatta mig inte nu, Microsofts produkter är bra men de är inte oersättliga. Om de fortsätter med att missgynna sina trogna användare så kommer de nog att tappa i sin för närvarande dominerande marknadsställning.

PHP Serialize vs Database normalization

I’ve recently started developing plugins for WordPress in PHP. Being an old school Perl programmer PHP comes very easy and MySQL is still same old MySQL. PHP don’t have many advantages over Perl in general except one very good one: simplicity. I have always tried to write simple code, not simple in the sense that it doesn’t accomplish complex tasks rather in the sense that while being a huge and complex system it is still built with easy to understand blocks of code. With that being said, there are a few shortcuts I rather not take.

The reason I write this is that in all the PHP applications and PHP documentation I’ve come across regarding serialize() nobody ever mentions database normalization.

PHP Serialize

I found the serialize() function in PHP quite useful, it takes a datastructure and creates a string representation of that structure. This string can later be use with unserialize() to return it to the old structure. An example:

$fruits = array (
"fruits"  => array("a" => "orange", "b" => "banana"),
"numbers" => array(1, 2, 3),
);

echo print_r($fruits);

The above code creates an array and prints the result. The output of the above will be:

Array
(
    [fruits] => Array
        (
            [a] => orange
            [b] => banana
        )

    [numbers] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )
)

Now if you use serialize on this object the following would happen:

$fruits = serialize($fruits);

echo print_r($fruits);

Output:

1a:2:{s:6:"fruits";a:2:{s:1:"a";s:6:"orange";s:1:"b";s:6:"banana";}s:7:"numbers";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}1Array

A long line of strange numbers, just what the programmer wanted! This data is perfect for transfering or saving the state of a data structure for later use. Calling unserialize() on the above string would return it to the same array that we first had.

Database Design

Most applications use a relational database for storing information. A relational database stores all data in tables of rows and columns (or relations of tuples and attributes if you use the original non-SQL names). To make a database work efficiently the design of those tables, rows and columns are pivotal. Any student of database design have probably been forced to read all of the different levels of database normalization. The normalization process, invented by Edgar F. Codd, involves searching for inefficient database design and correcting it.

The very first rule of database normalization called the first normal form (1NF) stipulates that “the table is a faithful representation of a relation and that it is free of repeating groups.” [wikipedia]. This means that there should be no duplicate rows and no column should contain multiple values.

Serialization meets 1NF

What happens if you insert the above serialized data into a column of a row in a database? Well put shortly you get a stored datastructure that can be easily accessed by your application by calling it with the keys for that particular row. The table would probably look something like this:

ArrayTable
key value
1 1a:2:{s:6:”fruits”;a:2:{s:1:”a”;s:6:”orange”;s:1:”b”;s:6:”banana”;}s:7:”numbers”;a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}1Array
2 1a:2:{s:6:”fruits”;a:2:{s:1:”a”;s:6:”apples”;s:1:”b”;s:6:”banana”;}s:7:”numbers”;a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}1Array

As long as you will never ever search for anything inside the value field this is all good and well (but still goes against my better teachings of database normalization). Take for example the problem of locating all stuctures containing apples or even worse something as simple as ordering the rows by fruit! The structure makes such “simple” tasks very hard.

The use of serialization to encode values into the database might be very tempting. It makes saving complex structures easy without having to worry about database design. Saving data in serialized form is however very inefficient from a database design standpoint, the data should have been stored in separate tables reflecting their internal structure.

As I said in the beginning simplicity is the highest virtue of programming for me, serialize is a simple neat solution for a small problem. What should be remembered though is that serialize is not a swizz army knife that should be used for all the database storage. If you ever think that you will need to search through or handle the information stored, do youself a favour and make it a proper table from the start. In the long run making those tables will be easier than later having to convert all those structures and complex code handling them.

The fall of free web services?

In recent news YouTube have reported they are removing copyrighted music from their service, Last.fm are starting to charge for their on-line radio station and FileFront just reported they have decided to close their servers. Is it the beginning of the end of the legally free on-line services we see? Granted illegal(?) services like thepiratebay.com and similar networks still flourish despite being subject of a legal action in Sweden. With the recession of the world economy these services have a hard time to find investors that have money left to spend. Many times I’ve though to myself how these business can ever make money being almost totally free. Is the user demographics and associated commercial a high enough source of income to fund the large systems needed to host these popular services?

Someone once said that while we are all on the Internet today they prediceted that in the future we will be part of different sub-networks with login and identifications. The main infrastructure of the Internet will simply be left as an “illegal wasteland” of the digital era in which you only move about with caution.  This makes me think what if we are at the turning point right now? With the free services on decline this might be the time that more traditional business models starts to act on the Internet. Services like Spotify is an example of what I mean. A service that uses the Internet as infrastructure but is charges for access where you are no longer an anonymous user.

Last year I posted about Jeff Bezoz talking about the future of the Internet on TED. This talk is several years old and highlights the enormous potential for invention on a new medium like the Internet. Today we have alot of new technology based on the Internet as a service, his pioneering talk turned out to be sign of things to come. Today we have much higher ground to build business on the Internet from and with the well funded free services going down there should be much potential new business oppertunities.

Twenty years ago the Internet was mostly for Universities. Ten years ago the dotcom-boom came and passed. Today we stand on top of all the technology and business knowledge of the Internet and there simply have to be alot of oppertunities.

Linux as home desktop, why not?

Linux is a free stable and resourcefull operating system yet to prove it’s full potential as a desktop operating system. While the greater part of the market is still Windows based the introduction of the UMPC (Ultra Mobile PC) have turned things upside down for Microsoft. Instead of buying very expensive hardware and install Vista many choose to buy less hardware and get either a Linux distribution or (even worse?) a several years old Windows XP system.  Microsoft was not prepared for this turn of events and have been forced to extend the lifespan of their XP-series which they where planning to phase out in favour of Vista.

This change in consumer behaviour to “not buy the best” anymore, have favoured Linux who with their versatile distributions have a stable modern operating system for just about any new or old hardware out there. My five year old laptop which where being exhausted by running Windows XP in combination with a virus tool runs perfectly smooth with the Ubuntu distribution (well I could theoritically run XP without a virus tool but seeing I travel alot with it that would just be beging for it to crash with all the unsecure networks I connect to).

With the UMPC Linux have gained a small part of the desktop market, but what is holding it back to take an even larger part? Is it the hardware support? Well granted some hardware vendors only supply drivers for Windows systems, but most hardware have at least decent support in Linux. Is it Internet related software? Hardly, Firefox is arguably better than the current version of Internet Explorer (granted Firefox is available on both systems) and also e-mail clients like Thunderbird are just as easy as Outlook Express to setup. Are the office tools sub standard? Open Office and GIMP make a very good competition for their commercial counterparts Microsoft Office and Adobe Photoshop, so except for prior experience in one system there really is no major difference for the home desktop user there. Is it the ease of use? Again, trying out Vista will be just as confusing for a XP user as it would be switching to Ubuntu. Most things have changed places anyway. Also the update feature in Ubuntu is much better than Windows update in my opinion. The ability to upgrade all installed applications through a common interface is very easy to handle for an inexperienced user.

There is one single left over reason that I see quoted time and time again: “I use Windows XP becuase I want to play games”.

Is there any major reason to hold back? Well… I have to say yes. There is one single left over reason that I see quoted time and time again: “I use Windows XP becuase I want to play games”. Almost no PC game whatsoever have Linux-support. There are, often technical, HOWTOs on how to get this or that game running under Linux but it usually involves pages of instructions. If we have everything else, surely games can’t make a major difference for a desktop operating system? Again, I’d have to say yes it does. Why? Simple, the kid in the family who usually is the computer wiz is the one who helps all his family and friends install their computers. If this kid runs XP back home to play computer games on he will install XP on all other machines, because this operating system he knows and can “support”. Furthermore if all else being equal, if there is one major drawback in a single area, whoever wins that will probably win the battle.

Windows XP have DirectX which is supported and used by I would dare say every game manufacturer for the PC market. Linux have no equivalent interface. Linux have “emulated” Windows and even tried to port games individually but the major all-supported interface is not there. Game companys can’t make a release for every distribution out there (since many are so different it would be required), but if a common interface for all distributions could be established that would increase the chances of Linux game releases.

In my opinion, this is one of the major reasons Linux is still held back as a desktop operating system. Far from the only reason, but a major one.