Affordance Open-Space at XP Day

Giovanni Asproni and I facilitated an open-space session at XP Day on the topic of affordance in software design.

Affordance is "a quality of an object, or an environment, which allows an individual to perform an action". Don Norman distinguishes between actual afforance and perceived affordance, the latter being "those action possibilities that are readily perceivable by an actor". I think this distinction applies as well to software programming interfaces. Unless running in a sandboxed execution environments, software has great actual affordance, as long as we're willing to do the wrong thing when necessary: break encapsulation or rely on implementation-dependent data structures. What makes programming difficult is determining how and why to work with the intentions of those who designed the software that we are building upon: the perceived affordance of those lower software layers.

Here are the notes I took during the session, cleaned up a little and categorised into things that provide help affordance, hinder affordance or can both help and hinder.

Helping

Repeated exposure to language you understand results in fluency.

Short functions

Common, consistent language.

Domain types.

Good error messages

Things that behave differently should look different.

Able to explore software:

TDD, done properly, is likely to make most important affordances visible

Hindering

Two ways software has bad affordance:

Null pointer exceptions detected far from origin.

Classes named after design patterns incorrectly.

Inconsistencies

Names that have subtly different meanings in natural language and in the code.

Both Helping and Hindering

Conventions

If you break convention, draw attention to where it has been broken.

Naming types after patterns

Bad code style you are familiar with does offer perceived affordance.

Bad design might provide good actual affordance.

Method aliasing:

Frameworks:

Documentation vs Tests

How do we know what has changed between versions of a software component?

Copyright © 2013 Nat Pryce. Posted 2013-12-02. (Permalink, Share it)

Comments powered by Disqus