Saturday, February 12, 2011

Nokia and I (A cautionary tale)

So today the long heralded rumour was confirmed and Nokia announced that over the next year or so it would be euthanising its ailing Symbian mobile platform. 
I've been following the ongoing saga of Nokia's slow fall from grace for some time, partially because I work for a company that develops mobile phone software (amongst other things) and partially because of my own experiences with Nokia over the years.

When I think back it seems like an impossibly long time ago that people marvelled at Nokia as kings of the user interface. I realised that looking through the history of my experiences with Nokia shows problems that started before the iPhone hit the market and are rooted in taking your consumers for granted.
 
Love At First Ring

My first Nokia was also my first ever mobile phone. I had just arrived at university and the phones in the halls of residence were painfully expensive as was the norm in the pre-ubiquitous mobile ownership days of the late 90's. 
I could barely afford the contract as it was, but when I saw the sleek and sexy lines of the 3210 I knew I had to have it. It stood out like a beacon amongst the lumpy grey boxes with external aerials that filled the shop. I never regretted the extra I had to pay for it. It served me for years running through several batteries and cases. The user interface was perfect; snappy and everything where you expected it to be. 
When it finally died I replaced it with a 3310 which was the same only better. I kept it until it died shunning such decadence as colour screens and polyphonic ringtones as the frivolous distractions they so clearly were.

The Finnish Rebellion

Some years down the line the company I worked for were bought by German engineering behemoth Siemens. As a result everyone had to hand in their corporate issue Nokia mobile phones and get a shiny new Siemens mobile phone. The backlash was huge. People flat out refused to to return their Nokias others went out and bought replacement Nokias with their own money. The clunky Teutonic user interface of the Siemens phones seemed stone age by comparison and besides every desk in the building featured the ubiquitous Nokia charger.

Smartphone Hell

Tempted by the prospect of a 2 (count 'em) megapixel camera I defected to a Sony Ericsson K750i for my personal phone. It had plenty of snazzy features, and it was a good phone, but it didn't have the battery life and snappy streamlined interface of my old 3310, or my corporate low end Nok. 

When I went with the good lady wife two replace her ailing phone I happened upon such a thing as a Nokia N73. This the man in the shop explained was a "smartphone". It could play video, retrieve my e-mails and even browse the internet and more than that it was made by Nokia the Finnish masters of user experience. I bought the phone and upgraded my subscription to take into account all the data I would soon be using.
The first thing I did when I got it home was try to listen to an MP3 except it didn't have a headphone jack. I had to buy an adapter which I promptly lost then gave up. The e-mail client flat out refused to pick up my GMail, It was too much bother to get video into a format it would play and the browser was a bad joke that I never managed to do anything useful with (I remind you I'm an engineer not an average punter).

As a professional geek I decided I would write some apps for it, but a quick look at the development environment told me it would be a nightmare.
To cap it all the phone would randomly crash, or switch its self off. I couldn't believe how one of my favourite tech companies Nokia could produce something so defective.
To give you an impression of how much I hated this phone, my wife banned the subject in our house so frequent were my tirades on its deficiencies. 
Maybe it was just a duff model. I asked around. A friend who shelled out for the even more expensive flagship N95 told me that when his contract expired he was planning to hit it with a hammer and then burn it in the garden. 

Running to Standstill 

When the iPhone was released in 2007 the world changed. I was surprised to discover that the iPhone 2G specs weren't a patch on my year old N73 (no 3G, worse camera, no flash, no SD card, no front facing camera), but the difference was that suddenly everything worked, e-mail and web browsing were a pleasure. 

A year down the line in 2008 and the press were full of tales of the forthcoming Nokia 5800 the new touchscreen device that would level the playing field. 
A perk of my current job is that I generally get to play with every high end phone on the market. When the 5800 arrived I decided to use it as my work phone. I lasted half an hour. The clunky resistive touch screen interface was so broken that I couldn't even make phone calls or write text messages effectively. 
Though each successive generation was heralded as the iPhone killer, four years after the release of the iPhone the current £430 N8 flagship is still years behind even the first gen Apple product in the UI stakes. 

How were these things even selling? I asked myself.

Backlash Begins
I started to understand what the answer might be when I went into town to look at the brand new Android phone the G1. I asked if I could try it and the guy in the shop said no. I asked how he expected to sell any. He said "Most people either know what they want from TV advertising, or else they buy what the sales assistant tells them to buy". When you couple this with the fact that most newspaper phone reviewers don't bother to test phones (they essentially republish bits of the press release and rate it according to the specs) and you can see how these pieces of junk get into the hands of a lot of people. 

The thing that seems to have passed Nokia by is that these phones are being sold to people not statistics. A two year contract is a very long time to be stuck with a device that you hate and by the end of that period you are going to be pretty pissed. When I traded my n73 for an Android phone I made a promise to myself that I wouldn't buy another Nokia mobile phone without very good reason and I don't doubt that there are millions of people who feel the same way. Perhaps this is what Strephen Elop means when he talks about Nokia loosing mindshare in the mobile market. 

