Archive for December, 2008

* Real Food

Posted on December 31st, 2008 by Dave Johnson. Filed under Food.


I have been reading In Defense of Food by Michael Pollan lately and it is fascinating to hear the recent history of food politics. Pollan’s tag line from In Defense of Food is to “eat food, not too much, mostly plants” which I certainly agree with. He also focuses on the idea of eating *real* food, by which he means eating food that has not been fortified with nutrients or vitamins or has had the natural fats removed from it.

More to the point, last weekend the family had eggs for breakfast and this is what they looked like:

We had purchased some free range organic eggs from the store and also had some from the farm down the road, which they market as just eggs and give them to you in reused packaging from the ones you get from the store. Can you guess which one is the “free range organic” one?

Tags: , , , , , .



* Rich Mobile Applications

Posted on December 16th, 2008 by Dave Johnson. Filed under AJAX, phonegap.


Like the MiniDisc or the Atari Jaguar CD, web applications, rich internet applications to be specific, are a thing of the past. Yes a bold statement to be sure. Well maybe not a thing of the past but certainly in their current form.

I think that @PanMan summed it up best when he tweeted:

“Phonegap is definitely one of the most exiting developments for mobile developers these days…“

Yes the future is PhoneGap and the future is Rich Mobile Applications - RMAs for short. They can run on the phone native or as a web page but we of course think that being able to build applications using JavaScript and HTML rather than Objective-C and still having access to all the fun phone APIs like geolocation, mapping, calling / SMSing people, bluetooth etc is a very nice thing indeed.

Tags: , , .



* Asymmetric Follow In Pictures

Posted on December 12th, 2008 by Dave Johnson. Filed under Web2.0.


With James as my inspiration, I have been thinking more about asymmetric follow and how it applies to the web. I decided to make up some simple pictures to describe my thoughts on it.

Movie and music stars are really the definition of asymmetric follow. You buy their records, watch their movies, send in fan mail but you will probably never be acknowledged by the star nor will what you have communicated probably even be read by them or impact them. All follow no follow back. Purely asymmetrical. The stars don’t follow anyone else and everyone follows them. The number of people involved in these systems is very large - i.e. one star might have millions of fans.

Radio also has a huge audience and most people just sit there and listen so the right side is pretty high again. On the other hand some shows do allow people to call in or often talk to notable people in the field so there is, though relatively small, some follow back going on.

Email of course has become an important communication medium. With email you can receive it from anyone from close family or peers to random people and spammers. This picture I am least confident about but certainly some people get lots of unsolicited email while also having many people that they would consider to be “following”.

Finally, we have Twitter or other Web 2.0 social networks (like dopplr that James posted data from) where “friending” is not reciprocal by design. With things like Twitter we are approaching something symmetrical despite the fact that reciprocity is not enforced and I think there are few reasons for this that JP also touched on. The main idea being that Twitter reduces the barrier for people to engage in conversations.

Twitter actually increases the symmetry of traditional asymmetrical follow primarily by the fact that it is a smaller community than pop-culture at large and therefore the signal to noise ratio is considerably higher in general. This is helped further by the fact that interactions have to, by design, be succinct. At 140 characters there is only so much you can say and it is easier for other people to comprehend. Twitter is also very temporal in that if you are not around to get them you are generally fine to ignore them unless they are replies or direct messages. Finally, Twitter is public which helps to keep people and their conversations honest.

Asymmetrical follow is clearly a prominent pattern across all media, and maybe something that is being reduced through tools like Twitter, are there other patterns that while prominant in more traditional forms of media are somehow reduced in a Web 2.0 world?

Tags: , , .



* BlackBerry PhoneGap Progress Report

Posted on December 6th, 2008 by Dave Johnson. Filed under phonegap.


BlackBerry PhoneGap
We had a PhoneGap sprint just over a week ago which was pretty successful for me and my BlackBerry ambitions as well as everyone else. Through that sprint and over the past week, despite some setbacks, I got the OS v4.5 installed on my phone and the simulator on my computer giving me access to a few new things but I was sad to find that a few other things were still sorely lacking that are pretty important for something like PhoneGap. Just so you know, OS v4.5 is the latest OS that will run on my Curve 8310 - 4.6 will run on the Bold, Pearl Flip and newer Curves while 4.7 works on the Storm. The two biggest gaffs by RIM are in the BlackBerry web browser for OS v4.5 where that the following rather important features are missing:

  1. You can’t pass function pointers to setTimeout.
  2. You can’t access DOM Nodes in any way shape or form (aside from form fields). So there is no getElementById or innerHTML on the resulting nodes. This make web application development a little bit difficult.
  3. There is no XMLHttpRequest object.
  4. While not really expected, there is no SQLite support
    anywhere on the phone as of yet, let alone the browser.

Anyhow, despite those setbacks on the v4.5 OS I did get the communication between the BlackBerry device and the web page all dialed now. Not only that but I have implemented the W3C geolocation API and am going to follow that same pattern for the other APIs. Check out the geolocation JavaScript interface as well as the platform specific implementation.

