S h o r t S t o r i e s

// Tales from software development

Archive for December 2010

iPad AirPrint and Windows

with one comment

It’s not clear why Apple decided to remove the capability to print to a PC, Mac, or network connected printer via AirPrint in iOS4 but it seems that it’s not that hard to (re-)enable it.

You need to have the Bonjour service running on a PC or Mac and then install either AirPrint Activator for the Mac or AirPrint Activator for Windows.

If you have iTunes installed on your PC or Mac then you’ll have the Bonjour service installed. I wanted to have the Bonjour service running on a Windows server but didn’t want to install iTunes on this PC. I googled for ‘bonjour for windows’ and was surprised to find that Apple has made an install package available for just this: Bonjour Print Services for Windows.

After installing Bonjour Print Services for Windows, I downloaded the AirPrint Activator for Windows and executed it. After this, I ran C:\Program Files\AirPrint\airprint.exe so that Windows Firewall prompted me  to unblock the program, and chose ‘unblock’ rather than ‘keep blocking’. Then I restarted the AirPrint service in the Services control panel applet.

Finally, I selected the printer that I wanted to print to in the Printers and Faxes control panel applet (or Devices and Printers in Windows 7) and made sure that it was shared.

Back on the iPad I started Apple’s Pages app, opened a document, and selected the print function. My shared printer immediately appeared in the list of printers found. After selecting the printer, the document duly appeared a few seconds later.

Note that, so far, there are only a few apps that are AirPrint enabled. Apple’s own Pages and Numbers apps are two that do have AirPrint capability.

One final word about uninstalling the AirPrint Activator for Windows – as it doesn’t have an installer it must be manually removed. Before you delete the C:\Program Files\AirPrint folder you need to delete the AirPrint service. To do this, open a command window and type the commands:

sc stop airprint
sc delete airprint

You can now delete the C:\Program Files\AirPrint folder.

Written by Sea Monkey

December 27, 2010 at 8:00 pm

Posted in Environments

Tagged with

Case sensitive comparisons in MySQL

leave a comment »

Read Codes are used to describe patient test results in some of the health systems that our software interfaces with. Our interfaces perform a mapping of a particular Read Code value in the data being imported from an interface to a data item in our system.

Read Codes are case sensitive and normally this isn’t an issue because the mapping is performed in program code and is case sensitive. However, from time to time I do some maintenance or analysis of the data in a system using the MySQL Query Browser and, usually, the comparisons on VARCHAR fields are case insensitive which can produce misleading query results.

For example, when a new mapping of a Read Code value to an data item is added it’s important that the mapping doesn’t already exist as the duplicate will cause our software to fail when it loads the Read Codes into a dictionary. So, I want to use a query like this to check for duplicate mappings:


Typically, MySQL treats Read Codes that differ only in casing as though they were the same value. So, for example, the Read Codes ’44A1.’ and ’44a1.’ will be treated as the same value although they are not.

Fortunately, MySQL provides the BINARY keyword to force case sensitive comparison:


Similarly, a simple SELECT statement using the ‘=’ operator for comparison can also be qualified with the BINARY keyword:

SELECT * FROM Codes WHERE ReadCode = BINARY '44A1.';

This will return the row for ’44A1.’ but not the row for the ’44a1.’ Read Code.

Written by Sea Monkey

December 14, 2010 at 8:00 pm

Posted in Development

Tagged with

iPad myths: It’s too expensive

leave a comment »

It’s a new device from Apple so it was never going to be cheap but is it too expensive ?

The argument seems to be that because netbooks are selling at around £250-£350 then the £429 entry level price of an iPad is too high. But I don’t think this is the correct comparison. First, how does the pricing it fit within Apple’s product range and, second, how does it compare against the new generation of internet oriented tablets that have started arriving.

So, to start with, how about comparing the price of the iPad against the price of the iPhone ?