When I have some time I'll give my thoughts on the Nokia / MS tie up, but now I need to go to bed.

Thursday, February 10, 2011

Android Project - Game Engines


In the comments to my previous post iPhone developer extraordinaire Chris suggested using a third party physics engine for my game. I don't know why I hadn't thought of this in the first place. For web development I wouldn't dream of starting a project without using a framework. After all the longer you spend writing loads of boilerplate code the less time you have to spend on the good stuff.

Chris suggested using the Box2D library which looks very good. As Android is a Java platform a Java library would be ideal and luckily some helpful chaps have ported the library and called it JBox2D. There are some very nice looking demos on the website and a helpful tutorial about getting it up and running on Android. I was slightly concerted when playing with the applets that there were a few freezes and stutters (My laptop is only a year old) and a quick search on the internets revealed that most  people were having problems with the Java garbage collector causing problems. 
Luckily all is not lost. Android is not a Java only environment thanks to something called the NDK (Which as far as I can gather is just Android's version of JNI) which allows you do drop meaty chunks of speedy C++ into your Java stew. This requires you to do a bit of work to wrap any C++ classes you want to use with a bit of Java.
AndEngine Logo

Luckily a bit more Googling revealed the AndEngine and libgdx a pair of free Android game frameworks. Both use OpenGL for graphics and rather conveniently integrate the Box2D library saving me the job of getting my hands dirty with NDK. Opinion seems to be that libgdx is faster and better documented while AndEngine is higher level and easier to get to grips with. I quite like the fact that libgdx offers the ability to compile into JOGL for desktop apps rather than having to continually build apks and test on the emulator. 

I'm still undecided between the number puzzle and the jumping frog game but either way I'm going to give a framework a go and see what it offers. 

Wednesday, February 09, 2011

Planning an Android Game Project

BOD.png
Back in 2008 when I wasn't feeling particularly engaged with my day job I wrote a Java game called Brick of Destiny. It was one of the most rewarding projects I've worked on and it inspired me to get a job where I could spend more time coding. Two and a bit years down the line and it occurred to me that since I've been a software developer for a living I haven't really done much in the way of coding outside of work, something which I intend to remedy by writing a game. 

I have a few objectives for the project:
  • Simple and self contained as I have a short attention span
  • This isn't an intellectual exercise I wan't to write something people will play
  • I don't want to write something there are a thousand versions of as someone with greater resources will probably have done it better so Pac Man or Space Invaders is out of the question unless I can give it a twist
  • I'm going to document the development process on my blog 
I have an Android phone and my Java is getting a little rusty so I'm going to write the game for Android as it's interesting to work within the constraints of a limited device. The Android Market also gives me the opportunity to get the game out to lots of people rather than the handful who played my last game.

I have the platform and the language so now all I need is an idea. I think a simple puzzle type game would be the easiest thing to implement as it can take place within a single screen and shouldn't require too much effort. 

I've tried to think back to games I enjoyed from the 8 bit and 16 bit eras for inspiration and so far I've had a few Ideas, but I don't have my heart set on any one thing yet.
So far my ideas include:

Stress
An implementation of the card game Stress. It's an interesting card game because it's real time so you don't play in turns which makes it more of an action title compared to your average card game. I was all set to get started with this until I realised that there is already a version of it on the Android market (This surprised me because it's an obscure enough game that Wikipedia doesn't know about it ). Having installed the existing game on my phone it's not the most impressive implementation so I'm pretty sure I could create something better. 

Jumping Based Platform Puzzle
My first computer was an Amstrad CPC 464 which came with a game called Roland In The Caves.
It was a really original if somewhat frustrating game in which you played as a flea trying to escape from a cave with the twist being that you could only move by jumping. I love physics based games and I think there is something very satisfying about games that involve objects moving with parabolic motion (For example Worms) 
The game I have in mind would be a series of puzzle rooms filled with obstacles that can only be overcome with precision jumping. I would also probably include some elements from Bill's Tomato Game which was an Amiga game I really enjoyed in which you had to place objects (springs, fans, etc)  to ensure the safe passage of a particularly squashy tomato through a level filled with hazards. 
I am quite taken with this idea, but it is definitely the most challenging game idea I have thought of and the Android Market is awash with high quality physics based puzzle games. 

Number Game 
Number based puzzles are always popular and it should be fairly easy to implement a single screen game. 
So far the best idea I have had is for a bejewelled style clear the balls from a grid type game using numbers rather than colours.
The objective would be to find lines of numbers within the grid which fulfilled certain criterion for example where the first two add up to the third, or where they are in ascending order. When these were found the numbers would explode and more numbers would fall into the grid. 
This is the front runner so far, but I need to think about the game mechanics a little more to make sure that it won't be trivial or impossible to play!

If anyone out there has a genius idea for a game but lacks the coding skills to bring it to life give me a shout also anyone who fancies doing some graphics for a game get in touch if you want to collaborate.

Hopefully I will have chosen an idea for my next post so there should be some more detailed design for the selected idea.

Friday, January 28, 2011

The (not particularly) dark secret of phone hacking

Between the News of the World's rather shady dealings with voice mail hacking and the amorphous web vigilante Anonymous leaping to the defence of Wikileaks there has been an enormous amount of talk of hacking in the press. From the tone of the press you would imagine these acts are being performed by a cabal of amoral genius hackers (If you were feeling saucy you might imagine them as Lisbeth Salander, but I've chosen the rather more wholesome Matthew Broderick) . After all much of the case has centred around Glenn Mulcaire a private detective hired for the task surely he must be some kind of master of these dark arts. 
Unfortunately the truth of the matter is really quite mundane. Most mobile networks allow you to access your voicemails from  numbers other than your own phone provided you have a PIN. The mobile phone networks in their wisdom enable this feature automatically even though most people don't use it, or even know it exists. Not only that, but unless you have explicitly changed it to something more secure it will be set to a default.  (If you are on Orange it's 1111, for O2 it's 8705, etc). If this has come as news to you then it's highly likely that anyone who knows your mobile phone number and can be bothered to Google the default PIN for your network could listen to your messages right now. 
It's so laughably simple to do that it astounds me that Clive Goodman needed to employ a PI to do it for him creating a paper trail that put him in jail. The real scandal is that no one in the media seems to be criticising the phone networks for giving everyone the same default password, or the government for failing to advise MPs on basic telephone security. 

