March 7, 2007
Humane Interface Design
Martin Fowler writes on his view on humane interface design, i.e. APIs that are designed for convenient use, in contrast to minimalist APIs. He states that
The essence of the humane interface is to find out what people want to do and design the interface so that it’s really easy to do the common case.
For example, Ruby’s arrays have convenience methods such as first, last, flatten, etc. which tend to be omitted in minimalist interfaces, because they can easily be implemented by clients. And Ruby also aliases method names, i.e. using multiple names for the same functionality, such as length and size of arrays. As an example for a minimalist interface, Fowler mentions the Java API for collections.
I wonder where Python falls in this spectrum. The Python folks state explicitly that
There should be one — and preferably only one — obvious way to do it.
Which sounds like a minimalist approach to me, in the meaning of “reduce stuff to the things that are canonically necessary”. But if you look at the APIs, you’ll find aliases there as well. I don’t know Python terribly well, so perhaps some Python guru can enlighten me on this?
Wrapping things up I don’t think that one approach – humane or minimalist – is necessarily better than the other. Both have their benefits and drawbacks, but like Martin Fowler I prefer humane interfaces.
Via One Man Hacking
Filed by Arne at 12:46 pm under design, java, languages, programming, python, ruby
.