11 The act of writing code

 

This chapter covers

  • Comparing different activities people perform while interacting with code
  • Examining how to support your brain in performing different activities more effectively
  • Exploring how interruptions impact your work as a developer
  • Understanding how to use your memory to best recover from an interruption

So far in this book, we have examined what cognitive processes play a role when reading and writing code. In the previous chapters, we looked at how to write code that is easier to read and how to solve problems better.

In this chapter, we direct our attention away from the code itself and instead look at what cognitive processes play a role when you are executing the act of programming. We will first examine what we mean when we say that someone is programming. We will dive into different activities that make up the act of programming and explore how to best support these different activities.

Second, we will look at the cognitive implications of a much-dreaded occurrence in the life of programmers: interruptions. We will investigate why interruptions while programming are so annoying and examine what can you do to make them less disruptive. By the end of this chapter you will be better able to support activities of programming and better equipped to deal with interruptions.

11.1 Different activities while programming

11.1.1 Searching

11.1.2 Comprehension

11.1.3 Transcription

11.1.4 Incrementation

11.1.5 Exploration

11.1.6 What about debugging?

11.2 Programmer interrupted

11.2.1 Programming tasks require a warm-up

11.2.2 What happens after an interruption?

11.2.3 How to better prepare for interruptions

11.2.4 When to interrupt a programmer

11.2.5 Some thoughts on multitasking

Summary

sitemap