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

I hate wizards

As I am frequently working with Eclipse, I often stumble upon wizards - small dialog windows, which promise to ease my daily developer’s grind (pun intended). Let me state one thing - I loathe wizards.

For example, I had a Java class which I wanted to create a web service from. No problem, I thought, the Web Standard Tools in Eclipse have a wizard for that. Next time, I will do it by hand, because of several problems:

  • That specific wizard crashed in about two of three times I ran it
  • When it ran through, the wizard left me with a feeling that I had not learned anything about the process of creating a web service from a Java class. The only things I learned is to use some voodoo and guessing for which values I had to fill in the wizard’s forms.
  • The wizard did not tell me in advance which generated source code it would overwrite. So at first run, some of my troublesome hand-coded classes were overwritten. Thank God for version control.

As a conclusion, I tend to use wizards only when I …

  1. … am sure that the wizard solves a problem faster than (and in the same way as) I could write the code by hand.
  2. … have a rough idea of what the wizard is doing under the hood.
« Previous Page