Thursday, May 14

Book Review: Envisioning Information

Book Cover
I had this book on my reading list because I'd heard DHH praise it a couple years back. Although I'm just a lowly software developer, I've always had a fascination with user interaction and interface design. I devoured the books by Norman, Tognazzini, Nielsen, Raskin, etc. I was hoping to glean similar insight from this tome.

The Bad

Unfortunately, it's not an easy book to read. There's something about the author's style of writing that I found to be obtuse. The way he weaves his words I quite honestly couldn't tell most of the time whether he was praising or condemning a particular visualization technique. The book is peppered with a plethora of illustrations, maps, charts, diagrams, etc. with several on each page, but half the time I couldn't figure out which image the author was referring to in the text.

The Good

Regardless of the struggle to consume the verbiage, there are some gems of wisdom to be mined. The author drills home the concept of "1 + 1 = 3" in the sense of combining two simple visualization techniques can add a third dimension of information. This is demonstrated with both good and bad consequences. The author also stresses the avoidance of decoration that distracts from the data and information "prisons" such as thick dark grid lines or table borders that could be removed completely and simply implied by the layout of the information via white space or "negative shapes". The most impressive examples in the book are the train time tables - it's mind-boggling how much data can be cleanly and clearly expressed in a two-dimensional chart with the right finesse.

Sunday, May 10

Oh yeah, I produce a podcast now!

For some odd reason, it didn't dawn on my until now to pimp my podcast on my blog. It's called The Anachromystic Podcast and we've already got four episodes out. It's just me and my old friend Craig Walker talking about software development philosophies, techniques, technologies, and news. It's sorta half-way between Drunk & Retired (but not as salty) and StackOverflow (but not as much self fellating). It's on iTunes and plain old raw RSS. Please give it a listen and let us know what you think over at podcast@anachromystic.com. Thanks!

Wednesday, May 6

A better progress meter for your (Rails) scripts

As a follow-up to my post a couple weeks back on putting a progress meter in your long-running migrations, I've whipped up a more helpful and re-usable tool.

I've called it simply "Progress" and here it is in its entirety:

class Progress
require 'action_view/helpers/date_helper'
include ActionView::Helpers::DateHelper

def initialize(total, interval = 10)
@total = total
@interval = interval
@count = 0
@start = Time.now
end

def tick
@count += 1
if 0 == @count % @interval
sofar = Time.now
elapsed = sofar - @start
puts "been running for #{distance_of_time_in_words(@start, sofar)}"
rate = elapsed / @count
puts "at a rate of #{distance_of_time_in_words(sofar, (sofar - rate), true)} per item"
finish = sofar + ((@total * rate) - elapsed)
puts "should finish around #{distance_of_time_in_words(sofar, finish)}"
end
end
end

Usage is pretty simple. Here's an (slightly-abridged) example from a Rake task I wrote to clean out bad references to removed YouTube videos:

namespace :videos do
desc "Remove videos from SpumCo if YouTube also removed them"
task :purge => :environment do
videos = Video.find(:all, :order => 'created_at asc')
progress = Progress.new(videos.size)
videos.each do |video|
progress.tick
video.destroy unless video.still_on_youtube?
end
end
end

And what you see in the console as the script runs is periodic updates like so:

been running for less than a minute
at a rate of less than 5 seconds per item
should finish around 14 minutes

Friday, May 1

A slightly-better podcast recording setup

A few weeks back I posted about recording Skype calls on OS X using only freely available tools, and it worked out pretty well, but it had one annoying flaw: I could hear my own voice coming through the headphones, which often tripped-up my speech pattern. So I did some more Googling and I managed to cobble together enough scraps of information to workout a slightly improved version of my original configuration.

The two main differences from the original setup is the replacement of Audacity with GarageBand and the use of the 16ch in Soundflower instead of the 2ch.

1. LineIn: Choose the "Advanced" button, set the Output to the "Soundflower (16ch)", and set the Left and Right Channels both to "2". Why both on channel 2? Because channel 1 is what's going to be coming out of the headphones, and we don't want to listen to ourselves talk.

LineIn
Uploaded with plasq's Skitch!


LineIn Advanced Device Options
Uploaded with plasq's Skitch!


2. Skype: Set the input to your mic and the output to "Soundflower (16ch)" - it's going to use channels 1 and 2 automatically.

Skype Audio
Uploaded with plasq's Skitch!


3. Soundflower: Under (16ch), set Channel 1 to "Built-in Output[1]". That's going to be your left ear in the headphones. Set Channel 2 to "None" because, as we established above, your voice is going through there andyou don't want to hear yourself talk.

Soundflower Channel 1
Uploaded with plasq's Skitch!


Soundflower Channel 2
Uploaded with plasq's Skitch!


4. GarageBand: First make sure you've set the Audio Input to "Soundflower (16ch)", then select the track you want to record to - if you're using the old version like me, you can only record to one track at a time - and set the Input to "Channel 2 (Mono)". Remember that's the aggregation of Skype and LineIn, so GarageBand is going to record both you and the caller.

GarageBand Audio MIDI
Uploaded with plasq's Skitch!


GarageBand Input Channel
Uploaded with plasq's Skitch!