Skip to content
Jun 15 10

ipad: 2 weeks on

by Alex

It’s been just over 2 weeks now since the release of the IPad in Australia, so as (to use Steve Job’s words) an “early adopter”, I thought I’d share my experiences for others considering the purchase.

First impressions of the exterior were: screen was smaller then I imagined, and it was a little heavier then I expected too. Also, annoyingly (although not a surprise), before you can start using it, you need a computer with itunes installed to activate the device before it lets you do anything else. When you’re all activated you can begin playing:

The screen, whilst its a lot smaller than a standard laptop screen, when you start reading and/or watching video/viewing photos, you find its a completely perfect size. The clarity, brightness, and great colours it produces is second to nothing I’ve seen before. The touch screen is also very responsive, and is extremely smooth with navigating and dragging things around the panels, menus, etc.

The device is light enough to hold in one hand and type with the other, or alternatively rest it on your lap and touch type in landscape mode without it burning a hole through your flesh (unlike a laptop). The other really neat thing is the battery life – you’ll get a good 10 hours doing high intensive tasks like video or 3G web browsing, or an hour or so longer if simply reading a document on ibooks.

After recovering from the initial awe, I tried installing a few apps, and then considered how this device would fit into my lifestyle of usually being around computers anyway. This is probably something I should have considered before purchasing the $928 device (3G 32GB model), but how was I to know?

I commute to/from work each day. The particular route is, suffice to say, a little dodgy at times, so  I’m probably not ready to casually use it in that environment just yet – perhaps in 6 months or a year, when other commuters are also using them, it might be ok..

So when else have I been using it: its pretty handy when you’re watching tv (sorta gives a new meaning to ‘couch surfing’). It has also been useful to check mail and things before bed, in the morning while eating breakfast, or for testing websites and things at work. I’m not sure yet, whether having the convenience during all of those activities was worth the nine hundred odd dollars though – maybe I’ll realise this as more native ipad apps are released.

Speaking of apps, below are a few I’ve been using lately:

  • TweetDesk – great twitter client
  • tvGuide – for checking whats on tv (yes, has all the Australian free to air channels)
  • Weather HD - provides over the top animations and details of the weather forecasts in the configured areas.
  • Wikipanion – easy to use interface for browsing wikipedia.org
  • Quota – for checking your service usage totals and other statistics. i.e. mobile phone call totals, internet quota, 3g usage, google analytics stats, traffic camers and lots more.
  • IMDb – easy to use interface for browseing imdb.com – great if your on the couch watching a new movie and you want to check what an actor/actress’s name is, and what other films they’ve been in.
  • Habor Master – great fun but very addictive game about scheduling boats into a harbor.
  • Good Reader – lets you read all your docs and pdfs via google apps and other services.

Unlike most apps on the itunes store, all the above, are purpose built for the IPad.

Ok, so a few downsides to the IPad:

  • turning it off and on is a pain. If you use the pass code lock you have to enter it each time you want to turn it off. Obviously you can put the ipad to sleep without entering the pass code, but sleep uses battery that you don’t need it to waste.
  • as you probably already know, websites or website components that use flash won’t display in Safari (or other browsers). Whilst I’m use to this sort of thing with the flashblocker addon in Firefox, it’s not something normal people (at least not until html5 is standardised, but that’s another discussion) would tolerate. Note: youtube has already html5-ised their website so that its compatible with IPad and other devices so don’t worry there, but youtube isn’t the only website using flash.
  • the rich text editor in Wordpress’s admin area doesn’t work. I know there’s a wordpress app to cater for this, but it doesn’t actually have a rich text editor itself, so writing posts like this one takes a lot longer then normal (even for a web developer!).
  • IPhone apps are designed to run on the IPhone, but the IPad lets you install them on the IPad anyway. This is where the ‘200,000 apps and counting’ marketing pitch comes from in the IPad ads. If you try installing an iphone app though, to put it lightly, sucks! It uses a small part of the screen, or theres an option to enlarge it, but then it looks incredibly pixelated. The truth is (as of writing) there’s upwards of about 5000 native IPad apps.

As you can see, there are plenty of good and bad things about the IPad. If you’re still sitting on the fence about whether to buy one or not, I recommend finding a friend who has one, and asking them to let you try it out, or if you don’t have any ipad friends, just go down to your local retailer and try out one of the devices they have on display.

I hope my notes above have provided an unbiased opinion, and will help you to make the right decision about whether to buy an IPad or not! Good luck.

Jun 2 10

epub files with php

by Alex

Note: The purpose of this post is not to go into detail about the epub standard, but to share a few tips and small hacks I came up with for dynamically creating compliant epub files in PHP. If you’ve come here looking for details about the epub standard, look at the end of this post for some handy reference links.

