Thursday, February 16, 2012

How Apple will beat Facebook

Looking at the extension of iMessage to the desktop made me think about how Apple can take on Facebook and win.  Lets see what Facebook have over Apple technically...

  1. Multiple people in one conversation
  2. Broadcast conversations with 'followers'
Now Apple have already integrated Twitter into the iPhone but lets assume that long term the folks from Cupertino want total control.  What do they need to do?
  1. Add a 'message thread' function to iMessage so its not just a stream between two people
  2. Add the ability to talk in groups
  3. Add the ability to broadcast status updates
Applications can compete easily by having some form of multiplayer iCloud sync, or in the same way they already do via 3rd party servers.  What more could Apple do however than Facebook?
  1. Integrate the status update piece into Contacts so before you call you see the status and can see the recent messages
  2. Integrate the group chat dimension by having 'groups' in Contacts (umm almost Circle like)
  3. Provide multi-participant Facetime to switch from iMessage to group comms
The point here is that technically Facebook don't have much that Apple couldn't make standard Mac OS X and more importantly iOS functionality.  Indeed much of this would be a welcomed integrated upgrade to those things (rather than a clear market grab like Google+) so people would 'naturally' start using these facilities as they are on their phone/desktop.  This would increase the link to Apple products in those communities (much as Blackberry used to see).

An added advantage of Apple's approach is that it can remove the view of a 'big central server' and instead create a more federated view of inclusion than Facebook.  This is liable to help increase people's engagement levels and unlike Facebook Apple doesn't need to drive revenue via advertising or selling people, it wants to drive that via more people on its platform as those people hand over real hard cash.

Facebook's big risk is that its network ceases to be the cool and only place to network and that other social based approaches take off.  Apple are ideally placed in the consumer space and have the platform control mentality to drive this.  iMessage is only the start of the evolution, the question is just how much engagement does Apple want to have?



Monday, February 13, 2012

Why Broadband, Apps and Moore's law will beat Server based HTML 5

The browser is about to have its day... Apps are going to win.  Now these Apps could be like the Chrome store pieces and developed in HTML5 but with local storage and offline access added but they will fundamentally be local things.  Why?
  1. Moore's Law isn't going away any time soon. 
    1.  In a couple of years we will have Smartphones with quad or even octo cores, 8GB of main RAM and 256 GB of storage... and you are seriously just using that as a browser?
    2. Your TV will have that as well
    3. Your Fridge will be a bit dumber, say dual core, 8GB storage, 100MB RAM... its a ruddy Fridge
  2. Connections to the home will be a normal thing
    1. Mobile phone companies will start offering 'VPN to the home' as a standard offering so you can unify your control of internet access
    2. This doesn't require a 'home server' just a VPN link
    3. Your home devices will then be accessible directly or via the cloud
    4. Current 'TV via 3G' offers will be linked back to your home connection
  3. Rich Clients beat thin clients when there is a choice
    1. Look at the App Stores, look at games...
  4. The network is never something to bet on being 'always' there
    1. Do you want a Sat Nav that fails due to network connections?
    2. Do you want a Fridge that turns off because it can't download the right temperature for fish?
  5. The speed of light isn't just a good idea... its the law.
    1. Ping lag is an issue of immediacy.  Even if processing takes zero time there is still 100ms+ of ping-lag to contend with and server lag, etc, etc. 

This isn't a retro-grade step its actually a great challenge as what it means is that federation is going to increase.  Social centralisers like Twitter and Facebook are liable to start facing competition from Social aggregators which work on federated information served from your devices via your home network.  Cloud providers will remain focused on functionality and capacity and the blurring of the cloud between the physical and the virtual will be complete, you won't even know if your TV is running locally or via the cloud... except when it borks... which is why in reality it will run locally.

HTML5 a great technology but for it to win it needs everyone to sign up for 'open' on all devices, this includes TVs, Mobiles, tablets and motor cars.  Applications are so much the 'thing' that Google are even promoting applications that can be downloaded and run from Chrome, thus meaning that Chrome isn't really a browser anymore but instead is a hosting platform for applications.

Server-side HTML has had its day, the only question now is whether the industry will unite behind a single 'open' client-side approach for applications or whether every platform will have its own approach.  Apple's current success and the Android marketplace seem to indicate the later.

Server-side HTML - 1991 to 2015.

Why I rewrite rather than re-factor

Refactoring is one of those terms in IT that gets bandied about as a good thing.  Refactoring is meant to be the small incremental cleaning up of code to restructure it while leaving it functionally the same(1).  Some folks say that re-writing is different as it changes this functional contract.  What happens in the field however is different...

Refactoring tends to be done in small chunks and done incrementally around a specific area, for instance a single function or class.  The refactoring tries to 'evolve' the code to make it better and does have some good theory behind it, but regrettably in the field I tend to see refactoring creating an incrementally more complex mess as parts are 'optimised' while the whole collapses.  Refactoring in the field is also mostly done when you've got new functionality, so the idea of functional equivalence goes out the window its now just about refactoring as you develop a new requirement which means that the new requirement skews the refactoring.

