Form vs Affordance

Mathematics is the study of structure - it asks the question “what is this thing?” Calculus lets you describe the structure of motion; geometry describes the structure of shapes.

To study structure, math sets out rules that describe structure - “a square has four equidistant sides.”

This sits quite uncomfortably with normal human intuitions about how to explore problems. Human intelligence is optimized for the question of “what does it do”, and our sense of structure emerges from that. When a small child is presented with a block, they pick it up five hundred times, and put it down, and turn it over, and pick it up, and put it on stuff. This is the natural process of developing intuitions about what a block is: on a perceptual level, we know a block because of how it behaves in our hands. You might say that we know what a block is because of how we can use it.

Writ large, this is how humans make sense of the world: we poke at stuff, and see what happens. Even when thinking abstractly and not fumbling around with our hands, we poke at our mental models - we imagine scenarios, and make predictions about what’s going to happen.

You can view the difference here as form versus affordance, or “use”: A soccer ball has a set of properties - it is round, it has some give. It also has some affordances: balls can be rolled; they can be thrown; they can be tripped on.

This mismatch is what makes learning mathematics difficult: beginners are always attempting to ask what something does, and this leads the neophyte astray.

Affordances can't be directly inferred from structure. Affordances are ascribed to structure and must be discovered. Can you list all of the things a person could use a ball for? How about a triangle?

Affordances of thousand year old structures are still being discovered:

Nord-lock washers, a singularly effective type of vibration resistant locking washer, were invented in 1980. They rely on interlocking triangles. Similarly, while screws were invented at least by the 1st century, the olds elevator is a novel and apparently quite useful screw-based elevator mechanism that was invented in 2002. (Examples ripped from this reddit thread https://www.reddit.com/r/slatestarcodex/comments/lxra2m/what_things_have_we_reached_the_end_of/)

When a statistically average software developer asks "what is a monad?" they're attempting to ask a question about affordance ("What do monads do?"),

The standard, technically correct responses engender so much confusion precisely because they miss the actual question being asked (“What can I do with a monad?”), and instead answer the literal question, what is a monad. "In functional programming, a monad is anything for which there is defined a bind operation and a flatMap operation", or the perennial groaner, "A monad is a monoid in the category of endofunctor."This second answer fails to answer the question being asked on two counts - firstly, it answers “what is it” instead of “what can I do with it”, but also it answers the question in category theoretical terms, when the person asking is really asking a question about functional programming. It’s a little like being in a woodshop and a newbie asks “What’s a plane?”, and their teacher responds “A plane is composed of a propeller and wings which together can create lift.”

Admittedly, this problem is compounded by the fact the answer to the question "what do monads do" is complicated, and helping a person answer “what can I do with it.”

A slightly better answer you see floating around is something in the vicinity of "Monads enable the sequencing of computations" - see, e.g. the haskell wiki's first paragraph on monads: "A monad is a way to structure computations in terms of values and sequences of computations using those values. Monads allow the programmer to build up computations using sequential building blocks, which can themselves be sequences of computations. The monad determines how combined computations form a new computation and frees the programmer from having to code the combination manually each time it is required."

Unfortunately, this answer is only slightly better, because it actually just ends up describing structure again: What do monads do? Well, they let you structure your programs sequentially. We've just pushed the question of "yes, but what can I do with this?" down the road.

None of this is to say that structure isn’t important - it’s incredibly important. It’s just that structure-first is a painful way to learn things, and that being able to use a concept requires poking at it - picking up the block, putting it down. Discovery of structure is best done in tandem with discovery of affordances.

You might be asking, okay, Danil, what does this distinction buy us? What can I do with this? Personally, I find this distinction useful for helping clarify the bounds of my own confusion when I’m confronted with a new domain or set of concepts. If I read an explanation of something that I don’t fully understand, I can ask: does this effectively explain the affordances of this concept? Do I need to find a way to poke at it before it will make sense? It’s also my go-to tool for providing feedback for technical writing, because failure to adequately explore affordances is such a common shortcoming.

Previous
Previous

Rocky Mountain High

Next
Next

Better Living Through Functor Oriented Programming, Part One