In the actual BlackBerry code there is lots of boiler plate stuff. The main hurdle was figuring what the best (or any) way to embed the browser in the application was and enable communication between JavaScript in the browser and the BlackBerry Java code. In the end I pretty much had to take the route of implementing the browser myself through the BrowserContentManager. This means that I have to implement lots of functionality, but it also means that I am in control of cookies and responsible for accepting them from JavaScript in the web page through the implementation of the browser fields RenderingApplication.eventOccurred method when the event type is EVENT_SET_HTTP_COOKIE and returning them to JavaScript by implementing the RenderingApplication.GetHTTPCookie method.

When the set cookie event occurs I parse out the cookies looking for one named bb_command and expect it to contain some JSON object (that is parsed with the J2ME port of a Java JSON lib) with a command property (like for opening maps or getting the GPS location) and some arguments (like points to plot on the map or how long to vibrate for). The case statement just looks like this:

switch (command)
{
  case 0:
    this._getLocation = true;
    this.startLocationUpdate();
    break;
  case 1:
    Invoke.invokeApplication(
      Invoke.APP_TYPE_MAPS,
      new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT,
      getLocationDocument(args))
    );
    break;
  case 2:
    Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA,
      new CameraArguments()
    );
    break;
  case 3:
    if (Alert.isVibrateSupported())
      Alert.startVibrate(getVibrateDuration(args));
    break;
  case 4:
    Invoke.invokeApplication(Invoke.APP_TYPE_PHONE,
      new PhoneArguments(PhoneArguments.ARG_CALL,
        getPhoneNumber(args)
      )
    );
    break;
  default:
}

where args is just a JSON string that the various methods like getPhoneNumber parse to get the args they want.

I will post some more specific code snippets like how to send text messages and so on very soon.

Tags: , , , , , , , , .



* What if GMail Shut Down Too?

Posted on December 2nd, 2008 by Dave Johnson. Filed under cloud.


With the recent demise of the micro blogging service Pownce, one has to wonder what happens to all their pownces (not sure what the equivalent of a tweet is in their world) and what if a tool that you actually depended on, like Twitter or GMail for example, were to shut down.

So the answer to the first question is that Pownce is letting you download all your pownces in some sort of format. I have not been able to get my data as of yet. That answer is pretty simple but it also begs the question of what will you do with that data. Competing micro blogging site Identi.ca has one idea and they are making an importer this week to get your pownces into Indenti.ca. This is a great move on their part of course since one can only assume they will get lots of new users this way.

Hot, nasty, bad ass data

Really what this comes down to is data. That brings to light a glaring hole in the shiny facade of Web 2.0, which is of course all about the data, and that hole is in the fact that sure you may technically own your data but if that latest Web 2.0 service goes away you are just stuck with a big text file that you may not even be able to do anything with - if that! Sure if Identi.ca were to go down then maybe Twitter would make an import feature (though I doubt they could scale for all those Identi.ca users that quickly and maybe Identi.ca can’t for Pownce?) or maybe you could take the Identi.ca code and deploy it yourself since it is after all open source - but in all seriousness who is going to do that? All you can really depend on is having a text file that you can grep to find that proudest of moments when Tim O’Reilly or similar linked to your blog post or something, which is now just a memory of the past.

Enough about micro blogging ’cause really who cares if your tweets or pownces are lost forever :P

What about other services that might go the way of the dodo in this recession? WordPress or, heaven forbid, GMail? When I tweeted that last night @sarahfelicity said

“@davejohnson don’t joke about such things!”

and I am sure many would agree.

I was probably a bit too flippant about the open source nature of Identi.ca in that WordPress is largeley the same, however, with WP you really do own your data (assuming you have downloaded the software and run it on your own server or someone does for you) as well as the hardware and software running your blog or website. You actually have access to the database storing your posts and comments and if your host were to go out of business you could find another one and migrate within 24 hours. I think that blogging software, maybe because it came out of the first dot com bubble, is a bit more safe or reliable than most Web 2.0 services because you can be in control of the data and, unlike Identi.ca, you can use that data without requiring the social networking effects of a micro blogging platform. That’s not to say it’s easy to convert a blog from WP to TypePad necessarily.

It’s about the data stupid

Finally, what happens if GMail goes down? For the most part, other than the usefulness of having a great online email provider, it simply doesn’t matter. You can access GMail through standards based protocols (POP and IMAP) and download all of your emails into your favourite desktop client where they can searched, replied to and so on. Your email is still useful if GMail goes away because it is all based on standards thus giving you the tools to reclaim your data. On the other hand your favourite whizzy Web 2.0 social networky application goes away, you are left in the cold.

I think this calls for new tools and protocols to help people take back real ownership of their data. Languages like Erlang and tools like CouchDB and Git seem particularly attractive.

The problem could get even worse when you start depending on companies like Amazon for all your cloud infrastructure. Amazon, like big banks, is not immune to changing economic conditions and moving to the cloud is not without a certain degree of risk. Amazon does a good job of minimizing that risk in EC2 by making those “boxes” as similar to what you get at any other host. Most Pownce users probably didn’t consider that risk when choosing that service nor others with Twitter.

I for one appreciate the fact that I can sleep easy knowing my email, despite being stored and used through an online web service, is safe and I have the ability to take it offline and use it whenever I want. Twitter not so much :)

Tags: , , , , , , .