This reality of refactoring in the field means that I often come across code that has gone through several refactors and each was tinged by the mentality of the developer undertaking a specific new piece of functionality, the refactors therefore are not making the code better but instead making it better to develop that one specific requirement.

For this reason I'm actually a big fan of re-writing and, whisper it quietly, I tend to find its quicker and produces better code, especially from a maintenance perspective.  Now I could argue what I do is refactoring as I'm always rather anal around getting interface designs right and they tend to be rather stable as I put quite a bit of time into them.  The reality though is that the body is completely changed behind the facade.

Re-writing works because I now know what I didn't when I first planned the internals.  I know the additional requirements that I've received and the new information classes that I now must operate on.  Recently I had a piece of code where I had spent a couple of 'refactors' making it 'better' and the code was a bit cleaner and more manageable.   I then came across a bug which was proving rather hard to track (Objective C how I loathe you) and some new functionality I wanted to develop was adding complexity into the code... so it was re-write time.

About 60  minutes later there were 120 lines of code (SLOC) where previously there had been 300+, this clean down had removed the bug (which was to do, as ever, with memory allocation) and added in the new functionality.  The new code had been quick to write as I now understood much better what the end-goal was thanks to new requirements through a few iterations and I'd a much better grasp on how all of the different classes needed to engage.

Functionally my class interface hadn't changed and the calling classes didn't need to change but its hard to claim what I did was a simple refactor as I trashed every single line of code and re-wrote from scratch based on the requirements & design.

Refactoring has become a short cut for 'don't do it well first time' and the reality of the field does not match the theory in the books.  Too often the phrase is used to hide bad code, badly re-structured (and I'll admit that my first pass was in retrospect just that as I didn't know quite how Objective C and iOS worked).

Its time to come clean:

Sometimes its better and quicker to re-write than keep up the facade of 'refactoring'.

Technorati Tags: ,

Friday, January 27, 2012

Controlling what kids access - VPN to the Home - the next big thing in Mobile security

I've got kids, currently they are under the age where they get Smartphones and unfettered internet access but such a day is coming.  Now at home I can set it up so on the WiFi there is a proxy and all content has to be routed via that proxy or it doesn't go out and I can lock down the proxy so they can't go where I don't want.

However on a Smartphone they get good internet access without me being in control.

Bugger.

Then I got my new internet connection from BT (VDSL, 40 down, 10 up) and so I'm putting a VPN in so when I'm abroad I can still do back-ups etc without having to lug disks around.  Then I realised that I could set it up so my mobile phone used the VPN as well, which means iTunes backup and sync can be done as well.... double result.

This then made me think of how if you combine the VPN with a proxy that you can then have a controlled connection at all times.  All you need is the ability to add restrictions to the device which force 'always use VPN', something that isn't supported today, and prevent the VPN connection identifier from being changed.  This has two key usage scenarios:

  1. For Enterprises it means mobile device internet access can be controlled
  2. For families it means being able to control what your kids access... until they are around a friends or buy their own device
Its the latter that interests me at home, obviously, as I do think as a parent I have a responsibility to control what my kids access and to ensure that I can track things and keep them safe.  This isn't about being over protective, I wouldn't let them wander the streets on their own or take a train to London on their own, and the internet can be just, if not more, dangerous than those things.

With the rise of high bandwidth upstream connections this sort of thing becomes completely feasible, all it needs now is the mobile phone manufacturers to add the capabilities into the OS in the same way as they add things like Internet blocks or other application blocks today.

High-speed uplink + VPN + Mobile = Personal control of your own internet connection... with the added benefit of NEVER being unencrypted on a public WiFi connection. 

Wednesday, January 18, 2012

IT going backwards - Objective C is 90s retro

I've ranted quite regularly on how Enterprise IT just hasn't really developed in the last 5 years and my personal task for 2012... learning Objective C and programming for iOS has taken my disbelief to another level. Back in 2008 I learnt Python and for me it sucked. Its 'advantage' over scripting languages of the 80s and 90s was minimal and it had the most hated (for me) of things... indent sensitive code. Objective C however really has stepped it up a level.

I remember learning Ada, C and Eiffel (along with bits of LISP, Prolog, Assembler, etc) and most of all I remember being confused as to why people like coding in languages like C, where the syntax is terse bordering on emo, over languages like Ada where even non experts can have a crack. Through my career people have claimed the stupid 'less characters = language efficiency' which again matches up by saying that Martin Luther King was a crap communicator while a grunting teenager is much more efficient.

But all of this couldn't prepare me for the horror that is Objective C. SIGFAULTS in 2012? Seriously? Have years and years of exception handling been ignored? No even better than that... Objective C has exceptions but you are discouraged from using them, yup they are there but are 'resource intensive' so you shouldn't use them.

