Saturday, 13 October 2007

Framing Rails Tests: Tests are Requirements

I’ve ignored Rails Tests for too long. In fact, I’ve skipped over Test chapter in Agile Web Development with Rails in both the first and second editions. After fighting with the same bug over and over again, I knew now was the time for tests.

On the surface, tests seemed very un-DRY1 – like I’m writing the code twice – once to make it work and again to make sure it works. Rails is so good at minimizing dupliation and using scripts to generate things that might be duplicated – shouldn’t the generation of tests be auto-generated2. Plus, if I’m continually refactoring code and I have a test for each method – feels like I’d be continually rewriting the test. Argh. I’m too lazy for that.

This morning as Ben helped me fix a previously hidden bugs via a single functional test3 he framed tests in a way that finally clicked: Tests are requirements.

Also known as the Test Driven Development approach and it’s attractive for a number of reasons:

  1. Eliminiates separate, external, no fun, and less DRY, documentation
  2. Encourages tests to be written early and in English
  3. Puts the focus on refactoring the code, not keeping the tests synchronized.

1. Don’t Repeat Yourself, a core programming principle from early Ruby advocates.
2. I know they are when using the scaffolding. I haven’t found scaffolding to be useful for anything other than Wow-ing people in screencasts.
3. We didn’t even need to run the test to identify and fix the bug. But we did. Passed.

Friday, 12 October 2007

Monday, 8 October 2007

FeedHub: HAL, er MAPE, Filters Your Feeds

Graeme pointed me to FeedHub – another next generation feed filtering service. On first glance, it reads like FeedRinse – import a bunch of feeds, apply some filters, drop the resulting aggregated feed into your regular reader. The difference, FeedRinse’s filters are manual and FeedHub’s are automated.

My first hiccup with the FeedHub service: Registration.
Right on the top of their main page is a sign-in form with an OpenID link. I click it, authenticate, and enter my OpenID url and receive an error.

Huh? I guess they don’t automatically create my account – even though they have everything they need from my authentication to do so. Hmmm.

Back to the main page to cick the big ‘Register’ button – then another OpenID link. And a button to upload my OPML. Three attempts later, the OPML file stuck. Then they asked me questions about how much of the items I wanted, I chose “the most interesting stuff” (how do they know?) which seemed far more useful than “60% of the items”.

I then loaded up the feed url they gave me and was reminded:

“While you can normally expect to see new content in your feed every 3-4 hours, it will currently take 24 hours to start getting content in your new feed.”

While I wait for the propreitary, trademarked mPower Adaptive Personalization Engine to do it’s magic, I caught up on some early reviews of the service:

“One problem: for me it doesn’t work. It doesn’t pick the stuff I’d really like to read from my feeds. Almost none of the items match my link blog, for instance.” – Robert Scoble

Confirming what I’ve said before – I’m not confident with computers identifying what’s relevant or interesting to me. Spam is easier – there are patterns. I’m not convinced interestingness does.

UPDATE:
My lone FeedHub feed updated and it pleasantly surprised me. At the top of each item in the reader is a FeedHub control bar with a number of links including one I’ve only seen in one other service – 'don't show items like this'. Yeah for FeedHub. I’m less enthusiastic about the meme-organizer it feels more like a distraction and oddly disconnected from the reading process.

Friday, 5 October 2007

Unload

If the kitchen renovation has told me 1 thing it’s: when you empty one room in your house, every room in your house gets more cluttered. While I anxiously await the finished kitchen so the rest of the house can get back in order, I’ll be tracking Erica Mauter’s Cut the Fluff 30-Day Challenge:

“Every day, for 30 days (which began on Monday, October 1) we are required to pick something to give or throw away, which we will photograph before we toss them or set them aside to be given away en masse.” – Erica Mauter

Distraction Elimination Week: Day 4: Visual Field

There are 2 major visual field distrations; inside the monitor, outside the monitor.

First, inside the monitor:
Since 1997, my desktop background has been “Solid Gray Medium”. I’ve played with other shades of gray, but always found SGM to be the most neutral, keeping the focus on the applications I’m working in and making screenshots very easy. I’ve seen backgrounds that cycle through a photo library or show pictures of kids or pets. All of those are terribly distracting for me, especially since I don’t own any pets.

More recently, I’ve introduced a ‘clean out’ folder. This folder has 2 purposes; be the only thing on the desktop, be empty. The former is much more common than the latter. This is the ‘download folder’ for all browsers and where I send interesting URLs, text clippings, etc. It’s my non-email inbox. Like my email, I sort the items of my ‘clean out’ directory in reverse chronological order. Far easier than hunting down things in a cluttered Desktop.

