3’s USB modem on my Mac – liberating technology

16 April 2008

I’ve recently purchased a USB modem dongle from 3. I’d been looking at getting one for some time, but a recent trip to the coast finally provided a degree of justification. As my travel tends to be intermittent, I decided to go for the “pay as you go” option. This was available for what I considered to be a very reasonable £69.95. However, when pushed (and I did have to ask), the shop I purchased it from reduced this further to £49.95, as I was already a 3 customer. With a £15 3GB 30 day allowance, I was all set up for just less than £65.

I opted for the ZTE model (MF622) as it seemed to be the most recent, and I’m sure I read somewhere that it could theoretically handle faster speeds. I haven’t been able to confirm this though. As I use a Mac laptop, a 12″ iBook, I first had to install some drivers before plugging the modem in. The shop assistant had very helpfully made a point of getting an extra disk with drivers on it for me when I told him I had a Mac, but as it happened that was a red herring, as the correct disk was already supplied with the package.

Once installed, I ran the software and plugged the new modem in, and after a short while, the “Connect” button lit up and I was able to connect. The ZTE software actually installs a couple of new services to your Network preference pane, and it is one of these that is used to make the connection to the internet.

Incidentally, the reason that there is no need to install any PC software before connecting the modem to a Windows computer, is because the Windows version of the software is actually on the modem itself. The process of how it gets installed on your PC seems to be quite clever (not that I’ve tried it) and is explained in detail here.

The one thing that the PC software has, and that the Mac software lacks, is support for SMS text messages. This is a shame, because apart from anything else it makes registering on the My3 site rather difficult – they send an SMS message with a password to your modem’s phone number. So far I’ve avoided the whole issue by not registering. To actually get online, I just went to the My3 page of the 3 website (which you can browse without paying anything), clicked the big red Activate your voucher now button, and filled in the form with the PIN number from the voucher I’d bought in the store. As soon as I’d done that, disconnected and then reconnected (as instructed on the site), I was able to browse the rest of the internet without any problems (well, OK, I didn’t check it all, but the pages I did try worked fine).

I first tried the modem at home, where I have a very good HSDPA signal on 3’s network, and the speed with which pages loaded was not significantly different to the speeds available from my BT ADSL service – most pages loaded more or less instantly.  In fact, I had to check to make sure that I wasn’t still connected to my home WiFi signal. Over extended use at the coastal resort of Scarborough, the speed wasn’t always quite so good, and there was variation between the front and back of the apartment; and, seemingly, between the day and the evening – when everything seemed to slow down. That said, apart from one occasion on one particular evening, the connection remained more than usable. Indeed, I was able to continue with my work just as I would had I been at home, which given that I’m a web developer who probably makes more use of an internet connection than most during the day, is testament to the robustness of the technology and the network.

3 seem to offer a pretty open network as well, with no obvious port blocking or restrictions. In terms of different protocols and ports:

* I successfully used FTP to a couple of different web servers;
* I was connected to MSN Messenger and iChat/AOL via Adium throughout the day, and although Messenger occasionally disconnected and reconnected during that time, it was certainly not enough to be a problem. Indeed, the same thing occasionally happens with my ADSL connection, so I wouldn’t necessarily attribute it to the 3 modem or network. Interestingly, for some reason I wasn’t as successful using the iChat client as I was using Adium to connect to the same AOL servers, with the former throwing up quite a number of timeout error messages. I may investigate this further.
* I was able to Remote Desktop into a server; and
* I could ssh into my server at home, both without any problems.

The only minor mark I’d put against the ZTE modem was the relatively high power draw while connected to my laptop. The battery discharged considerably faster than when the modem was not connected. I suspect that’s just the result of using the HSDPA technology though.

Overall,  I’m very impressed with the 3 modem. Already it’s allowed me to spend some time with my family by the sea, when I might otherwise have had to stay at home to work. You can’t ask for too much more from technology, can you?

