Software Tools


June 7, 2010: 6:23 pm: DanGadgets, Software Tools

I recently spent some time as a guest of the Ontario judicial system. No, not as a prisoner, something much more unpleasant: jury duty.

Recommended Reading
Recommended Reading

This is the second time in five years that I’ve “done my duty”, and in both instances the week consisted of 99% waiting around and 1% being rejected out-of-hand by defense counsel. I am, of course, crushed by the repeated rejections, but I managed to get some benefit from the other 99% of my week by reading a software development e-book.

When I went through this five years ago, I did my reading on a Dell Axim running Windows Mobile 5.0. You laugh, but let me tell you that one thing it did really well was copy and paste. You selected the text with the stylus (stop laughing), used a button to toggle to Word and pasted the text in. A task so simple even Windows Mobile could handle it.

Five years later, I’m using an iPhone. In technical terms, the iPhone is a Porsche and the Axim a Yugo. But when it comes to copy and paste, the Porsche is a freaking nightmare to drive.

The problem isn’t so much with the iPhone as with its apps. Very few of e-readers allow you to copy text into the clipboard. It’s bizarre! Do they think we don’t want that feature (we’re too dumb), or do they not trust us to use it responsibly (we’re too dishonest)? Either way, it’s insulting.

However, it’s not all doom and gloom. There are two very, very good apps that do support the clipboard, and a growing number of e-books that are compatible with them.

Stanza - march to a different drummer
Stanza - march to a different drummer

Stanza.   Stanza supports a long list of e-book formats, but unfortunately you are unlikely to encounter most of them when buying e-books. The 3 exceptions are:

  1. eReader – This is a “secure” (piracy-protected) format that is used by Fictionwise and Books on Board for most of their books, and by Barnes and Noble for many of them.
  2. ePub – The ePub format supported by Stanza is not “secure”, which unfortunately makes it harder to find (we’re dishonest, remember).  However, if you’re a computer geek then you’re in luck: O’Reilly and Microsoft Press offer ePub editions of almost all of their publications.
  3. PDF – Support for PDF format documents was added to Stanza last week.  Unfortunately, its copy support is pretty inconsistent, often copying gibberish to the clipboard.
GoodReader - not bad!
GoodReader - not bad!

GoodReader. GoodReader supports just one format, PDF, but that’s still the most commonly used format for technical publications. I’ve raved about this app before, and I’ve grown more and more impressed with it over time. They added clipboard support a couple of releases ago, and while its not the most convenient implementation (you can only copy a full page of text, not selected text), it is fast and reliable, just like the rest of GoodReader. I’ve yet to find a PDF that GoodReader couldn’t handle — amazingly, it loads 100 meg monsters faster than my desktop PC.

Once you’ve filled the iPhone’s clipboard, your options for pasting text are much better.

You might find that the built-in Notes app is good enough for this task. I use Pastebot – a lot of people rave about its advanced formatting features and automatic synchronization (Mac only), but I like the fact that it automatically saves the clipboard contents when you open the app. If you need to format the text after you paste it (change fonts, italics, etc.), you should consider Documents To Go. I’m really impressed with how quickly it manages to bring you back to your last spot in a document without multitasking — the app is ready to paste a couple of seconds after you click the launcher (on an iPhone 3GS).

The new iOS 4 will make the copy-and-paste process somewhat smoother with its support for multitasking and fast app switching: it might even be able to compete with Windows Mobile 5!

One last piece of good news: O’Reilly (and associated publisher, Microsoft Press) continue to make most of their books available as very inexpensive iPhone apps, generally $5 or $6. That’s the full book, pictures and all.

If you’ve bought one of these apps, you were probably disappointed to find that clipboard support was disabled. This seems to be related to the underlying version of Stanza (which their apps bundle with the e-book). For some reason Stanza quietly disabled clipboard support in an update to their app last year, then quietly re-enabled it in the next update. Hmm.

While O’Reilly continues to use the clipboard-disabled version of Stanza, it is easy enough to do the upgrade yourself. Just follow the process described in my earlier post to extract the ePub from the O’Reilly / Microsoft Press book app, then import the ePub into Stanza using their desktop app or a URL link.

I’m pretty sure that O’Reilly is OK with you doing so — as mentioned in my earlier post, it was O’Reilly themselves who originally documented the process. If not, maybe I’ll get yet another opportunity to read e-books as a guest of the Ontario judicial system!