The epub file format is an open e-book standard supported by a number of readers and tablet devices including Apple’s new iBooks store and the IPad. With the previous imminent release of the IPad in Australia, I recently had the task at work of creating an epub builder for the contents of a Drupal site.

The epub file format, is essentially a zip file renamed to an .epub. So the first thing you’ll want to do is download an epub file from somewhere, rename it to <whatever>.zip, extract it and review the different files and their content in your favorite text editor. The contents of most of these files, follow a number of standards set out by the International Digital Publishing Forum. You don’t have to know the in’s and outs of these standards, as they’re essentially just html and xml set out in a particular way. But if you use the example epub file you downloaded before, and reverse engineer things that way, you’ll get there eventually without spending weeks of study (arguably a bad thing, but who’s going to pay you to read 50 pages of a spec?).

There’s probably dozens of php libraries out there that will do zipping features for you, but the easiest way I found was just using PHP’s built in Zip Archive class. However, this class doesn’t support adding files to an archive that are uncompressed – which is required for the mimetype file of the epub file (as set out in the standard). Below is a small hack to get around this along with the basics of using the Zip Archive class.

$filename = "somefile.epub";
$mimetype = "model/mimetype"; // this file essentially contains "application/epub+zip" with no new line.

// note, the zip arguments tell zip to add this file to the archive as uncompressed. The epub standard requires the file be added at the start of the archive as uncompressed.
// you may need to do something different here if you're using a Windows server.
system("zip -q0Xj $filename $mimetype");

// For the rest of the epub file, lets use the easier ZipArchive php class.
$zip = new ZipArchive();

if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
 // error out here
}

// Example of creating folders in the archive.
$zip->addEmptyDir("META-INF");

// Example of adding a file via the contents of another file
$contents = file_get_contents("model/article-template.html");
// perhaps do some preg replaces here to slap in your article contents from a database or other file.
$zip->addFromString("article_001.html", $contents);

// Example of adding a file to the archive directly from a file on the filesystem.
$zip->addFile("model/META-INF/container.xml", "META-INF/container.xml");

// .. lots more to do here, as per the epub standard.

When you’ve dynamically built your epub file in full, you’ll want to test it out on your PC or Mac. Adobe Digital Editions (ADE) will do just that and its free. If your having trouble opening your epub files in ADE, turn on the logging opens in your preferences, and review the contents of your ADE log file – discussed here.

You’ll also want to use the EPub validation tool to ensure the epub file is suitable for the other readers out there.

If you want to allow dynamic downloading of epub files, you can do this with the following headers in php:

header("Content-type: application/epub+zip");
header('Content-disposition:attachment;filename="somefilename.epub"');
header('Content-Transfer-Encoding: binary');
readfile($filename);

That’s about it really. A few quick links:

Hopefully these notes can help someone else out there on the interwebs.

May 1 10

Notes on coverting to Mac

by Alex

Like most people my age, I’ve been using Windows, in various flavours at home for over a decade now. Throughout this period, and prior to this, about the only exposure I had to apple desktop products was back in my primary schools days, when my Mum brought home an Apple Macintosh to do her Thesis on (early 90’s) – in summary not a lot!

In the last year or two, Ubuntu was my primary desktop OS, but every now and then when I wanted to use Photoshop, I had to boot into Windows. I also had various performance & compat issues in Ubuntu, like Flash, ZDE, PS3 Media Server, etc.

So I was considering a Mac. Why a Mac? Well most applications support Mac, but it also implements a hierarchical file system, bash shell, and all the neat cmd line app’s you would expect in a Unix based OS. The downsides (I thought), were that they were significantly more expensive than a PC. But after doing a little comparison with pricing on Dell against a similarly spec’ed Mac-Mini, they came off roughly the same.

Sidenote: The Mac Mini is designed for PC users considering the switch to Mac. All it comes with is the machine, power adapter and Mini DVI to DVI converter. So basically, you can utilize all your existing PC peripherals (monitor, keyboard, mouse, speakers) to keep the conversion cost down.

Anyway, a few weeks ago, after ‘umming and arring’,  I took the jump, and picked up a Mac Mini on sale at JB Hifi.

