Review: The Productive Programmer by Neal Ford

This is a great grab-bag of detailed tips (“Mechanics”) and general approaches/philosophies (“Practice”) for helping serious programmers be more productive (this isn’t a book for the average user). Most programmers know that the difference between an okay developer and a great one isn’t fractional, it’s an order of magnitude or more. The ideas here are part of that body of knowledge that makes for great programmers.

Many readers will find sections where they say “yeah, I know this stuff”: if so, pat yourself on the back as a seasoned developer. But more likely you’ll find at least a few tips worth trying, or be reminded of something you never took the time to try out (but should have: how did I miss multiple desktops for Windows?). Those little gems are worth the price of this book, and you can easily skip the rest. The key to books like this is to set aside a little time each day for improving your craft.

Along the way, Ford’s notes supply zen-like snippets of programmer wisdom:

  • “Search is faster than navigation”
  • “Don’t spend time doing by hand what you can automate”.

and dozens of others. You’ll even learn a little history about Aristotle, Occam, and other subjects. Definitely recommended (if taken as directed).

I review for the O'Reilly Blogger Review Program [Full disclosure: I received a free copy of this book as part of the O’Reilly Blogger Review Program. But i would have read it anyway. ]

Shoutout for Audacity (and FOSS)

Since so much of my days involve pressing against intransigent data problems under they (or i) yield, i love it when things “just work”. I had such an experience a few months back with Audacity, an open-source audio recorder/editor. So i want to give a little back to the Free and Open Source Software (FOSS) movement with some well-deserved praise.

I’ve used Audacity before for some home recording projects, and it’s one of the most popular projects on SourceForge, so nobody who knows about it is likely to be surprised. My task this time was to find a way to convert more than 6000 audio files in WAV format to MP3 (so they take less space: if you’re a Logos customer, you’ll be hearing more about these — literally — in a future update). I really did not want to do

  1. open file
  2. select export
  3. fiddle with parameters
  4. open save dialog
  5. pick a filename
  6. hit save

times 6000!

A quick Google showed that the current Audacity beta provides a batch processing feature. I downloaded it without a hitch. The download page helpfully pointed out i also needed to get an MP3 encoder library (which i remembered from a previous install): also no problems.

First hitch: the documentation here is a little off, there is no Batch tab on the Preferences dialog. Another 60 seconds of search on the Wiki site found this page with the correct information: you do File > Edit Chains to set up the processing sequence, and then Apply Chain to apply it.

I tried a few files, seemed to work okay. When i audaciously tried to do all 6667 files in one go, there was some problem (but that really seemed like too big a bite anyway). So i backed off to groups of a thousand or so. I hadn’t even noticed there were some non-audio files in the directory: Audacity understandably barfed on these, and i had to restart the process after their failures. There were a few other glitches with temp files that couldn’t be saved, but i just kept restarting things.

Was it perfect? No. But come on … conversion of 6000 files took maybe an hour, and cost me nothing. How can you not like that?

Bookmarklets Redux

Time spent on the web can be oh-so tedious if you’re constantly cutting things from one page and pasting them elsewhere just to get to another, related page. Someday Linked Data may make this all better, but until then, we all get by with helpful tricks.

Bookmarklets are one essential weapon in the arsenal of the web-info-warrior. Usually they’re little JavaScript programs stored as a bookmark in Firefox, providing one-click access to some simple functionality like looking things up elsewhere, resizing your window, etc. I’ve blogged previously about bookmarklets to find local library sources for a book on an Amazon page (or PaperBackSwap).

I dusted off my bookmarklet skills this past week and came up with some nifty tools that i wanted to share.

First off, imagine you’re looking at a website with Bible references whose benighted author somehow failed to include RefTagger. So rather than a nice pop-up with the text of the reference, or even a helpful link to that text on some Bible site, you’re just looking at a inanimate, unlinked string: boo. The Bible Reference Bookmarklet to the rescue! Simply select the text of the reference, click the bookmarklet, and you’ll be whisked off to that reference at Bible.Logos.com. If you haven’t selected any text first, you get a dialogue box asking for it.

To get this goodie in Firefox, first make sure the Bookmarks Toolbar is showing (View > Toolsbars > Bookmarks Toolbar must be checked). I’d love to give you a link to just drag onto the toolbar, but i don’t seem to be able to get the code past WordPress. So go to Bookmarks > Organize Bookmarks, and select Organize > New Bookmark. Give it a useful name like “Bible Reference Lookup”, and paste the code below in Location field.

javascript:(function(){%20function%20getSearchString%20(promptString)%20{%20s%20=%20null;
if%20(document.selection%20&&%20document.selection.createRange)%20{%20s%20=document.selection.createRange().text;%20}%20
else%20if%20(document.getSelection)%20{%20s=%20document.getSelection();%20}%20
if%20(!%20(s%20&&%20s.length))%20{%20s%20=prompt(promptString,'');%20}
%20return%20s;%20}%20searchString%20=%20getSearchString('Bible%20Reference%20to%20look%20up%20:');%20
if%20(searchString%20!=%20null)%20{%20if(searchString.length)%20{%20location%20='http://bible.logos.com/#ref='+escape(searchString);%20}%20
else%20{%20location%20='http://bible.logos.com/';%20}%20}%20%20})();

After you’ve clicked ok, you should see it on your toolbar.

You can do similar tricks for a wide variety of strings that you just want to look up elsewhere (i discovered one here while writing this post that lets you look up articles on Wikipedia). This isn’t fundamentally different from copying the string into a search box: but sometimes it’s more convenient.

Descending into more esoteric purposes (to give you ideas for your own bookmarklets): as part of an earlier post on Tools for Personal Knowledge Management, i mentioned my use of TiddlyWiki for quick organization of hyperlinked notes. Like other wiki software, TiddlyWiki has its own link syntax, that looks like

[[Link text | URL]]

When linking to lots of other web pages, i was getting tired of copying the URL, pasting that in, then typing the square brackets, link text, vertical bar, and more square brackets, all in the right format. Wouldn’t it be more convenient to just construct this expression from the title of the page and its URL, rather than having to type it myself? YES! and the TiddlyWiki Page Link bookmarklet does just that, putting the result in a little pop-up window where a triple-click selects the whole thing, ready to copy and paste into your tiddlywiki (and tailor as desired: the title isn’t always what you want, but it’s often easier to edit and throw things out rather than type afresh). This one you can just drag to your bookmarks toolbar and use right away.

TiddlyWiki Page Link

Also, i’ve switched to a much better library lookup bookmarklet (and a service to help you create one for your local library) from WorldCat. Among other things, it generates the list of all the different ISBNs that might exist for a title (which can be very long indeed), and when there are many, it provides links for alternate searches in case the first group comes up empty handed.

Some other cool bookmarklets in my collection include:

  • CiteULike Popup Post and kin to make it easy to add (certain kinds of) articles to your reading list management. Adds more value for sources whose structure it understands.
  • Show del.icio.us citations of the current URL (you can find it there)
  • Resize your browser window to 1024 x 768 (if you want to see how a page will look on a smaller monitor or projector): the bookmarklet follows, just drag to your toolbar. 1024 x 768
  • A CSS validator for the current page: see Pete Freitag’s page.

Hat tips: