Breaking Problems Down
Hard problems are just several easy problems stacked together. Decomposition is the skill of finding the seams.
Take a real request: from our member list, find the average volunteer hours of everyone in Jackson who joined before 2020.
That sounds like a lot. It is actually four small problems you already know how to solve.
1. Filter to members in Jackson.
2. Filter those to members who joined before 2020.
3. Total their hours.
4. Divide by how many there are.
Every step is a pattern from Module 12. None of them is hard on its own.
✦ When you feel stuck
Stuck almost always means the problem is still too big. Say it out loud in plain English, then split the sentence at every 'and' and every 'then'. Each fragment is usually one loop or one condition.
Mark this lesson complete
Signed in, your progress follows you to every device.