Wednesday, January 31, 2007

A Website as a Language

Websites should be domain specific languages. The most popular sites are those which allow people to most easily communicate, so it seems like describing a website as a language is an excellent way to think about its design. Social sites like MySpace have an obvious communication slant, but even searches on Google are done to request that information be communicated to you. The whole notion of "Web 2.0" sites is predicated on communication between users. I am interested in more than "helping users communicate," however. How can designers build a website that is a "domain specific language" which lets its users express concepts and ideas that the original architects haven't even thought of yet?

No, That's Not What I Meant

I'm not talking about adding a forum to your website and calling it a night. I'm not talking about adding private messages between users. These features only extend English across the web. The very fact that they can be used across wildly different situations excludes them being domain specific. Specificity is important because it limits and simplifies communication. If you know that I'm talking about the Internet, I don't have to describe what type of "site" I'm talking about; you know I mean website. Specificity makes communication easier and more succinct. What I am talking about is making concepts in your domain easily communicated, manipulated, and related.

Can You Give Me an Example? has reviews in a specific format. Check out my helmet: it has 6 reviews, like a typical site, but at the top of the reviews it has "Customers most agreed on the following attributes". It is a very useful aggregate of opinions not easily communicated by standard review formats. If you click on " Write a Review," you can see that these agreed upon attributes are added by the reviewer in a particular format. People don't normally communicate this way; if I was talking with a friend I wouldn't say, "Strengths: light-weight, good ventilation, looks cool." But in this domain, it is useful to enforce a more specific syntax to express concepts about the helmet. If reviewers use this language, they get the benefit of getting their opinion of the product through to another person.

A counter example is craigslist: it uses natural language, and while it has some catageories to narrow down what you're looking for, it does little to help people express themselves. If you have ever searched for a specific product in your area, you know that there's not much the site helps you with. Even if I know that I want the Malm Ikea bed, there's no easy way to easily express this. There are no built in language constructs for "products," much less "beds" or styles of beds. This may be by Craig's design, but I suspect it has more to do with the trade-off involved in improving the site (needing to hire more people, needing to start charging for listings, etc.).

Why Should I Think About It This Way?

Designing a website like a language can make it truly extensible. Extensibility often happens by mistake: MySpace didn't know what it was getting itself into when it allowed users to totally customize their pages. Even though it's a big headache for them now, allowing it's users to better communicate to others was one of the main drivers of the site. Thinking about what users wanted to express, then building up a safe "language" for them to do so would have saved MySpace many headaches and avoided the CSS nightmare that has ensued.

Steve Yegge's post earlier this month also pointed to the importance of extensibility. His essential properties for great systems all point in one direction: being able to express concepts and continually build new ideas in your system. I believe many of his properties (command shell, extension language, plugin system, introspection) all derive from the same thing: a language that can express ideas in a domain, including itself. Preventing reboots is second nature to websites: you never see Amazon clearing all reviews from its website so it can start from scratch.

Secondly, developing a language that visitors can use forces you to think about what concepts they want to use. It's easy to think of features to add to a website: labels, user pictures, comments; but in order to understand what is useful to a user, you need understand what they're trying to communicate. This is similar to Joel Spolsky's activity planning except you need to go a little bit further and understand what a user is trying to say rather than what they're doing.

Amazon has added the ability to tag products, but it's barely getting any usage. Why? I think it's because customers are trying to categorize products much less frequently than they want to learn about the differences between similar products. Right now Amazon can't communicate comparisons to customers because it has no language to talk about the properties that customers care about. Which shoe is more durable? Which book is more useful for my research? There's no way for a reviewer to express these ideas in a way that can be combined with the opinions of others, compared to another item, and understood by a buyer. Instead of spending time implementing tags because other Web 2.0 companies had them, I would recommend developing something similar to PerformanceBike's reviews and letting customers compare them in ways they care about.

How Do I Develop This Language?

Domain specific languages, or DSLs, are relatively well known in the programming world. Martin Fowler has a good article on the subject. My advice on how to proceed starts like most other pieces of advice: know your audience. What are the basic ideas in your domain? For Yelp it's a business and its quality. For a poker forum its hands, bets, and cards. Now, how are customers trying to use these basic concepts to build more complex ones? What makes a restaurant appealing? What makes a a hand strong in a certain situation? Enable users to describe these ideas succinctly: a "star" rating is a good example. With a simple click, users can summarize their feelings about a place.

What questions are users asking? Can they express them on your site? Simple search is not good enough in most cases because its domain is too wide. Yelp has a separate box to express location because when searching for a business, users need to communicate what area they're interested in.

It's important to stay focused on flexibility during the design of your language. PerformanceBike reviews don't have a set number of check boxes for product attributes; they let users decide on their own. You're trying to provide the building blocks to users so they can build what work best for them, not build up a house you think they'll want to live in. Abstract upwards the types you think will important: programming languages have "integers" not the individual concepts of "1", "2", "3", "4".

Getting More Advanced

I'd like to be able to express more complex idea on websites I use. When a Yelp review has another business in it, it should be recognized as a specific object that the sites language knows about. I should be able to click on that business to learn about it, continuing the conversation. I want to easily ask a question: "What should I do for fun Saturday in San Francisco?" I is a concept that should be comparable to other people. San Francisco is a concept of a location in which to search. fun is a description of what type of businesses I am looking for.

Just like programming languages today, the website needs to be implemented. Perhaps my question will be translated into a database query that searches for businesses that have been highly reviewed by people who have rated other businesses similarly to me, constrained to San Francisco and with a tag of fun. The point is that I have a language to express my desire and the website has a way to express its response.


So what sites do you feel expressive on? Why? What are you doing to enable your users to communicate? Yegge said, "Features for non-technical end-users don't contribute to a system's lifespan. In the fullness of time, I believe programming fluency will become as ubiquitous as literacy, so it won't matter." Are your users literate in your website?

No comments: