July, 2011


29
Jul 11

A Lion Ate My Python

After upgrading to Lion I quickly discovered that many of my custom macros that depend on Python were broken. A busy schedule meant that I put off researching the issue. Fortunately DrDrang’s recent post shed some light on the issue.

It appears that Lion uses a newer version of Python (2.7) and also has a bit more restrictions when installing packages. If you want to get your python customizations back you’ll need to perform some maintenance.

XCode Update

Several blog posts (including DrDrang’s) recommend reinstalling Xcode 4 after upgrading to Lion. I figured it couldn’t hurt. Along the way, I also uninstalled Xcode 3.

Another Python Package Installer

In my research, I stumbled across a Python installer package to replace the easy_install mechanism. Distribute seems to be an actively developed fork of the setuputil. It’s worth taking a second to install.

 

curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
sudo easy_install pip

The Rest

For my particular needs, I chose to install a few packages to start with on Lion. Specifically, lxml, python-pinboard and parsedatetime

 

sudo pip install lxml
sudo pip install python-pinboard
sudo pip install parsedatetime


29
Jul 11

NVAlt Day

Today appears to be NVAlt day. Brett and Elastic Threads have exciting news about NVAlt 2.1 and the future of Notational Velocity. Not only is the new version Lion compatible but there are some fantastic new features like opening characters.


24
Jul 11

Re-downloading Lion [Link]

Nice solution from Don McAllister if you already upgraded to Lion but now want to make a USB installer.


22
Jul 11

Whole Disk Encryption on Lion [Link]

Great post on the Red Sweater blog with instructions to implement Whole Disk Encryption on Lion.


21
Jul 11

i7 Air [Link]

The Difference Between the Dual-Core i5 and i7 MacBook Air — Shawn Blanc

I’d add that the i7 is also better if you virtualize other OS’ through Parallels or VMware. Also remember, Handbrake is CPU intensive and benefits from Hyper threading.


21
Jul 11

Another Document Format [Link]

I love the concept of a self contained, interactive, multi platform document but I hate “players” and plugins. I would have preferred JS, HTML, CSS and Wolfram API calls instead.


21
Jul 11

On Text Files [Link]

Great series of essays by Dr. Drang that cover his evolution of writing everything in plain text files. His latest post discusses BBEdit and Textmate.


14
Jul 11

AppleScript in Lion

Nice round-up of the new features in AppleScript for Lion. Looks like Cocoa/ObjC is more exposed to AppleScript than ever. That includes a new template for Cocoa-AppleScript applets. I’m going to have some fun with this.


14
Jul 11

OmniOutliner Pro is Lion Ready

The Mac App Store (AppStore or App Store) just notified me that there was an update for OmniOutliner Pro. Sure enough the Omni guys have implemented Lion’s Auto Save, Versioning, Full Screen and Resume functions in OO. Now all I need is 10.7.

It’s pretty great that applications like my beloved OmniOutliner will be ready with Lion specific features on day one.


14
Jul 11

I Don't Need No Stinking License File

I’ve always struggled with solutions for managing the application licenses I own. I’ve bought a huge amount of software online and invariably that involves some horrendously long license number. Here’s just a few methods I’ve tried to keep track of these files.

  1. Email
  2. A text document
  3. An Excel file
  4. A Numbers document
  5. Bento

Bento

Bento seemed to hit a sweet spot for me. It allowed me to keep the license code as well as emails and additional registration details. It’s nice to look at and easy to do. One great feature is that in the table view, I can display a summary row that totals all of the purchase costs. I revisit this rather large number before I purchase more software as a reminder of how much I waste on applications I never use.

Bento also makes data entry easy. Since I built the template, it’s designed for me. The template has dropdown selections for my credit cards, the name of the Mac that it’s installed on, the registration emails I use, and many more. It even has a nice be image area to paste the application icon.

Acorn in Bento

The Problem with Bento

