A programmer’s cognitive load

A programmer’s cognitive load

Delving into the mental labyrinth of a programmer, we explore the concept of cognitive load. Unraveling its impact on coding efficiency and quality, we illuminate the strategies to manage and mitigate this often overlooked aspect of programming.

Cognitive load refers to the total amount of mental effort being used in the working memory.

To try and reduce the cognitive load it puts on your brain as much as possible, making code easier to read will allow you to work faster and better, and also improve your mental state and mood.

Documentation

About 80-90% of comments are redundant

Naming things

Give a variable a longer, descriptive name

Fonts and spacing

The font you choose has a big impact on how much load is put on your brain to process the text on your screen.

Colours

Light color schemes are better for almost everyone

Folding

Folding your method bodies by default gives you a much clearer overview of the class when opening a file. It makes it easier to decide where you want to go to, instead of scrolling and searching.

Source

Get in