Updated: Recent experimentation suggests that 3 are now much more restrictive in the ports they allow. Specifically, I am no longer able to connect using ssh. Anyone have more luck with other mobile networks?

Apple TV and iTunes Movie Rentals

21 January 2008

Although Apple’s new MacBook Air is certainly a headline stealer, I think the biggest announcements to come out of this year’s Macworld are those relating to the Apple TV “Take 2” and iTunes Movie Rentals.

Apple TV

The Apple TV concept has not caught on since going on sale in March 2007, as Steve Jobs admitted during his keynote. Originally designed as a computer accessory to allow you to view music and video from your computer on your TV, it worked more or less like an iPod by syncing content via iTunes. Crucially, however, it wasn’t possible to acquire new content via the Apple TV device itself. So, if you decided you wanted to download a new TV programme or film, it was necessary first to go to your computer and download it, and then sync the Apple TV with the computer. At least one step too many.

The other problem with the Apple TV was the restricted content available to it. Although Apple had done quite a good job, in the US at least, of making TV programmes available to buy and download, even in the US the range of films was fairly meagre. Furthermore, it was only possible to purchase films, not to rent them.

Now all of these issues appear to have been overcome.

The new version of Apple TV announced at this year’s Macworld, in effect a major software upgrade to the existing hardware, is designed to work completely independently of your computer – indeed, although you can still sync music and video with a Mac or PC, you don’t actually need to own one at all to use the new Apple TV. Instead you just plug the Apple TV in to your television and your broadband connection. Once plugged in, it’s possible to browse the full list of TV programmes and movies available in the iTunes store, download podcasts, stream photos from .Mac and Flickr, and browse YouTube, and all from the comfort of your sitting room.

To accompany this change to the Apple TV, Apple have also announced a new system of iTunes Movie Rentals. So for the first time it will be possible to just rent a film from the iTunes store. Furthermore, as Apple have struck deals with all the major film studios to support this service, it looks like there will be a very good selection to choose from, including all the latest films and High Definition (HD) versions of many of them. So, you will be able to sit down of an evening, browse a list of all the latest films, select the one you want, and start watching it almost straight away for a relatively modest fee of between $2.99 and $4.99. I think this alone is enough to make the Apple TV a real hit.

I have seen some suggestions that the cost of rentals is too high for this system to be successful, particularly in comparison to something like a subscription to Netflix, which offers a flat rate rental by mail service to customers in the US. However, I think Apple’s bet that subscriptions aren’t what most people want in the music download business, also holds in the film rental business. In both cases, people don’t generally like ongoing costs, and especially when they can’t be sure that their usage is likely to merit paying out a set amount every month. If you can be sure that you will be renting and watching a certain number of DVDs per month, and are prepared to wait for them to arrive in the post, then a subscription service like Netflix makes sense. However, if like me, you’ll be lucky to find time to watch one DVD a month, it makes a lot more sense to have a service that allows you to sit down and select what you want when you do have a bit of time, pay a set amount, and start watching almost straight away.

Personally, I can’t wait for this service to come to the UK. Certainly the Apple TV is likely to become a lot more popular over here when it does. If the BBC can also manage to get their iPlayer service working on it as well, as Ashley Highfield suggested in a recent blog entry, then I think it will become very popular indeed.

Apple’s MacBook Air designed for the wireless cloud

18 January 2008

Apple MacBook Air

Apple’s new MacBook Air is a wonderful looking computer and is remarkably thin. It’s the sort of computer that I would want if I was doing any amount of travelling. Actually, I want it anyway.

I’ve read some criticism though, in particular with regards the compromises (or design decisions) that Apple have made to get the machine so thin. In no particular order they are:

1. Not enough ports. The MacBook Air comes with just three ports – USB2, micro-DVI out (for driving a monitor), and a headphone jack. So you can’t, for example, connect a USB printer and mouse at the same time. However, I suspect that Apple doesn’t really expect anyone to attach either. Rather, they expect that your printer will either be attached to your desktop PC, or some other part of your network (like your router); and that the new multi-touch trackpad with its gestures, is better than (or at least as good as) a mouse. And if you do want to connect a mouse or a printer, then the machine comes with the latest bluetooth standard. In short, the MacBook Air is genuinely designed to be both portable and wireless.

