EDS 221 Day 5 AM
Creating programs: planning
August 14th, 2026
Optimal stress
Yerkes-Dodson Curve
Exponential complexity
Course goals
Must
Grasp sufficient building blocks to continue your learning in the future.
You learned the alphabet and some basic vocabulary
Ideally
Develop intuition about how to use data structures, control structures, and functions.
You can write with correct grammar
Maybe
Fluently read and write code in R.
You can hold a conversation
Progress check
Written assessment
Problem decomposition
We’re going to re-run the coral reef model.
The model is a complex problem.
This time, as you’re running it, focus on finding simpler problems.
In the afternoon session, we’ll solve the simpler problems and put the whole thing together
Problem decomposition is how we apply our building blocks to solve complex problems.
Identifying components
What makes for a good component?
Good
Needs revision
Example of a component
Roll 2d6
sum(sample(1:6, size = 2, replace = TRUE)) with roll2d6() improves clarity.Find a component
Your turn