Below are a few lessons I learnt (hopefully they’ll save someone else some time):

  • The basics:
    • The Finder application is like your windows explorer for mac.
    • Your control panel is top right apple icon->System Preferences.
    • The menu at the bottom (dock) has some neat options for auto hide, auto magnify, so take a look at the settings via System preferences. If you want app’s to stay in the dock: when they’re running. right click the icon and select ‘keep in dock’.
    • There’s heaps of other different UI stuff compared with Windows, but you’ll probably just pick it up without much fuss – its all designed to be intuitive.
  • When you download applications, they normally extract with a single .app file. An .app file is actually a special directory that contains binaries and other files that relate to the application. It’s a pretty neat way of keeping your file system neat and tidy though. However, you should be aware that sometimes the apps need to write files to your filesystem, in which case you will want to move them to your Applications folder, otherwise if you leave them on your desktop, or other places, they may not work properly.
  • If you use a Microsoft keyboard,
    • during the keyboard setup step of your install, it may ask you about which key to use as the Command Key ‘‘ – simply use your Start Menu key.
    • after installation, if you use your home and end keys a lot, they don’t seem to work very well in some applications, this application can help with that.
  • If you love open source, and want a repository of applications you can call on to be easily installed, try darwinports. Personally, I had issues getting it running as it needed XPort from apple.com, which wasn’t easy to find, so I just gave up and learnt the apple replacement apps, i.e. instead of “wget”, use “curl -O”
  • (Australian specific) If you use iiNet as your ISP, the usage meter program from martybugs is for windows only – but a very good mac version exists here.
  • If you use a program to periodically rotate your wallpaper images – don’t worry, because the Mac OSX software comes with this feature built into the OS.
  • The built in mail application that comes with Mac OSX is really smart – you give it your email address (i.e. joeblogs@gmail.com) and it works out for you all the incoming and outgoing mail server details! All you end up setting is the password!
  • I’ve only ever seen my firefox crash once, but when it did, you can’t kill it with an CTRL-ALT-DEL, but there are alternatives.
  • Lots of games you may have played in the past actually run pretty well on the Mac Mini. I installed World of Warcraft for a test run, and with the auto detect settings, it run a solid +30FPS throughout.
  • A good integrated development environment for PHP (and other languages too!) is: Eclipse
  • To mount web folders via SSH, use Mac Fusion (which requires Mac Fuse too). To get it working in Snow Leopard, use this.
  • A great light-weight editor to use (if you aren’t a vi/vim nutter) is Textmate. However it litters your folders with various meta files – to fix, follow these instructions.

That’s it for now – I’m sure there will be more soon!

Mar 29 10

Melbourne Trip #3

by Alex

A couple of weeks ago, my fiancée and I traveled to Melbourne to attend one of our good friends weddings Carlo & Renee (Congrat’s guys!). Anyway, we spent a couple of nights in the city, and then a couple of nights up in the Dandenong Ranges. I learnt more about about Melbourne this time around then I did the previous two times, so I thought I’d share:

Melbourne City
After hearing this from two different people (@johnlderry and the guys at the Melbourne Itomic office), Melbourne has a very rich culture. However to experience it, you’ve got to go out of the CBD area (which I failed to do on my last two visits). A few of the cultural villages we managed to hit were:

  • Lygon St, Cartlon – heaps of Italian restaurants, with really decent food! We went to a place called Dimattinas and thoroughly enjoyed a gnocchi and lamb shanks. My only regret was trying to eat the whole meal – I was way too full afterwards!
  • Bridge Rd, Richmond – outlet shopping without all the annoying crowds. There were a few dodgy places, but a few good places to shop here too. If you take a tram up Chapel St, and get off at Bridge Rd, you want to go West up Bridge Rd. Just walk up one side until you come to the main intersection and then walk back down the other side on the way back.
  • Swan St, Richmond – some weird furniture precinct. We didn’t stop here, but took marvel from the tram windows. It’s basically heaps of smaller version Ikea shops, but ones that sell quality & unique stuff.
  • Chapel St Precinct – the North end is mainly all expensive boutique clothing stores, but towards the middle/south end, it gets more affordable. The Prahran Markets down this end – this was the biggest fresh food market I’ve seen. We had a really good valued breakfast at one of the cafe’s there.
  • There are heaps more though (Victoria St for Vietnamese, and so on..).  I hope to ‘do’ them next time I go to Melbourne.

Dandenong Ranges, Yarra Vally

Firstly here is an approximate plot of our journey:

This trip started getting interesting as we hit Monbulk road in the hills, and travelled through the windy roads of the Sherbrooke Forest Park. The vegetation here is apparently ’sub tropical rainforrest’ – its beautiful! And you get great views out to Melbourne. If views is what your after, you want to go to the ‘Sky High’ lookout near the town of Olinda, which is $5 entry per car, but definitely worth the trip. When we visited, there was bad weather, so we couldn’t see so well unfortunately.Up in the same area is the award winning Pie Resturant ‘Pie in the Sky‘ – be warned, there will be a queue for both the resturant and take away, but its well worth the wait!

We also took a quick dash to melbourne’s wine country, Yarra Glen. It was sort of like the Swan Valley that we have here in Perth, as it’s basically an hours drive out of the city, and then you get winery after winery. We only had time to visit one: Yerring Station, which had a really impressive wine tasting setup, store and cafe. Wish we could have seen a few more!

In Summary

This is only a fraction of what you can get up to in Melbourne, so I hope to return one day and do some more exploring and blogging. Enjoy!