Wednesday, May 30, 2007

Be Inflexible

Will Shipley is a Mac programmer I'm growing to admire. Not that I write in anything besides Perl, but he has a fresh, simple approach to software design. As the amount of work increases in my group, and the more I am involved in early system design, the more I enjoy reading Wil.

The first thing I ever read of Wil's was his Student Talk from WWDC 2005 titled "How to Succeed Writing Mac Software: Or, How to Make a Zillion Dollars and Not Lose Your Soul". The PDF/Slides are great.

Today, he wrote about Brevity of code versus Flexibility. If you read nothing else, read this snippet:

In Delicious Library 2 we have a feature where we will automatically find the libraries of your friends if they have published them. Of course, with any matching system, the trick is, how do you know this is really *my* friend named "Mike Lee", and not one of the other 17 million "Mike Lee"s around the world (that whore).

So, I came up with a basic algorithm for pulling all Delicious Libraries by the owner's name first, then disambiguating within those afterwards. One of my programmers said, "Well, what happens if we get 1,000 hits for John Smith?"

And my reply, not at all tongue-in-cheek, was, "Well, then we would be very, very rich." Seriously, if 1,000 John Smiths had registered our program, think of how many customers we'd have total: millions. Multiply that by $40, and one possible response to the problem of "too many John Smiths" would be: "Who cares, let's all move to Tahiti and spend the rest of our lives on the beach sipping rum."

My take away: instead of spending time developing a robust system that can account for every corner case you can think of; build a lean, quick system that can solve the problems you have today, and solve the corner cases when you understand what they really are. Of course, that assumes that you really understand the problems at hand.
blog comments powered by Disqus