Second off we've got the wonder of memory management again, although now with 'ARC' it actually does some garbage collection, yup folks its 2012 and Apple have just caught up with the mid-90s.

All of this is annoying, and rubbish, but that would be nothing if the language had a nice syntax and logical way of working... but Objective C is like people have looked at Java, C, C++ and then sat down and though 'how could we make this really suck?'.  Yes its the same old .h/.c (or .m in this case) combination of header and code but just basic things like function calls are made excessively silly.  No simple .(, ) for Objective C... well not always, sometimes and you can do it but not normally... ahh consistency avoidance always a great way to have sucky code.  No in Objective C you call a function like this
[instance method]:param1 param2:param2
This means you end up with wonderful code that looks like
[[[eventHistory getEventAt:location date:date] calculateDistance:newLocation].doubleValue
Notice that '.doubleValue'?  Yup when using NSNumber (object for doubles) you use the old '.' notation. Perfect eh?

Then we have XCode, an IDE that seems to crash if you do anything it doesn't expect rather than a warning saying 'Fail: you didn't mean to do that'.  Some bits are nice, like some of the code generation and some of the bits, like refactoring, are pretty much up to Java IDE standards from 2001/2002.

The layout model in XCode is okay, with some nicer bits around chaining screens but seriously is it that hard to implement XmForm?  With the multiple display layouts that you get with mobile devices it really would be a cracking layout manager to have.

Then we have the iOS simulator, its great, except if you want to simulate locations that Apple hasn't thought of... the 'accuracy' if you use custom locations (for instance if you want to test something using European locations) is 150,000m... or to put it another way... a level that every decent piece of code should ignore.    Application development speed wise I'd clearly be faster in Java, but as a new language I'd say that Objective-C ranks behind C++ in terms of 'complexity' to learn and ranks significantly behind both C and C++ in terms of language efficiency.

But that said the example code pieces are good and the online manuals are good as well and I knocked up the second stage of my application on a flight across the Atlantic.  Basically however it feels like using C++/Motif with Emacs and the TeleUSE UI builder.  Its 2012, shouldn't it feel like we've progressed?  What it really feels like is some sort of retro homage to the 90s wrapped in a shiny and expensive new package.

From now on I'm only coding for iOS while listening to an iPhone playlist 'Songs of the 90s', it helps get my mind in the iOS Zone.

Technorati Tags: ,

Monday, January 16, 2012

iPads on planes during takeoff? Hell I'd like to use it in the airport!

People have been asking for iPads, and Kindles, to be used during takeoff and landing (like Pilots can) but for me that isn't a massive deal, yes I'd like to read my online Economist from the iPad when I'm travelling and sure it can be a bit of a pain to have to use old style paper... but I've got a bigger gripe.

The CBP (Customers and Border Protection) and their mental policies at immigration.  Now putting aside the normal 'welcome to America' of 1 bloke for the Rest of the World and 15 for the 20 Americans on the flight, or the ridiculous number of times my passport has to be checked in the UK (THREE TIMES! on this trip).  Or the questions that sometimes border on the clinically insane.  No my complaint is simple.

I use TripIt for my travel, its a great service, but the reality is that for the last 10 years I've not printed out a hotel reservation, for two reasons

  1. I know where the hotel is
  2. Its on email
Repeatedly on the last few trips to the States its not been enough to put 'JW Marriot, Miami, FL' or similar, nope they want the street address and knowing its 'on Brickell' isn't enough.  So on each occasion I've done the same thing, pulled out my mobile and been met with...
You can't use that here, it needs to be turned off
What about the iPad I enquire?  Nope that is banned as well.  So here we are at an impasse, its 2011 and 2012 and thanks to the wonder of technology that has existed for the whole 21st Century (and a bit before) I have access to my reservation details on a mobile device without having to print them off. Amazing eh?  But to the CBP this is a clear and present threat to the United States.

I've been asked, when coming in with my family, to show a paper copy of the hotel booking to 'prove' we have a reservation... seriously?  In the modern era of printers and word processors its considered a security check to have an EMAIL reservation printed out... rather than actually showing the email?

I saw a guy at the final 'hand in the blue customers paper' check told the same thing on a phone that was just held in his hand, not being used mind, just held.  The international arrival area is clearly not somewhere that phoning for a taxi or telling people you've arrived is a massive security risk.

Yes this is a rant, but seriously its 2012 and most people are shifting away from paper onto mobile devices, the CBP should be encouraging this rather than dissuading it.  How about this, how about having a CBP approved application which you load all these details onto, this then generates a QR Code or similar, this gets scanned at the immigration piece and they get not only the hotel but also the details on your return flight, go a stage further and have the questionnaire on the application and suddenly you've got all the information you need with no OCR processes and no lost data (and reduced risk of ID fraud/theft).

Come on CBP, its 2012, get with the program and face the reality of a mobile world.  Let people have mobile phones (you can even say 'no calls at the desk' like they do in the UK) and maybe even save some time and money, and identifying risk better, by automating the paper process.

 



Technorati Tags: ,