Cognitive load means how much a developer needs to know in order to complete a task. A higher cognitive load means that developers have to spend more time learning the required information and there is a greater risk of bugs because they have missed something important. cognitive load arises in many forms such as APIs with many methods, global variables inconsistencies, and dependencies between modules.

System designers sometimes assume a wrong assumption that complexity can be measured by lines of code. they assume that if one implementation is shorter than another, then it must be simpler; if it only takes a few lines of code to make a change, then the change must be easy however this view ignores the costs associated with the cognitive load I have seen frameworks that allowed applications to be written with only a few lines of code but it was extremely difficult to figure out what those lines where.

Sometimes an approach that requires more lines of code is actually simpler because it reduces the cognitive load