September 14, 2009: 7:29 pm: DanProgramming, Software Tools

A few months ago, technology publisher O’Reilly began selling some of their books as iPhone apps [iTunes link] for a surprisingly low price — generally just $5.  These are the full versions of the books, not just an extract.  The apps come bundled with Lexcyle’s Stanza e-reader, which is feature-rich, fast, and stable.  All things considered, these books are quite a bargain.

There is a catch, of course:  for some books, and many humans, the iPhone isn’t the best reading platform.   Books about software development and tools are generally most useful when you are working hands-on at your computer.  Switching from the iPhone to the PC is rather awkward, and copying and pasting code fragments from the iPhone to your computer is pretty much impossible.  (Stanza, unlike Kindle, does support copy and paste of text by way of their annotation feature, but getting that copied text onto your computer is a byzantine  procedure).

Fortunately, O’Reilly chose to package their e-books using the open ePub standard, without ePub’s optional DRM (Digital Rights Management) encryption.  This means that it’s relatively easy to extract the ePub document from the iPhone app, at which point you can read it on whichever platform you choose.  The number of software and hardware e-readers that support ePub is rapidly expanding (with one notable holdout), and it is widely expected that ePub will eventually replace today’s myriad incompatible formats.

The following method for extracting the ePub document from one of O’Reilly’s iPhone apps is based on an article on the excellent TeleRead site.  The packaging of the apps has changed a little since that article was written, so a couple of extra steps are required.  I use a Windows PC, but I’m sure a similar approach would work on a Mac since the only software tool required is one that can read and write .zip files.

  1. Locate the iPhone app file.  The easiest way to do this is to right-click on the app in iTunes, then select “Open in Windows Explorer”.  The example I’m working with is the wonderful Coding4Fun book (which costs $32 when bought as an eBook right now), and its app file is named Code4Fun 1.0.ipa.  Copy the .ipa file to another folder so that you won’t confuse iTunes with the following steps.
  2. Extract the contents of the .ipa file.  Despite the extension, this is a zip-compressed file.  Most zip extraction tools (like 7-Zip in the following screenshot) are quite happy to take a whack at opening the file without knowing what an .ipa is, but if necessary you can rename the file to Code4Fun.zip first.

    A zip in app's clothing
    A zip in app's clothing
  3. The contents of the app should consist of a couple of files and a folder named “Payload”.  If you open Payload you’ll find another folder named Code4Fun.app. Another level down is a folder named “book”, as shown in the following screenshot.  (Incidentally, the parent folder of “book” also contains a file named default.pub.  This is actually a bonus ePub book: The Time Machine by H.G. Wells.  I don’t think you can get at this book from within the Code4Fun iPhone app – it presumably is there as part of the Stanza packaging).

    In the book, is a book
    In the book, is a book
  4. Select the contents of the “book” folder (2 folders and a file) and add them to a new .zip file, as shown below.

    A ePub in zip's clothing
    A ePub in zip's clothing
  5. That .zip file is actually your ePub document, so rename it to something more suitable like Code4Fun.pub.  At this point you should be able to open the .pub file in Adobe Digital Editions, or MobiPocket Reader, or Stanza Reader.  (Mobipocket and Stanza are generally used on mobile devices, such as Blackberry or Windows Mobile smartphones, but both offer a  desktop reader).  My own preference is to keep things simple and flexible by using the browser-based Bookwork reader.

Enjoy, but please, please don’t pass along the .pub file to your friends (or, worse, a Torrent site).  O’Reilly is doing us a great favour by selling these ebooks at such a low price and supporting the open ePub standard.

I’m pretty sure that O’Reilly is OK with you extracting the .pub file for your own use — it was an article on an O’Reilly site where I first came across this procedure.  Other companies would have you believe that DRM-encrusted proprietary standards are the only way to prevent the unwashed masses from pirating ebooks.   Please don’t help them to prove their point.

September 9, 2009: 4:56 pm: DanSoftware Tools

I recently switched browser preferences from Firefox to Google Chrome.  I was forced to make the change by a lack of RAM — the software development tools I use eats up most of my RAM, and Firefox has become so bloated over time that it wants 300M of its own to display a few tabs.

