Code as Material

Code is a material. Like clay or paint, it has properties, resistances, and possibilities. Treating code as material - rather than as instruction or logic - changes how designers relate to implementation.

Practice - what you do

The Conventional View

In traditional education, code is treated as instruction: you tell the computer what to do, it does it. Code is a means to an end - the end being the running program.

This frames code as transparent. You think about what you want; code makes it happen. The code itself is irrelevant; only the result matters.

The Material View

In the material view, code has its own properties - like clay, wood, or paint. You work with it, not just through it. It pushes back. It suggests possibilities. It resists certain things and enables others.

Properties

Code has inherent properties:

  • It runs: Unlike a sketch, code executes. You can feel it.
  • It's exact: No ambiguity. 0.5 is not "about half."
  • It's repeatable: Same input, same output (usually). You can iterate precisely.
  • It's modular: Pieces can be combined, separated, reused.
  • It's fragile: Small changes can break everything. Syntax matters.

Resistances

Code resists certain things:

  • Vagueness ("make it feel good" isn't code)
  • Simultaneity (things happen in sequence, not at once)
  • Continuous values (you pick a number; the material doesn't)
  • Inconsistency (it does exactly what you said, even if you didn't mean it)

Possibilities

Code enables things other materials can't:

  • Instant variation (change a number, see different behavior)
  • Parametric design (expose values, make them tunable)
  • Interactivity (the material responds to input)
  • Reproduction (copy infinitely, share globally)
  • Combination (stack systems on systems)

What This Changes

Design Through Implementation

If code is material, you design through implementation, not before it. You discover possibilities by working with the material. A painter doesn't fully plan the painting before touching canvas; a designer doesn't fully plan the feel before touching code.

Prototyping as Sketching

Code prototypes are sketches in material. Rough, exploratory, meant to be thrown away. Like a sculptor's maquette, the prototype reveals what the material can do.

Feel Is Found

Gesture emerges from the code. You can imagine how a jump should feel, but the actual feel comes from gravity values, jump velocities, frame timing. The code gives you the feel; you refine it.

Parameters Are Handles

Good code exposes parameters - handles you can grab to change the behavior. The Code Bank scaffolds are designed this way: exposed variables at the top, tunable without understanding the implementation.

The Code Bank as Material Library

The Code Bank provides pre-shaped materials. Like buying lumber instead of felling trees, or using premixed paint instead of grinding pigments.

You're not cheating by using scaffolds. You're starting with refined material so you can focus on design decisions, not implementation details.

Use scaffolds to:

  • Get something running fast
  • Feel the behavior before deciding if it's right
  • Tune parameters to find the feel you want
  • Learn by reading working code

Knowing vs. Feeling

Knowing what you want is not the same as feeling it. "I want a floaty jump" is knowledge. The actual floaty jump - the gravity, the hang time, the landing - is feel. Code makes the jump real. Then you react to the real thing.

This is why prototyping matters. You don't know if your idea works until you feel it in material form.

Exercise: Material Exploration

Take any Code Bank scaffold. Don't try to make anything specific. Instead:

  1. Change every exposed variable to see what it does
  2. Push values to extremes (gravity = 10000? gravity = 0.1?)
  3. Note which changes produce interesting behaviors
  4. Find a feel you didn't expect but like

This is material exploration - discovery through manipulation.


Related