Wednesday, January 16, 2008

There is a reoccurring misconception that I've seen at several job sites now. Developers seem to be proud of their API, Framework or Library because of how few lines of code the user needs to write, without concern for how many concepts a user must understand. A well written Library will expose as little of its implementation as possible. It will provide a single mental model for the user and a consistent way of interacting with it. While generally, this results in less repeated code, the success of the library cannot be judged on a strict line count.

Too many times, I've seen internals of a library exposed for the sake of removing a 2-3 lines of code from the caller (usually a simple if or for loop). The result is often obviously messy APIs, and a lot of learning on the user's part. It seems that when developing APIs for use internal to their company, developers simply don't have much regard for usability.


Post a Comment

Subscribe to Post Comments [Atom]

<< Home