2. No optical disk drive. We’ve been here before of course, when Apple first dropped the floppy disk from its iMac desktop computer. Once again Apple is probably moving slightly ahead of many of its users, but as Steve Jobs demonstrated during his keynote when announcing the machine, there aren’t really that many reasons for having an optical drive in a computer like the MacBook Air. Backup can be handled by Time Machine and the new Time Capsule, music and video content can be purchased and rented from the iTunes store, and installation of new software is available via the clever Remote Disc facility. All of this of course ties the user into Apple more – but that’s how the Apple’s ecosystem works.

3. No user replaceable battery. There are those, I’m sure, who carry around spare batteries and will swap one in when the other runs out of power, but Apple is betting that the number of people who actually do this is very low. It’s the same principle that they’ve applied to the iPhone. From my own experience, I don’t know anyone that touches the battery compartment on their laptop or their phone.

4. Non-upgradeable memory. See the battery argument. Is 2GB enough? Well, more memory is always better, but it’s probably an acceptable compromise – it’s certainly a good deal more than is in my current iBook.

5. Not enough hard-disk space. 80GB (or 64GB if you’re going to the SSD option) is of course less than some iPods, but the MacBook Air is not meant to hold all of your data – rather, it’s a tool for accessing and working on snapshots of it. So, most of your data will be stored on your desktop (accessible via Back to My Mac as required), or in that famous internet cloud (via iDisk, Google and a myriad of other online data stores and applications).

Clearly the MacBook Air is not for everyone. It won’t replace the full functionality of either a MacBook Pro or indeed a MacBook. But for many people, who want a light, powerful laptop computer, I suspect that it will most certainly do.

Time travel on the cheap

20 December 2007

Flux Capacitor

On the face of it $220 is not a lot to pay for time travel. But then of course you need to add your own De Lorean and somehow find a suitable fuel source, neither of which come cheap. Oh wait, it says here it’s just a replica. Oh well, I’m sure it would look good on the wall.

[via Gizmodo]

The Sinclair C5

19 December 2007

A couple of photographs from when I tried out a Sinclair C5 many many years ago. A battery powered vehicle, this was Sir Clive’s attempt to revolutionize personal transportation. Unfortunately he launched the C5 in the middle of winter, and it was beset at the outset by a number of reliability and safety concerns. Still, I remember really enjoying my trip through the Norfolk countryside, and it felt a lot safer than it now looks from the photographs. Of course, there were no large lorries about where I was using it, and I was just a reckless teenager. Still, I definitely remember wanting one.

I probably still would, if we had a road system that supported this sort of alternative transport. When I was out in Holland a couple of years ago I was really impressed with the separate lanes that existed for bicycles, rather than the odd bit of painted road that we get in the UK. I think it went a long way to encouraging people to use their bicycles, and with the right legislation, such lanes could be used to encourage alternative modes of transport like the C5. Perhaps the recent £50 Million Lottery Giveaway success for Sustrans for investment in walking and cycling UK-wide is a step in the right direction.

BBC iPlayer problems

18 December 2007

BBC iPlayer

So the streaming version of the BBC’s much-maligned iPlayer is now available. Excellent timing, I thought, as I’d just forgotten to record Match of the Day and my team had somehow managed to (a) win away, and (b) not concede a goal, both quite unlikely occurrences so far this season. I say forgotten to record it, it was more like not wanting to tempt fate by setting the recorder before the game had been played. Superstitious? Me?

