1 Decoding your confusion while coding


This chapter covers

  • Discriminating the different ways you may be confused while coding
  • Comparing three different cognitive processes that play a role when coding
  • Understanding how different cognitive processes complement each other

Confusion is part of programming. When you learn a new programming language, concept, or framework, the new ideas might scare you. When reading unfamiliar code or code that you wrote a long time ago, you might not understand what the code does or why it was written the way it was. Whenever you start to work in a new business domain, new terms and jargon can all bump into each other in your brain.

It’s not a problem to be confused for a while, of course, but you don’t want to be confused for longer than needed. This chapter teaches you to recognize and decode your confusion. Maybe you’ve never thought about this, but there are different ways to be confused. Not knowing the meaning of a domain concept is a different sort of confusion than trying to read a complicated algorithm step by step.

Different types of confusion relate to different kinds of cognitive processes. Using various code examples, this chapter will detail three different kinds of confusion and explain what happens in your mind.

1.1 Different kinds of confusion in code

1.1.1 Confusion type 1: Lack of knowledge

1.1.2 Confusion type 2: Lack of information

1.1.3 Confusion type 3: Lack of processing power

1.2 Different cognitive processes that affect coding

1.2.1 LTM and programming

1.2.2 STM and programming

1.2.3 Working memory and programming

1.3 Cognitive processes in collaboration

1.3.1 A brief dissection of how the cognitive processes interacted

1.3.2 Cognitive processes regarding programming tasks