In preparation for the impending Lion release, I’ve been getting my application licenses in order. What I’ve been frustrated by is the Bento idea of file sharing. Usually I’ll just throw a file into Dropbox to make it available to all of my machines during an upgrade. That way, I really only need my Dropbox login in order to start installing and configuring a clean OS.1 Unfortunately Bento doesn’t play that way. Sure, I can setup symlinks as a hack around the issue, but that’s a lot to hassle on a new installation.

1Password

I’ve been a 1Password fanatic for years. I have used it for logins and passwords religiously and kept the ocassioanl secure note. Earlier this year Agile Bits dramatically improved the support for handling application licenses and registration codes. Unfortunately my Bento solution kept me from investigating further. Well, no more. I’m completely onboard the 1Password train.

Acorn in 1Password

Beginner’s License

I have 100’s of registration codes in Bento, so I knew this was going to be painful. And it was. While 1Password has an import tool 2 to import a CSV file and Bento can export to a CSV file, 1Password will only create Secure Notes or Logins from the imports. That’s not very helpful. However, 1Password does make the process of creating a new Application entry a bit easier by scanning the installed applications and automatically importing the icon and current version for the application. That’s pretty nice. Unfortunately there is still the business of manually entering all of the registration details. I also like to include any emails I received about the purchase as an attachment. While I can certainly drag each email into 1Password, an option to drag a whole group of related emails at once would be a big time saver.

1Password vs. Bento

1Password is the clear winner for general access and encryption. 1Password syncs through Dropbox. That means as long as I have the application installed and Dropbox connected, I can easily get access to all of the information I need to setup a new OS.

Bento is the winner for ease of use. I have configured custom fields with dropdown selections that speed up the process of entering serial numbers. For example, my three most commonly used email addresses for purchasing software, or the list of credit cards I use to purchase online. 3

Conclusion

In the end, I plan to stick with 1Password. I also plan to re-purchase as much as I can from the Mac AppStore so much of this problem should be mitigated by the complete lack of serial numbers.


  1. I am assuming Lion will give me the option of doing a clean installation.

  2. It’s very out of place and looks like it was tacked on as an after thought. It importer lacks the polish enjoyed by the rest of the application

  3. If you don’t keep a separate credit card for online purchases, then you are more brave than I. Also, I keep a very low limit on them.


13
Jul 11

More iPad Note Apps: We Might Have a Winner

There’s been a couple of new note apps 1 since my real-world review. Most of them still can not compete with Simplenote and Omnioutlner. However, I have found three very good alternatives. Notely, WriteRoom and Notability.

All three of these apps started out simple enough but they have evolved and matured into top of class text editors.

Notely; $1.99

Notely started out as a relatively barebones text editors. It had some rudimentary Dropbox syncing that required a manual sync. The last couple of updates included automatic document syncing and document sorting options that include sort by modification date (my personal favorite).

The features that really elevate Notely to the top of class for me are – Markdown preview – Markdown specific keyboard row – Send to OmniFocus

The additional keyboard row also includes keys for moving the cursor around by character or by word. There is also an easily accessible document info panel with word and character counts as well as file size and modification date. Finally, Notely has a send to OmniFocus function to drop a text note right into OmniFocus as a task. The document title becomes the task and the body of the document becomes the task note.

Notely also includes all of the features I expect in a text editor. – full screen writing mode – TextExpander integration – Font customization – Universal iOS app

WriteRoom 3; $4.99

I purchased WriteRoom from the day it became available. I’ve always been a fan of HogBay’s design style. Jesse is creative and careful and has a light touch with feature selection. Unfortunately it also meant that WriteRoom 1 & 2 didn’t really fit my workflow. I want all of my notes in one Dropbox folder. I have that folder constantly in sync with Simplenote so I can have additional options for editing and syncing. WriteRoom original had no Dropbox support and when it did gain support, it was locked to a single WriteRoom folder. WriteRoom 3 has really found the sweet spot for me. Not only does it automatically sync with any Dropbox folder, the app is one of the best designed text editors I have used. Here is a sampling of what makes WriteRoom a clear winner.

  • Elegant design
  • Automatic and Manual Dropbox syncing to any folder
  • Customizable keyboard row
  • Fullscreen mode
  • Custom cursor-move tap zones
  • Full font customization

