Over The Air – 48 Hours of Mobile Development

Feb 9
Posted on February 9, 2008 19:29 in Events

During the last Geek Dinner, Ian was passing around some flyers for an interesting event called “Over The Air – 24 Hours of Mobile Development”. From what I understand, it is going to be some kind of Hackday for mobile development, which is bound to be cool.

Over The Air

The date is the 4th and 5th of April (yes, with a Barcamp-like overnight) and the location is Imperial College. I finally have a decent mobile platform with my recently bought iPhone, and therefore I think I might go to this event. Are you joining me?

hAvatar FTW!

Feb 9
Posted on February 9, 2008 19:02 in Problems & Solutions, Projects

hAvatar Example

If you ever read the comments here, you might have noticed the avatars that show up with some people. These are not Gravatars or MyBlogLog avatars, no they are avatars personally hosted by those commenters on their own site. What drives this mechanism? The plugin is called hAvatar and the technology involves Microformats.

hAvatar is build by Alper and what it does is simple: it fetches the URL you use in the comment (either your OpenID or other URL) and sees if you have a hCard on that page. A hCard is a Microformat and is nothing more than some extra semantics added to your page that represents you business-card. In the very literal sense, a hCard is the Microformat equivalent of the vCard format.

Now, if your hCard has a photo attached to it, the hAvatar plugin will take that URL, wrap it in a tag and return it to the template. All you then need to do is call the hAvatar call somewhere in your comments loop, and boom you have an open-standards-defined avatar system on your blog!

Download it here and take a look at my front page for an example of an hCard with an attached photo. People using the plugin at the moment include MissGeeky, TheBleacher, and obviously Alper and I.

Geek Dinner with Dr. Richard Clayton [Wrap-up]

Feb 8
Posted on February 8, 2008 23:50 in Events

So my first Geek Dinner is a wrap, and although I got a lot of people telling me they really liked it, I still think some things need to go better next time. First off, we didn’t get the dinning area in the venue, but the rather warm attic room instead. It was “ok” for this time as we didn’t have that many people but next time I will make sure they understand what room I want. Then there was the food that wasn’t ordered, even though I gave them the number of guests 2 days before. So, we ended up with a weird selection of food, including some rather tasteless pathe. Next time we will have some more variety in the food.

Finally, it was a bit unfortunate that London is plagued by the flue, disabling at least 4 guests from coming. Combine that with some people only noticing the event a day before the date, and you end up with about 20 people instead of maybe 30+.

Geek Dinner with Dr Richard Clayton

In the end though, the Geek Dinner was a success, with a very interesting talk by Dr Clayton. Ian was able to film the talk (part 1, 2, 3, 4), although he had to switch batteries twice in his camera. Guy West took a audio recording, and I took some photos but was to distracted to take any really good ones. I am already thinking of the next guest to have on, because things an only go better from here. See you next time?

The Invisible Shield for iPhone

Feb 7
Posted on February 7, 2008 16:18 in Hardware, Problems & Solutions

I used to have this crystal clear case for my iPhone, which protected all but the screen and looked incredibly bulky. Still, I thought it necessary as I didn’t want scratches on my precious iPhone. The problem with almost all enclosures though, is that they result to the iPhone not fitting into any accessories (e.g. the dock). As I got tired of removing the case every time I wanted to put my iPhone in any dock, I decided to get something a bit less visible. In comes the Invisible Shield.

The Invisible Shield is pretty cheap ($24.95 and free shipping worldwide), covers the entire phone, takes a moment to apply, and seriously rocks. I can now use my iPhone as if it was a bare naked iPhone, without being afraid of damaging it with my keys or other sharp objects. Below are the photos.

My Bookmarks For February 1st – February 6th

Feb 7
Posted on February 7, 2008 5:15 in Links

Site5 Backup Script Revised

Feb 5
Posted on February 5, 2008 1:40 in Problems & Solutions, Software, Technology

About 2 weeks ago I wrote about a little script I used to backup some of my WordPress installs automatically to Subversion. A serious problem arose with this method though, and the main reason was this line:


svn add --force *

I used this line to automatically add any new files to the repository. This was handy because often new files are created (e.g. attachments for posts in a blog), as you wouldn’t want to do this by hand every time.

This code doesn’t keep in mind deletes though. If you delete a plugin in your WordPress, SVN will miss it and start complaining. Additionally the method above overwrites SVN:Ignore settings, which means you can’t ignore certain files (e.g. cache files that change constantly).

So instead I decided to come up with a new solution: see what files are new and what are removed, and perform “svn add” and “svn remove” actions on those files. I used a bit of code from this blog to come up with a fairly good solution.

And replace it with:


svnstatus=$(svn status)
added=$(printf "$svnstatus" | sed -n 's/^[A?] *\(.*\)/\1/p')
removed=$(printf "$svnstatus" | sed -n 's/^! *\(.*\)/\1/p')

What this does is run the “svn status” command that will return a text output of all the modified files (starting with a ‘M’), added files (starting with a ‘?’) and deleted files (starting with a ‘!’). The next 2 lines do a regex to figure out the file names of the new and missing files.

Now add the following two pieces of code after the previous bit of code (and before the svn commit).


if [ "x$added" != "x" ]
then
echo adding "$added" to repository
svn add $added
fi


if [ "x$removed" != "x" ]
then
echo removing "$removed" to repository
svn remove $removed
fi

Both pieces of code use the previously regex calculated paramaters and sees if there are any files to be added or deleted. In then runs the “svn add X” and “svn add Y” commands to update the svn status. After this, a svn commit will include all new files and remove all old files from the repository. This does not remove the backup, so you always go back in time!

The “echo” commands used in these lines of code will show up on the command line, and if your cron job forwards output to an email address this can be used to check if the cron job is working correctly. If it becomes annoying, just remove them.