Leap before you look?


Gordon Segal, founder and CEO of Crate and Barrel, says lack of wisdom is the reason his store got off the ground.

“We didn’t know anything about retail,” Segal recalled. “I had grown up in the restaurant business, so I knew about service but not about retail. We didn’t know a market from a markdown. We didn’t know anything about importing. In fact, if we weren’t 23 and totally lacking wisdom, we would never have done this. You just go ahead with your passions, and you rush forward without a great deal of thought,” Segal reflected…

“We were truly a counter-culture story of the 1960s,” Segal said. “We literally turned over packing crates, stacked up the merchandise and went into business. We just thought that was nothing special. Of course, everyone walked in and was amazed that these two young kids were starting this business, that we could find French pottery and Swedish glass and Danish flatware and bring it to a small, little street in Chicago called Old Town. It was really crazy, when I think back, that we felt that we could import product into a little 1,700 sq. ft. store.”

Makes you wonder: How many others have succeeded because they didn’t know the rules? Because they didn’t realize that they were doing things they weren’t supposed to be doing?

We’re always taught to look before we leap, but it’s interesting to hear about the Segals of the world — those who succeed by rushing forward without thinking.

But doesn’t wisdom lead to success? Sure, it often does. But sometimes the winners are those who don’t have a lot of wisdom. Look at NFL quarterbacks. Routinely the best ones aren’t the brightest.

All quarterbacks drafted into the pros are required to take an I.Q. test—the Wonderlic Personnel Test…Of the five quarterbacks taken in round one of the 1999 draft, Donovan McNabb, the only one of the five with a shot at the Hall of Fame, had the lowest Wonderlic score. And who else had I.Q. scores in the same range as McNabb? Dan Marino and Terry Bradshaw, two of the greatest quarterbacks ever to play the game.

Maybe these quarterbacks succeed in part because they don’t have the highest IQs. Maybe they go with their gut instead of overanalyzing things.

Now, I don’t want to sound like I’m celebrating ignorance. Leaping before you look isn’t the best way to, say, invade a foreign country. But if you’re doing something with a little less downside — like starting a business — maybe you’re better off ignoring all the naysayers who tell you that you need to spend tons of time and money on planning, researching, testing, educating yourself, studying the competition, etc. Sometimes there’s real value in not worrying about what you don’t know and just putting something out into the world.

PHOTO: Peculiar error from QuickBooks Pro. You can


quickbooks-invalid.png

Peculiar error from QuickBooks Pro. You can’t enter a $ into an accounting app? Sure, the dollar may be invalid sometime in the near future, but…

Mr. Moore gets to punt on sharding

Sharding is a database technique where you break up a big database into many smaller ones. Instead of having 1 million customers on a single, big iron machine, you perhaps have 100,000 customers on 10 different, smaller machines.

The general advise on sharding is that you don’t until you have to. It’s similar to Martin Fowler’s First Law of Distributed Object Design: Don’t distribute your objects! Sharding is still relatively hard, has relatively poor tool support, and will definitely complicate your setup.

Now I always knew that the inevitable day would come where we would have no choice. We would simply have to shard because there was no more vertical scaling to be done. But that day seems to get pushed further and further into the future.

More...

Design Decisions: Saying more in less space on the new Highrise site

Last week I took you through the Highrise signup chart redesign.

This week I want to talk about part of the Highrise home page redesign that we’ve already redesigned. The design is alive – we’re making a lot of small tweaks post launch.

Original: In the cards

When we launched the new Highrise site, we had a block in the middle of the page that looked like this:

Three “cards” as we call them. Each card highlighting a major feature of Highrise. The idea was to rotate these cards every once in a while. They looked good and gave the page a nice splash of color, but they didn’t communicate very well. We were using 163,566 pixels, but we weren’t really saying anything.

Redesigned: In the icons

So we decided to make a change. Instead of using all that space to advertise three features, we thought we’d try using it to communicate eight benefits instead. So in a couple hours we came up with this:

Eight benefits, concisely explained, each with an icon for some color and identity. Now that block says something. There’s more to swallow, but it’s easy going down. And it’s only 98 pixels taller than the cards design. Here’s the overlay (the red is the extra height):

More...

iPhoto ‘09 and Domain Language

There are only two hard things in Computer Science: cache invalidation and naming things. —Phil Karlton

Karlton’s quote isn’t just for techies. Interface designers are in the business of naming things too. We’re copywriters. It matters if we call something an Event or a Milestone or a Deadline. And it also goes deeper than that. The names we choose shape our software. They define the way we think about it and the way our customers interact with it. To understand why this all matters, you should meet two important ideas from the programming world: domains and domain languages.

When you’re working on software, the domain is the life situation your software is involved with. Basecamp’s domain is the life situation where people are trying to collaborate together on a project. iPhoto’s domain is that situation where someone has a collection of photos and they want to look at those photos and share the photos with others.

Now here’s where it gets interesting. Each application has a way of approaching its domain. Software designers think of a domain like a big cake and cut it into slices. Basecamp cuts project management into Messages, Files, Milestones, To-Dos. Photo organizers before iPhoto ‘08 always sliced their domain into Photos and Albums. In both cases, the software designers take a complicated life situation and boil it down to a few easy pieces with names. No domain comes pre-sliced—unless you’re blindly copying someone else’s software. It’s up to the designer to cut the pieces and give them names.

