Simple APIs are good for experts as well as beginners

Originally posted to Shawn Hargreaves Blog on MSDN, Wednesday, February 17, 2010

A couple of commenters on my previous post felt the Game Studio API is already sufficiently easy to learn (thanks guys!), and pointed out that we can never hope to make it easy enough for everyone.

True that. The sarcastic British part of me wants to say something like "why even bother trying to help people who are too stupid and lazy to read the docs first?"

But then the lovey-dovey hippie part of me has to counter "remember, we were all foolish beginners once. Helping kids learn to program is super important if we want a healthy supply of experts in the future. Plus, it's just nice to help people, even if they do sometimes ask annoying repetitive questions. Group hug, everyone!"

Confession: I consider myself an expert programmer, and I know how to use a search engine, but I don't like to read docs. First, I try to solve most problems with a combination of guesswork, IntelliSense, and vague memories of an API I last used six months ago. If that doesn't work, I'll go do some reading, while thinking "stupid confusing API, wasting my time by not working the way I expected".

As a framework designer, part of my job is to increase how often things just work the way you guys expect them to.

Thought: for every hundred people who get stuck and ask a question on the forums, there are probably ten thousand who had the exact same problem, but knew how to use a search engine to answer it for themselves. If we could eliminate the source of the problem, that saves five minutes of reading for ten thousand people, which is a whole month!

Thought: in a world of ever increasing complexity, it is not possible to be expert in everything. Being an expert is hard work. You have to read manuals, subscribe to blogs, go to conferences, and somehow remember all the resulting information (if you are reading this, congratulations: you're already taking steps along the becoming-expert-in-XNA path.

I use System.IO and System.Xml pretty often, but never had the time or interest to become truly expert in them. The more intuitive an API, the more quickly a non-expert can solve their problem, without having to waste time and fill up limited brain space gathering knowledge from outside their core specialty. Should a network programmer have to become a graphics expert in order to render debug text to the screen? I think not.

As a framework designer, part of my job is to increase how often people can be productive even when working outside their areas of expertise.

Blog index   -   Back to my homepage