Of course there are many more little touches like an option to disable autocorrect. WriteRoom 3 for iOS is a mature text editor that will be replacing Simplenote as my editor of choice.

Notability; $2.99

Notability is a very different kind of app from the other two. If WriteRoom is a simple Moleskine for iOS, Notability is a TrapperKeeper. It is a full blown note-taking suite.

The app is pretty. The note-taking environment can be customized to suite individual tastes. Fonts and note colors are mutable and have several options to choose from. Notes can be organized into dividers. Dividers can be customized with titles, colors and icons and are displayed in a simple list view. Dividers can be further organized into folders. In this way, many different notes can be grouped in logical order and easily navigated.

The organizational options are just the icing on the cake. Notability really shines in the options for entering and later extracting information.

Adding Information

  • Add text anywhere on the left margin by tapping
  • Import an image and add a caption
  • Add a hand drawn sketch from a custom free hand sketch tool
  • Wrap text around images
  • Record audio
  • Use the built in web browser to search for content and embed in a note

Exporting Information

  • PDF
  • PDF + audio files
  • RTF
  • RTF with embedded images and audio
  • Notability native file for sharing

All exports can be saved to Dropbox, iDisk or WebDAV as well as emailed directly from the app or printed through AirPrint. My complaint with many of the alternatives was that they only provided a PDF export and I wanted access to my raw text. Notability scratches that itch.

Audio

The audio recorder is especially nice for a conference. Each recording is added in sequence to a timeline. You can also play the timestamped recording by selecting it in a list. Whether you want to record an entire presentation or quick audio notes to yourself, this is the way a voice recorder should work.

Images

Images can be added from almost anywhere. There are built in shapes, freeform drawing, access to the camera and camera roll and an excellent webclip tool. Visit any URL and it will grab the page as an image and insert it into your note. There is also full copy and paste support for images in a note. The only missing tool is the ability to rotate an image after it’s been added.

The only downside to this app is the lack of direct Dropbox or WebDAV syncing. If I am going to enter a large amount of information into a notebook, I want it to easily2 out live the lifetime of the device lifecycle.

I’d also like to see TextExpander support to more easily add Markdown notes.

Notability seems to be hitting a very nice balance between features and bloat. There’s just enough there to make it competent for taking notes in a meeting (which I have proven to myself) but not so much that you have to visit a help section every 10 minutes.

Conclusion

Here’s my conclusion: WriteRoom has replaced Simplenote on my iPad springboard dock and Notability is on the first screen of my iPad.


  1. I really only look at these apps when I see a new one that supports Markdown and/or Dropbox and Simplenote syncing.  
  2. By “easily” I mean with very little effort on my part. I do not want to export and then reimport hundreds of notes when I get an iPad 3.  

12
Jul 11

Life Threatening Software

In case you thought software development was all fun and games, read the story of the Therac-25. I have participated in software validation for FDA regulated equipment. This kind of event is unlikely to be discovered during normal testing. I would guess that medical equipment has a much more detailed and lengthy testing protocol than what I have written.


11
Jul 11

Instacast Backups

If you are like me, then Instacast is constantly running on your iPhone. I no longer download any podcasts for syncing to iOS or AppleTV. I have Instacast on iOS and the AppleTV 2 has streaming of “favorite” podcasts.

However, now I need to remember to regularly backup my podcast subscriptions from Instacast. If I lost my iPhone it would take quite some time to remember what the names of all my favorite shows are. Well, actually most of them are 5by5 shows so I guess I could easily recreate about half of my subscriptions.


10
Jul 11

Keyboard Maestro: Post to Pinboard from clipboard

