"Humane" programmer interfaces

Kent Johnson kent at kentsjohnson.com
Fri Dec 23 08:29:45 EST 2005


Dave Benjamin wrote:
> There's been a lot of discussion lately regarding Ruby and the notion of 
> a "humane" interface to objects like arrays and maps, as opposed to
> "minimalist" ones. I believe the article that started the debates was 
> this one by Martin Fowler:
> 
> http://www.developertesting.com/archives/month200512/20051218-HumaneInterfaceOfMinimalInterface.html 
> 
> 
> And this one was posted in response by Bruce Eckel:
> 
> http://www.artima.com/forums/flat.jsp?forum=106&thread=141312

It was actually Elliotte Rusty Harold's response to Martin Fowler that 
kicked of the discussion. The first one is here, there are several 
followups:
http://www.cafeaulait.org/oldnews/news2005December6.html

> One last comment I'd like to make is regarding the notion that 
> minimalist and humane are mutually exclusive. This is a false dichotomy. 
> According to Webster:
> 
> Main Entry: minimalism
> Pronunciation: 'mi-n&-m&-"li-z&m
> Function: noun
> 1 : MINIMAL ART
> 2 : a style or technique (as in music, literature, or design) that is 
> characterized by extreme spareness and simplicity
> 
> Main Entry: humane
> Pronunciation: hy-'mAn, y-
> Function: adjective
> Etymology: Middle English humain
> 1 : marked by compassion, sympathy, or consideration for humans or animals
> 2 : characterized by or tending to broad humanistic culture : HUMANISTIC 
> <humane studies>
> 
> Accepting both of these definitions as (potentially) ideal, we have 
> humane minimalism: a style or technique that is characterized by extreme 
> spareness and simplicity, marked by compassion and sympathy, in 
> consideration of humans. In a world of increasing software complexity, 
> this doesn't sound half bad to me.

ISTM that Python does better than Java or Ruby in finding a sweet spot 
between awkward minimalism (Java) and 
everything-including-the-kitchen-sink generalism (Ruby, at least in the 
List example that is being used so much).

Access to the last element of a list is a great example. Java forces you 
to use the awkward list.get(list.size() - 1). Ruby gives you the 
specialized list.last. Python generalizes to a way to access any index 
from the end, with list[-1] as a concise special case of a general facility.

I think this is one of the great strengths of Python - that those who 
create the language have been able to discover very powerful, general 
concepts and apply them broadly and consistently to solve a variety of 
problems.

Kent



More information about the Python-list mailing list