In Software Engineering 👨🏻‍💻👩‍💻

Cognitive Load

Lightning Talk

Sometimes we feel confusion going through the code. Confusion costs time and money. Confusion is caused by high cognitive load. It's not some fancy abstract concept, but rather a fundamental human constraint or a concept in psychology.

What Is Cognitive Load ?

Cognitive load is how much a developer needs to think in order to complete a task.

The average person can hold roughly 4 such chunks in working memory.

Once the cognitive load reaches this threshold, it becomes much harder to understanding things.

Cognitive Load & Interruptions

We should reduce the cognitive load in our tasks as much as possible.

🤔

Types Of Cognitive Load

Intrinsic

Extraneous

🔻

SonarQube

Example: Cognitive Complexity In SonarQube

Code Sample

Code Sample

Other Topics Might Reduce Cognitive Load In Your Code

  • Inheritance nightmare

  • Too many small methods, classes or modules

  • Too many shallow microservices

  • ...

To sum up, we should reduce the cognitive load in our tasks as much as possible. Especially extraneous cognitive loads, which we can try to control.

🥹

Thank You !

deck

By oldmo860617

deck

  • 148