Cognitive load is the amount of information and number of constraints a person can handle while remaining effective. In programming, solving too much at once makes complex problems harder to solve correctly. Functions reduce this load by dividing work into smaller pieces. section 3.4
Managing constraints
Repeating four random words may be manageable, while repeating twenty is not. A road trip involving travel time, children’s stops, meals, bathrooms, fuel, and hotels creates a similar overload. Computing a circle’s area in one function lets other code call it instead of carrying the whole calculation repeatedly. section 3.4