It was hard to give up all of the Firefox plug-ins that I had grown accustomed to, especially XMarks and, ironically, the Google Toolbar.  However, I love the fact that Chrome opens in seconds and uses about 1/3 the RAM of Firefox.  I’ve yet to come across any web pages that Chrome can’t render, and it has never crashed.  I like the concept: a relatively thin, fast and stable platform for web content.

However, having decided to commit to Chrome as my browser I was surprised to find Chrome wouldn’t accept me!  When I tried to set Chrome as my default browser, I saw the following: no “Default Browser” button.

OK.  Now what?
OK. Now what?

This doesn’t seem to be a widespread problem.  I found a reference to a long-fixed incompatibility with Vista (one of the smart things about Chrome is is automatically updates to the latest version), and a suggestion to run Chrome as an administrator if the Default Browser button wasn’t displayed.   However, I am an administrator, and I run XP.   Freaky.

I still don’t know what the problem is, but I stumbled across a solution.  It seems that the Default Browser button is there somewhere, lurking off screen.  You can’t get to it by clicking, but you can by tabbing.  So:

  1. Click the Default search combo so that it has the focus (i.e. it is highlighted in blue, as in the screenshot below).
  2. Press Tab.  The focus should move onto the Manage button.
  3. Press Tab again.  The focus highlight will seemingly disappear.  It’s actually on the Default Browser button.
  4. Press Enter. This will trigger the off-screen button, and you should see the message change to “The default browser is currently Google Chrome”.
Together at last
Together at last

Talk about playing hard to get!

July 24, 2009: 4:17 pm: DanSoftware Tools

In the last few weeks I’ve gone from someone who thought Twitter was the apex of pointless self-obsession to, well, someone who reads books about Twitter and then writes reviews of them.

While there is definitely more to Twitter than “I’m eating a ham sandwich” posts, it isn’t a complicated piece of software to use, either.  To get up and tweeting, you can get just a) go to Twitter.com, b) select a user-ID and password, and c) fill in the “What are you doing?” box.

Most Twitterers quickly go beyond this to using other Twitter software clients, integrating keywords like “RT” (retweet) and #hashtags into their posts and sampling the rapidly proliferating web sites that extend the Twitterverse in some fashion.

Still, is there really enough to Twitter to merit a book?

The answer is yes, albeit a short book.

Happily, the authors of The Twitter Book have resisted the temptation to pad the book with abstract musing about Twitter.  (One of the authors is Twitterato Supremo Tim O’Reilly — the guy behind the O’Reilly publishing empire — who currently has about 819,500 more Twitter followers than me, the guy behind the GigaMegaBlog publishing empire.)  The book is chock full of tips, suggestions and recommendations, most of which are not at all self-apparent to the average Twitter user.

For example, I had no idea that each Twitter post has its own URL, and only a vague notion of when to use the “via” keyword vs.  “RT” when referring to a tweet.  While a Google search on “Twitter” shows that there is no shortage of web sites that provide add-on features and services, I hadn’t used any of them until I read about the good ones in this book.

Sample page from The Twitter Book iPhone app
Sample page from The Twitter Book iPhone app

The book is well-written and an easy read, and you’ll likely find that it takes just a couple of hours to go cover to cover.  There are only 6 chapters, the last of which is devoted to using Twitter for business use.  Casual Twitter users should not be put off by that, however, since the other 5 chapters don’t have a “business book” tone.

I read the ebook version,  as an iPhone app.  The big advantage of this format, as of July 2009 at least, is the low price – just 5 bucks.  The big disadvantage, of course, is that you’re reading it on a 2 x 3″ screen.  Personally, I’m quite used to ebooks and don’t find this to be a drawback at all, but if you’ve never tried reading an ebook on an iPhone I’d advise you to download the free Stanza app first.  The Twitter Book, like all of O’Reilly’s iPhone ebooks, uses the same engine as Stanza with the same wide range of settings.

Another relatively low-cost option for the Twitter Book is O’Reilly’s Safari web site.  If you’re a frequent reader of tech books then Safari gives you a great bang for the buck – I can’t seem to help gushing about it.