So the next day I sat down at my computer and searched iPlayer for Match of the Day. Nothing. And then I noticed the note about programmes excluded because of the BBC not holding the relevant rights, which seemed to include just about all sport as well as quite a lot of other things. These rights issues mean that, even though all programmes are broadcast without any DRM restrictions whatsoever when they originally air, should I decide I want to watch a particular programme a few hours (or days) later using the BBC’s own flagship catch-up service, I can’t.

Yet, had I not been so ridiculously fearful of jinxing my team, and in fact set the EyeTV recorder on my Mac, I would have the programme on my hard disk now, ready to put on my iPod, watch on my computer, put on a DVD, stream to my TV or store for 20 years. Madness. I understand the BBC cannot act unilaterally here, but purely from a consumer point of view, the current offering just does not make sense. And when you move beyond the new streaming option, and start looking at the download version… ugh! Windows only, and then only XP and maybe Vista if you’re lucky. And only if you have the latest version of Windows Media Player, and the wind is blowing in the right direction. Even then it won’t work on the most popular portable video device on the market, the iPod. What a waste of time and effort that was.

What could the BBC do instead? How about streaming all TV output for 7 days, and then get BBC Worldwide to stick everything else up on the most popular digital media distribution platform in the world, iTunes, and charge the standard £1.89 or whatever it is per TV episode. With the money left over from not developing some unwieldy bespoke application that only works on a couple of versions of Windows, the BBC could encourage Apple to develop a Linux version of iTunes while they’re at it. Of course, had I (a) left my Mac on and (b) not taken my MigliaTV hardware with me, I could have logged on to my tvtv account and set the recorder remotely. But that’s my own stupid fault.

OLPC XO: education and the Sinclair heritage

13 December 2007

OLPC XO ZX Spectrum

