Great Devs Write Great Error Messages

Nothing annoys me more than spending an hour, sometimes a lot more, trying to figure out if my use of library code is correct or if the library itself is broken.

In my experience, great developers go the extra mile to catch common misuse patterns and provide succinct and helpful error message and guidance.

Here’s my example of the day from Steve Sanderson’s Knockout.js library:

Error: Multiple bindings (with and template) are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.

Even if you don’t know a thing about the Knockout.js library, you can likely guess from the error message that this is good old fashioned pilot error on my part.

This is really amazingly helpful because if not for this message I likely would have spent 10-20 minutes coming to the same conclusion on my own as (a) this is my first Knockout.js project and (b) as usual I’m trying to do about the hardest thing I can think of 🙂

I look for this attention to detail when I take dependencies on other’s people’s code and strive to do the same in my own creations.

Nice job, Steve! Thanks!

Advertisements

About Chris Russell

http://www.chrisrussell.net
This entry was posted in Internet, Open Source, Software and tagged , , , , . Bookmark the permalink.

Comment on this article

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s