The one area where I found the iPhone app format to be a constraint is graphics.  The books makes extensive use of screenshots to show examples of effective tweets, and the text in some of the graphics is a little too fuzzy to make out. As shown in the screenshot above, the graphics are reasonably large when in a landscape format.  If the above screenshot (which is at its full iPhone resolution) is readable then you should be fine, but otherwise this app offers no way to zoom in on a graphic. Correction 7/29: Silly me – I pinched and poked at the graphics without realizing that you can zoom in on them.  If you hold your finger down on a graphic, the app switches to a special view, shown below, that supports the usual iPhone zoom controls.

Zoomed screenshot
Zoomed screenshot

All things considered, The Twitter Book is a very worthwhile read, even for casual Twitterers.  If you’ve been tweeting for awhile and scoff at the idea of a whole book being devoted To Twitter, then you are exactly the type of person to benefit the most by reading it.

July 22, 2009: 6:28 pm: DanSoftware Tools

Grrr, what is the deal with PDFs and copying to the clipboard?

We all routinely copy and paste information from one document to another, right? Even the hipster non-readers on the iPhone design team have grudgingly conceded this point.  PDFs are still the most common document format out there, having survived for 16 years in the tech world remarkably unchanged.  Practically every gadget on the planet can display them, and an increasing number of them can generate PDF files too.   PDF documents are reasonably small, cross platform and, as of July 2008, a freely open standard.

So why is copying information out of PDFs so cumbersome?  If I didn’t know better (and I don’t), I’d wonder if there is some kind of evil conspiracy amongst copyright attorneys, software makers and the Knights Templar to safeguard their contents from the clipboards of the masses.

As far as I know the only piece of software that can fully handle copy and paste from PDFs is the ridiculously expensive full version of Adobe Acrobat.  Otherwise, copy support for PDFs ranges from the minimal (Adobe Reader and Foxit Reader, for example) to the absent (almost all smartphones, including the iPhone).

(Incidentally, one of the least mentioned improvements in the iPhone 3GS is that it the faster CPU has made it a top notch PDF reader.  Using the highly recommended GoodReader app I can load a graphics-laden PDF magazine and scroll and zoom through it with no lags or crashes.  Given that no other pocket-sized device supports copy and paste from PDFs either, the iPhone is now my PDF reader of choice).

I read a lot of technical stuff, almost all of which is released in PDF documents.  Like any self respecting geek, when I see something worth noting I don’t retype it, I don’t (shudder) write it down, I copy it.

It’s bad enough that PDF readers which support copy and paste insist on throwing line breaks willy-nilly into the text.   They make a real mess of it when it comes to tables, though. Each cell of the table gets copied as a separate line, resulting in a fugly mishmash of text that in no way resembles the original table.   Wasn’t one of the original ideas of the PDF that the document’s original format gets preserved across software platforms?

When Google Docs introduced a PDF reader I thought this problem had finally been cracked.  Copy and paste support for web pages has long ago been perfected, and tables copied the web into Word and any other HTML-aware word processor are automatically formatted as tables.  And Google is famously opposed to evil alliances with such as the Knights Templar.  Right?  Wrong!  Line breaks and tables have the exact same copy and paste problem as in other PDF readers.

It’s a sad state of affairs when the only salvation comes from the world’s most reviled document format: Microsoft Word.  Say what you will about fat, proprietary, insecure Word documents — there are, at least, clipboard friendly.

It seems that the creativity that should have been poured into PDF readers has, instead, been focused on support for Microsoft Word.  There is a staggering number of Word readers and converters to be found on the Web, most of them free and some of them very, very good.

My current method of choice is a web site named PDF To Word.  It does just this one thing, but it does it very well – it’s fast and its accurate.  It has replicated into Word pretty much every PDF document I’ve thrown at — the number of pages is the same, the page headers and footers are the same, and — hallelujah! — the tables are the same.

There are a few downsides with the PDF to Word approach – it often doesn’t exactly match the font type and size, resulting in odd looking formatting in things like columnar text or artsy magazine-style layouts.  Also, the size of Word documents is generally much larger than the source PDF file — a document with illustrations might triple in size.  This obviously makes large Word documents an impractical alternative to PDFs on memory-constrained devices like smartphones.

It’s nice to see Microsoft innovating again with Office 2010, but what I really, really wish they would provide is  a Web-based, clipboard-friendly PDF reader.  Of course, they won’t.  I blame the Knights Templar.

Next Page »