Variable, Random, System

Chairs, Casey Reas in Form+Code in Design
The password for these Figma files is pratt.
Tech & Tool Survey
We’ll use the responses from this survey to better understand the tools and technologies you are familiar with, which will help inform our class discussions and projects.
Coding Assignment 2
This assignment is part 2 of project Creative Cryptography.
Submit Assignment
Due: Sep 8, 2026
Last week, we asked what code can be and where we might find code in our everyday lives. This week, we will look more closely at one important part of code: variables.
A variable is something that can change while still remaining part of the same system. For instance, in a textile pattern, the color, scale, spacing, or repetition might change while the underlying pattern remains recognizable. In music, the pitch, tempo, volume, or duration can change while the composition still follows a particular structure.
Choose one idea as your main “coding system”. You get to define what is “code” to you. Don’t forget that this is part of your “creative cryptography” project. Within your coding system, identify at least 5 things that could vary. These might be visual qualities, measurements, categories, quantities, positions, sounds, movements, or anything else that can take on different values.
Try to reconstruct your system in p5 preliminarily. Don’t worry about not being able to replicate it perfectly! This is only week 2. Try to use let to define these variables in code, and use either different values or random() to switch things up. For each variable, think about what happens when it changes. Does the meaning change with it? Does the system still remain recognizable? Are some variables more important than others?
Bring your sketch, your coding system and any found images, photographs, sketches, videos, or other media that can help illustrate your ideas to class next week.
Readings
We don’t have a required reading this week. These are optional references for thinking about flexible visual systems.
Tutorials & Resources
- Variables in p5.js (Define Your Own) — The Coding Train
- Random() Function — The Coding Train
- Creative Coding with Processing: Random Compositions
The last video uses Processing rather than p5.js, but Tim’s approach is worth watching for inspiration.