So we've established that cell phone hacking is pretty simple, but bringing down Pay Pal that must take some kind of \Matrix style genius right?
Not so much. The attacks on companies refusing to deal with Wikileaks was a type of attack known as a Distributed Denial of Service attack or DDoS for short. The name sounds awfully complicated, but it's actually a basic as you can get and isn't really hacking at all. 
You might remember a little while back some hippy types got rather annoyed with Top Shop engaging in alleged tax avoidance and so decided to go and stand outside and cause a nuisance. 

A DDoS attack is simply the electronic equivalent. 
Lots of angry people connect to the Paypal site at the same moment until the servers that power the site are overwhelmed and can no longer do their job. Nothing is hacked and nothing is broken, but rather like Top Shop during the protest so many grumpy people are standing in the way that regular punters get turned away. You may have heard talk of sophisticated software called things like "Ion Cannon", but in reality a drinking bird pressing the refresh button on your web browser would have the same effect. It's no different to when you hear that a ticket website has crashed as a result of demand for the new Take That tour.
DDoS attacks are sometime carried out using hacked PCs by organised crime to do nefarious things like blackmail online casinos, but in this case it was simply a group of like minded individuals expressing their frustration with the online equivalent of a peaceful protest. 

The fear of the new means the Top Shop story gets reported as people expressing their democratic right to protest while the tone of the Wikileaks story ends up as evil hackers trying to bring about the end of society.

Tuesday, January 04, 2011

Kindle - First Impressions

You may have seen my previous post on my compulsion to buy a Kindle. Well quelle surprise I caved after getting to have a play with a family members Kindle over the holidays.
It arrived today and so I thought I would quickly post some first impressions before writing a full review when I've spent more time with it

Q: Are you ready for some unboxing porn?
A: Of course you are!

Apologies for the rubbish picture quality, but unfortunately though the Galaxy S is a great phone it has a rubbish camera (more of that in another post) 

It's brilliant that companies are focussing on creating a positive experience when you first come in to contact with a new shiny thing and I was really impressed with the excellent packaging. Minimal and understated, but really classy and well made at the same time. 
I was also impressed that the charger is a really nice looking unit and that power and data is supplied by a single Micro USB (Devices without standard connectors are my biggest gadget pet hate)

I can see why people have tried to rip the screen off believing it to be a dust cover because it looks so much like matt plastic. It took me a moment to realise that it was displaying a welcome message.

The Kindle feels light and easy to manage. I can imagine happily reading with it for hours (And after writing this I intend to). The screen is fantastic I haven't stopped being impressed with the magic effect of seemingly printed words changing before my eyes. It definitely fulfils Arthur C Clarke's third rule:  Any sufficiently advanced technology is indistinguishable from magic. The fact that when you buy a Kindle it comes pre-linked to your Amazon account is also brilliant because it allows you to dive straight in with nothing to get in your way. 

The overriding impression that you get when holding the Kindle is that it feels special in the way that Apple has been able to nail with it's recent products and the Galaxy Tab I was playing with earlier today really didn't.

My Kindle's first big outing is going to be on my four day business trip to Milan next week so I'll write up my experiences when I get back.

Ciao for now.