OK, the iPad isn’t a phone but they do run the same (more or less) operating system, similar applications, and have the same UI. The iPhone 4 starts at £499. So, the iPad has a screen several times the size of an iPhone making it a practical proposition for productivity applications such as email, word processing, etc., but costs £81 less than the iPhone. With this comparison, the pricing actually looks about right.

However, you could argue that the iPod touch is a better comparison as this is also ‘an iPhone without the phone’. Apple doesn’t currently make a 16Gb iPod touch so the comparison must be made between the 32Gb iPod touch at £249 and the 32Gb iPad at £499. This comparison does begin to make the iPad look expensive as you could argue that the only hardware differences are the larger screen of the iPad and the built-in GPS receiver.

However, both these comparisons are a little unfair because we’re comparing a first generation iPad with third and fourth generation devices. While Apple’s pricing for the iPad might not change with the next generation iPad because, to some extent, it’s about market positioning , it is likely that it’ll offer more for the money and therefore be better value.

So, how about a comparison against the other tablet devices now appearing on the market ? It’s difficult to make a direct comparison because none of these runs Apple’s iOS or has exactly the same form factor but the ones that come closest are the new tablets from Archos, Samsung, and ViewSonic.

First, the prices… The Archos 101 Internet Tablet runs Android 2.2, has 16GB storage and a 7  inch 1024 x 600 pixel screen for £267. The Samsung Galaxy Tab at £469 has a similar specification but is a little smaller than the Archos. It also has 3G as standard where the Archos has no 3G capability at all. Finally, the ViewSonic ViewPad 10, priced at £463, also has 16Gb storage, a 10 inch 1024 x 600 pixel screen, and runs both Android 1.6 and Microsoft Windows 7 Home Premium but has no 3G option.

The Archos isn’t a direct competitor as its specification falls a long way short of the other two. For example it has 256Mb RAM rather than the 1Gb of the ViewSonic and no 3G option.

The Samsung Galaxy Tab and the ViewSonic ViewPad 10 clearly are competing against the iPad but are offering less functionality than the iPad for a higher price and both are less accomplished products with chunky construction, shorter battery life, and lower resolution screens.  At the very least, you can say that the iPad costs less and is a much more convincing product.

Apple doesn’t sell cheap products but there doesn’t appear to be an iPad alternative with a similar specification and capability that costs less. So, while the iPad might be expensive it appears to be the cheapest option unless you’re prepared to settle for a lower specification such as the Archos 101 Internet Tablet.

Written by Sea Monkey

December 10, 2010 at 8:00 pm

Posted in Comment

Tagged with

iPad myths: The iPad is a better ebook reader than the Kindle

leave a comment »

There’s heated debate in some internet forums about the relative merits of the latest generation Kindle and the iPad as ebook readers. As an owner of both I think I can make an objective assessment of their relative merits.

The Kindle’s size (similar to a paperback), very low power consumption, light weight, and reflective screen makes it a much more convincing ebook reader for general text such as novels. The battery life is superb with Amazon quoting up to a month’s use before it needs recharging. I took it on holiday recently and used it for several hours each day, reading five books over two weeks. At the end of the holiday the battery was only down to about 30% charge. However, although the Kindle now has native support for PDF documents, its small screen makes viewing  Letter/A4 formatted PDF documents difficult.

By comparison, viewing PDF documents using the GoodReader app on the iPad is a pleasure and the touch UI comes into its own for navigating and zooming. But in all other respects the iPad has similar weaknesses to a laptop computer with limited battery life (less than a day) and a screen that’s difficult to read in bright sunlight. There’s no getting away from the fact that the iPad is an extraordinary device and after a few days use it became my ‘go to’ device for internet browsing and viewing/updating files in Dropbox and Evernote.

It’s worth noting that neither device is perfect. Even Apple’s iPad apps crash from time to time and yesterday the Kindle locked up and drained its battery in a matter of hours.

Written by Sea Monkey

December 6, 2010 at 8:00 pm

Posted in Comment

Tagged with