I’m really digging into the new features in Keyboard Maestro 5. In particular, there are some great new options for getting and setting variables. I figured that KM is now mature enough to return to some problems I never found an elegant solution for. And by elegant, I mean a solution that did not involve a huge AppleScript.

The first thing I focused on was a system wide function to take a url from the clipboard and post it to Pinboard.in. I’ve wanted this for awhile and I decided it was a good excuse to learn more about KM5.

Here’s what I developed1:

Copy a url anyone on the mac to the clipboard. Run the macro and new bookmark is added to your Pinboard.in bookmarks with optional tags and the correct page title.

The key work of posting the bookmark to Pinboard is accomplished by a Python script implementing the Python-Pinboard library. To use the script, the Python can be installed by using the Easy Install method I wrote about earlier.

Sidetrack

If you plan to install a lot of libraries from GitHub, it’s worth it to install the pip library. This can be done by executing the following:

easy_install pip

Now you can use pip to install directly from GitHub with the following command:

pip install -e git://github.com/mgan59/python-pinboard.git@v1.0#egg=python-pinboard

Pip is really a replacement for easy_install so once it’s installed, you can use it as a complete replacement for easy_install.

The Python Script

The Python script does several key things. The first is to read in all of the variables created by Keyboard Maestro. Next, the script uses the url on the clipboard to grab the page title. This is crucial since Pinboard requires two pieces of information to make a new bookmark, the url and the page title. I needed to add a bit of a bug fix after trying to bookmark one of Brett Terpstra’s pages that had a non-ascii character in the title. Python was throwing a unicode conversion error without the string encode function.

Finally, the script attempts to post a bookmark to Pinboard.in. The output from the Python script is stored in a new variable that is used for reporting back the outcome.

Variables

The first lines in the Python script after the import statements grab all of the system variables generated by Keyboard Maestro. The addition of variables in KM5 is convenient way to pipe information in and out of shell scripts. All variables in KM5 are accessible through a reference to the system variable$KMVAR_ where spaces are replaced by underscores. The are two significant limitations to these variables.

  1. They are read-only.2 Their values can not be changed by the shell script.
  2. Password-type variables can not be accessed by scripts.

Even with these limitations, there are exciting new possibilities for variables in KM5. The Pinboard macro only shows a small sampling of possible uses. Here are some the ways I use variables in this macro.

  • I use KM variables to hold the login account and password for my Pinboard account.
  • KM sets a variable to the contents of the clipboard for use in the Python script.
  • The output from the Python script is stored in a variable.
  • The Growl and Alert boxes use Tokens for the variables to display information about the state of the macro. For example this line: Pinboard Post for %Variable%postStatus% Complete displays the Growl message with the title of the bookmark that was added to Pinboard.

Messages

The final steps of the macro are simply to notify the user as to whether the bookmark posting was successful. A successful post is followed by a Growl notification. A failure is shown in a persistent alert window. I chose this option so that I could troubleshoot the issue without the error message disappearing.

Enhancements

I’m still considering adding a couple of steps to the macro that writes the URL and outcome to a log file. It would be a nice record of how the macro performs and provide a quick text file of newly added Pinboard bookmarks.

Postscript

During the development of this macro I contacted Keyboard Maestro support (Stairways Software) by email with a couple of questions about the new functionality. I received detailed responses within a few hours from the founder Peter Lewis. Their support is simply fantastic. The documentation can be a little sparse but I found that their support easily fills in the gaps. It’s that kind of support that makes me excited to continue making tools that depend on their application.

More to come on new KM5 macros…


  1. You can find the macro for download on GitHub https://github.com/macdrifter/KeyboardMaestroMacros

  2. AppleScript can change a variables value through scripting directly to the Keyboard Maestro Engine.


9
Jul 11

Is Everything Getting Harder? [link]

I’m not sure what the answer is, but the data is interesting. I’ve worked in the pharmaceutical industry for over a decade and there are a lot of hard problems still to be solved. But return on investment is still the hardest problem for the industry.