The One Laptop Per Child (OLPC) XO computer reminds me of some of Sir Clive Sinclair’s computers. Not, as you might think, because of the XO’s rubber-membrane keyboard, which both of Sir Clive’s most popular computer, the ZX Spectrum, and his only portable, the Z88, shared. Rather, it is that one of core aims of the OLPC XO project is to encourage children to learn about the computer they are using: “Children program the machine, not the other way around.” [see http://laptop.org/en/laptop/] In the same way, Sinclair always intended his computers to be used as educational tools. Indeed, his earliest mass market machines, the ZX80 and ZX81 were both available in kit form, requiring the user to really get to grip with how things worked. While it’s probably true that these kits only appealed to a limited hobbyist market, they did emphasis the accessibility of the machines. That accessibility remained important to Sinclair – even the hugely popular ZX Spectrum and later the Sinclair QL came with hefty manuals detailing everything about each computer as well as comprehensive programming guides. These were machines designed to teach as well as be used to perform specific tasks.

Although many people didn’t use these Sinclair computers as educational tools, preferring instead just to play games or run business applications written by others, many did go on to learn and write software for these machines; and some went on to become very successful, setting up and running their own software companies. Others built various pieces of hardware to attach to and extend these machines. For example, I remember one contemporary at my school building an interface that connected his Spectrum to a Scalextric track so that track times could be recorded. Many other interfaces were designed and sold commercially.

Of course, computers have come a long way since Sinclair’s heyday, and as computers have moved closer to being appliances they have brought with them significant benefits – not least the fact that you don’t need to be some kind of technical genius just to get the things to work. Yet as they have become easier to use, they have also become significantly more complicated to understand, in particular in terms of how they work.

We certainly can’t go back to the days of Z80 processor, where it was possible for one person to understand nearly everything about the computer he or she was programming, and on the whole that’s probably a very good thing. Yet I can’t help but feel that children are missing out by not having their own Sinclair computer to explore. That’s why I hope the OLPC project is a success. To date, OLPC have been focusing on selling the XO computer to the developing world, but I think their goal of providing “children around the world with new opportunities to explore, experiment and express themselves”, applies equally to the developed world. I hope it becomes more widely available soon, and that the current Give One Get One initiative in the US and Canada, where individuals can effectively pay for two machines and donate one of them to a child in a developing nation, is the first of many.

Apple remotes

11 December 2007

Apple remotes

There is something very appealing about these personal remote control units. They show that even something seemingly as simple as a remote control can be designed in such a way as to be both functional and visually appealing. The idea is that every member of the family has their own ‘apple’, which they can program to best suit their own TV watching needs. They respond to motion gestures; and rotating the apple left lowers the volume and rotating it right raises it. Whenever the remote is returned to the ‘bowl’ it is recharged.

The only problem with bringing something like this to the market is that you have to convince potential purchasers that the added functionality and style are worth it, given that every device they already own comes with a standard remote which is good enough to get the job done and which they are already used to. I’d be tempted though.

[From the Form Beyond Function Yanko Design website via Gizmodo]

Converting Google’s iCalendar formatted feed to XML

30 November 2007

One of our clients wanted to put a simple calendar of upcoming events on his website. I briefly considered writing a database driven application to do this, before discarding the idea as a little too complicated and costly. Instead, I recommended that he use Google Calendar for entering all of the information – we were already using Google Apps to maintain his e-mail, so it seemed a logical enough step. The plan was that I would then use Google Calendar’s RSS feed to display these events on his website’s homepage. However, we soon hit a snag, which was that the Google Calendar RSS feed lists events in the order in which they are published (that is, are added to the calendar) rather than the order in which they are going to occur. For what we wanted, this was no good.

So, I turned instead to the iCalendar formatted feed, which is usually used for subscribing to a public calendar. This contained all the information I needed, although not in a format I was used to dealing with. I could, of course, have decided to change the code to process the iCalendar feed directly. However, an approach based on the XML of the RSS feed seemed to be much simpler, and fitted with the way the rest of the site was put together. So, I decided to write a few regular expressions to convert the iCalendar format to nice, clean XML.

Technical note and disclaimer: The website was running on a Windows 2003 Server box, so the following is written as a JScript-based scheduled script. I have no doubt that this could all be done in a much more elegant way – one day I’ll get started on that. In the meantime, I hope this is helpful to others.

Before running the regular expressions I modified the file containing the iCalendar data so that each field was on a single line:

// Open the text file
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fsofile = fso.OpenTextFile("d:\\basic.ics",1);

// Set some string variables
var fsotext = "";
var last_line = "";

try {
// While there is still something in the file to read
while (true) {
	// Read the next line of the file in
	var this_line = fsofile.ReadLine();
	// If it doesn't start with a space ...
	if (this_line.substring(0,1)!=" ") {
		// ... assume that this is the last line of data for this field
		last_line += "\n";
		}
		// otherwise, just add to the variable this_line
		else {
		this_line = this_line.substring(1,this_line.length);
		}
	// Add last_line to the fsotext variable that contains the processed text
	fsotext += last_line;
	last_line = this_line;
}
}
catch(err) {}
// Tidy up with the last bit of data
fsotext += last_line + "\n";
// And close the text file
fsofile.close()

Then I loaded this file into a test variable called fsotext and ran the following regular expressions on it:

// Strip out extraneous \'s
fsotext = fsotext.replace(/\\/gi,"");
// Convert all BEGIN:X statements to
fsotext = fsotext.replace(/BEGIN:(.*)/gi,"");
// Convert all END:X statements to
fsotext = fsotext.replace(/END:(.*)/gi,"");
// Convert all Name:Value pairs to Value
fsotext = fsotext.replace(/(.*?)\:(.*)/gi,"$2");
// Convert any & references to &
// (this is just to prevent some problems when we convert them back)
fsotext = fsotext.replace(/&/gi,"&");
// Remove any additional flags on data
// (which we are not using for the purposes of this feed)
fsotext = fsotext.replace(/;[^>]*>/gi,">");
// Crude way of handling the RRULE FREQ=YEARLY flag
fsotext = fsotext.replace(/>FREQ=YEARLY>/gi," />");
// Some character encoding issues
fsotext = fsotext.replace(/œ/gi,"£");
// Convert all & references to XML &
fsotext = fsotext.replace(/&/gi,"&");
// Replace all carriage returns with spaces
fsotext = fsotext.replace(/\\n/gi," ");

The final step, before converting the XML into a snippet of HTML, was to handle events spanning one or more days, and remove any events that had already happened:

var calendarxml = WScript.CreateObject("Microsoft.XMLDOM");
calendarxml.loadXML(fsotext);

var date_nodes = calendarxml.selectNodes("//DTSTART");
for(var i=0;i<date_nodes.length;i++) {
	var n = date_nodes[i];
// If no time details are set, default them to 00:00:00
	if (n.text.indexOf("T")==-1) n.text += "T000000";
// Handle the year, month and day
	n.text = n.text.replace(/^(....)(..)(..)/,"$1-$2-$3");
// Handle the hours, minutes and seconds
	n.text = n.text.replace(/T(..)(..)(..)/,"T$1:$2:$3");
	n.text += ".000-00:00";
}

var date_nodes = calendarxml.selectNodes("//DTEND");
for(var i=0;i<date_nodes.length;i++) {
	var n = date_nodes[i];
	var is_dayrange = false;
	if (n.text.indexOf("T")==-1) {
// If no time details are set, default them to 00:00:00
		n.text += "T000000";
// and mark the record as being one that spans one or more days
		is_dayrange = true;
		}
// Handle the year, month and day
	n.text = n.text.replace(/^(....)(..)(..)/,"$1-$2-$3");
// Handle the hours, minutes and seconds
	n.text = n.text.replace(/T(..)(..)(..)/,"T$1:$2:$3");
// Get the date and time
	var dtm = new Date(n.text.replace(/T/," ").replace(/\.000\-00\:00/,"").replace(/\-/gi,"/"));
	if (is_dayrange) {
// and set the end date to the previous day (rather than 00:00:00 on the next day)
	dtm.setDate(dtm.getDate()-1);
	n.text = dateString(dtm,"t");
	}
	else {
	n.text += ".000-00:00";
	}
	// Remove any events that have already happened
	if (dtm<new Date()) {
		var p = n.parentNode;
		var el = p.parentNode;
		el.removeChild(p);
	}
}

Then it was just a case of deciding how to display the information and creating an XSL stylesheet to do the job.

I’m now using this method on a couple of sites, and so far it works well. The client gets to use the full Google Calendar interface to maintain their events diary, and – now that I’ve set up a couple of scheduled scripts that run every few hours – I get to sit back and watch the websites update automatically.

Leopard: Time Machine and recovering deleted playlists in iTunes

29 November 2007

Time Machine

Although Time Machine is one of the big selling points of Leopard, like all backup software it is not something that most users ideally want to have to use very often. To some extent this is a shame, because Time Machine is designed to be very visually appealing, with the swirling blackhole effects that appear whenever it is invoked. In fact, it is so visually appealing that there is a real temptation to actually delete something on purpose – just so that you can use Time Machine to restore it. Of course, that might be just me.

Fortunately I will no longer need to take such drastic action, because today I actually deleted some items – by mistake – that aren’t easy to recover: iTunes playlists. In fact I deleted a whole series of them by hitting the delete key when I thought another application had focus. Now as far as I can tell, iTunes playlists, when deleted, more or less disappear into the ether. Certainly by the time I noticed what I’d done there was nothing under the Undo menu option, and there was nothing in the Trash either (that had seemed unlikely, I’ll admit).

Resisting the urge to panic, or to re-create the playlists, I turned instead to Time Machine. I closed iTunes, navigated to the iTunes folder, and then clicked on the Time Machine icon. Stepping back in time until the last time the iTunes Library file had been updated, I then clicked on Restore and replaced the latest version (having zipped up a copy first just in case). I then re-opened iTunes, crossed my fingers, and checked that all of the deleted playlists were present – which they were. It was only a simple test, but Time Machine worked exactly as it is supposed to. You can’t really ask for more than that.