This process results in a domain language. A domain language is the set of words that reflect the way you cut up a domain. It consists of the pieces you sliced and the names you chose to give them. This language defines an application and makes it special. And for the last couple years Apple has been innovating iPhoto’s domain language very intentionally.

Before iLife ‘08, iPhoto’s domain language was the same as any other photo app. You had Photos and you had Albums. Then in iLife ‘08 something changed. Suddenly you also had Events in the mix. This is huge. Apple realized that people don’t just want to find photos. Go back to iPhoto’s domain: it’s that situation where you have a bunch of photos and you want to look at them and share them. When you’re in that situation, you don’t just want to see random photos. You want to see and share photos of certain things. Like photos of your wedding, photos of your trip to Maine, or photos of that dinner in Paris. These are Events. They’re part of the domain, and as of iLife ‘08 they are expressed in iPhoto’s domain language.

iPhoto ‘09 has kicked their language up a notch further. Now in addition to Events, there are also Faces and Places. Apple has made a few new slices into the photo organization cake, and they’ve opened up a new field of possibilities for people to find and enjoy their photos.

Keep this in mind the next time you’re designing an app or a feature. There is a strong tendency to use the same words that you see other software using. Be cautious about copying domain language, because copying language is copying a whole approach. Think through the domain yourself. What are people trying to do? What do they care about? Find your own language to cut closer to the bone and touch your customers’ real interests. Your software will be all the better for it.

Making Highrise faster with memcached

Last week I set out to improve the performance of the Dashboard and Contacts tabs in Highrise. Both tabs would frequently be much too slow. Especially the Contacts tab, which for our own account some times could take upwards two seconds to load.

The number one rule for improving performance is to measure, the number two rule is to measure some more, and the third rule is to measure once again just to be sure. Guessing about performance never works, but it’s a great excuse to get you out in the weeds chasing phantom ponies.

Looking outside the epicenter
So I measured and found that part of the problem was actually not even part of the epicenter, the notes and the contacts. In fact, we were wasting a good 150ms generating New Person/Company form sheets all the time (through a complicated Presenter object that’s high on abstraction and low on performance). Even though these sheets were the same for everyone.

That left me with two choices: Either I could try to speed up the code that generated the forms or I could cache the results. Since speeding up the code would require taking everything apart, bringing out the profiler, and doing lots of plain hard work, I decided to save myself a sweat and just cache. People using Highrise couldn’t care one way or the other as long as things got faster and frankly, neither could I.

I ended up with this code:

<% cache [ 'people/new/contact_info', image_host_differentiation_key ] do %>
  <%= p.object.contact_info.shows.form %>
<% end %>

This cache is hooked up to our memcached servers for Highrise. The image_host_differentiation_key makes sure that we don’t serve SSL control graphics to people using Safari/Firefox, but still do it for IE, in according to our asset hosting strategy.

Good enough performance
But saving 150ms per call wasn’t going to do it. So I added memcached caching to the display of the individual contacts and notes as well. The best thing would of course be if I could cache the entire page, but since Highrise is heavy on permissions for who can see what, that would essentially mean per-user caching. Not terribly efficient and hard to keep in synch. So instead we just cache the individual elements and still run the queries to check what you can see.

It’s not the fastest approach in the world, but remember that performance optimization is never about the optimal, it’s about the good enough. Performance is a problem when it’s a problem, but otherwise it’s just not relevant. People are not going to feel the difference between a page rendered in 50ms and one rendered in 100ms, even though that’s a 100% improvement. Especially not when you consider that each Highrise page also loads a bunch of styles, javascripts, and images. It’s just not relevant at that point.

All that was needed in the end to make Highrise considerably faster was these five caching calls we do in the view:

This helped bring pages that before could easily take over a second down to 100-400ms range. Much more acceptable. Our general rule of thumb is that most pages should render their HTML on the server in less than 200ms and almost all in less than 500ms. That feels like a good compromise of good enough performance. Of course we have lots of actions rendering in way less than that and also some that are still above that range.

Accidental gains
As I pushed these improvements live, I was tailing the production logs to get a cursory overview of how the caching was improving repeated calls. That turned out to be proven nicely so, but I also noticed something else. Generating the Atom feeds that I kept seeing in the log was taking an awful long time. Many would take 500ms or so. Nasty when you see the same request come in again and again!

Thankfully Highrise had just been updated to Rails 2.2 as part of this improvement run anyway, which meant that we had access to the new HTTP freshness features. I quickly added a few ActionController::Base#stale? calls and immediately saw the beauty of “304 Not Modified” responses flying back over the wire. Meaning that we were no longer regenerating a response for a client that already had the latest version. HTTP is peach!

I also noticed that we were fielding a lot of sorta-expensive API calls from a known 3rd party and gently wrote them an email asking for etag and last-modified header respect, so they wouldn’t tax our servers if they already had the latest info.

Together all of these changes lead to a ~30% drop in average response times as measured by New Relic. Not too shabby for a handful of caching calls.

QUESTION: Where should we take 37signals Live? We’d

Where should we take 37signals Live? We’d like to do more live audio/video content, but what sort of topics or content or concepts would you like to see us cover in 2009?

QUOTE: Beauty is more important in computing than

Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defense against complexity.

—David Gelernter, Machine Beauty: Elegance and the Heart of Technology