Now, outside the monitor
This is the stuff in your office that peaks into your visual field. The door that’s not quite shut, the flickering light, the crocked picture, the pile of papers. There are 2 very effective ways to solve this problem; get a bigger monitor to hide them, actually getting out of your chair and fixing the things that are bugging you.

I encourage both approaches, as both will calm you make you ask yourself, “why haven’t I done this sooner?”

Thursday, 4 October 2007

Email Subjects are Irrelevant, Only Sender Matters

An email comes from you mom, your sister, your BFF. Does it matter what the subject line says?

No, you open it right up.

I suspect there are some commercial organizations you feel the same about. In my house, it’s DailyCandy, BabyCenter, Joyent, Amazon, our insurance agent, accountant, etc.

Any one of those organizations could send out message without a subject line and I can still guarantee they’d be read.

In light of this and a marketing conversation about subject lines and open rates, I asked around which item matters more. Sender came back nearly unanimous.

Makes me wonder if the customers requiring persuasion only by an arduously-crafted subject line are worth the trouble. They obviously don’t trust the sender – and a single email isn’t going to change that. An overall improved customer experience (including ignoring them) might start that process.

In addition – how many of the subject lines in your inbox right now are meaningful and accurately reflect the message body?

I checked Gmail, Yahoo Mail, Mail.app, and it’s not obvious how to remove the Subject column in any of them. Best I could do was in Mail.app – move the Subject column to far right and then expand the width of the other columns to push it out of sight. We’ll try this for a week and see how it feels.

City Pages – Exception that Proves the Rule

There’s a best practice in podcast-o-land:

Don’t go public with your podcast until at least episode 6.

Like too many local publication moves in this area – they’re far too focused on ad-supported page views to let the technology work for them – technology like RSS and downloadable files. At best what the City Pages launched was an mp3 blog. And that’s generous.

“It just dawned on me why City Pages hasn’t ever understood this. Traditionally, in order to get the City Pages, you’ve always had to go to a City Pages kiosk. You’ve never been able to subscribe to it.” – Aaron Landry

“I want to hear what didn’t make the piece” – Paul Schmelzer

Wednesday, 3 October 2007

Distraction Elimination Week: Day 3: Applications

I normally have around 10 different applications open and running at any given time – a persistent set of communications apps (Adium, Mail.app, SpamSieve), a couple browsers (Safari, Camino), and the 2-4 apps necessary for whatever I’m doing at the time.

Adium’s Preferences really let you dial it’s presence down.
In Advanced > Contact List > Window Handling select Automatically hide the contact list > While Adium is in the background.
This effectively hides Adium when it’s not the active application, like when you’re not sending messages.

Unlike Mail.app, Adium let’s you turn off the unread message icon in the Dock
Preferences > Advanced > Messages and uncheck Display a message count badge.

In Camino, I’ve turned off Flash animations – so much less annoying when they’re a click away. Preferences > Web Features and check Block Flash animations

Lastly, I played with Growl for half a day, while its purpose is to provide a single channel for all notifications, it was too much and felt like I was on a Windows box. If my job was to watch Growl all day, it’d be perfect. But that’s not my job.

Tuesday, 2 October 2007

Distraction Elimination Week: Day 2: OS X Finder

The human eye is extremely sensitive to changes in the visual field – especially in the periphery. The OS X Finder places quite a few distractions – changing things unrelated to the task at hand – in the edges of the screen.

Let’s eliminate them.

Start by opening up System Preferences:

Dock: Check "Automatically hide and show the Dock"
This will hide any dock-icon based indicators (unread mail, etc).

Bluetooth > Settings: Uncheck "Show Bluetooth status in the menu bar"
This keeps any change in your Bluetooth status from distracting you.

Energy Saver > Options: Uncheck "Show battery status in the menu bar"
This keeps the changing battery indicator from distracting you.

Sound > Options: Uncheck "Show volume in the menu bar"
The indicator that shows up when you change the volume is so much better.

Date & Time > Clock: Uncheck "Show the date and time"
It was the changing clock that started me on this quest to eliminate distractions. My replacement – the world clock Dashboard Widget.

Now open up Internet Connect, select AirPort and Uncheck
"Show AirPort status in menu bar"
This keeps changes in the wifi signal from distracting you (you’ll probably feel it in the page loads if something happens, to verify an issue, open up Internet Connect).

Tomorrow, we’ll go through some other apps. Until then Command + H.