# Example relationship of perceptual load and distraction in software engineering

I'm troubleshooting a difficult bug in an unfamiliar codebase. I saw a message notification where I needed to fill in a quick poll of where the team should go for lunch. I got lost of what I have understood so far after I filled the poll.

In this example, I had to fill a lot of things in my working memory to debug the issue. Given that I'm unfamiliar with the codebase, most of the information are stored in my working memory. When I got distracted, I have lost the information I was analysing. Distraction has high impact on tasks with high cognitive load.

This is similar to why there are a lot of illustration in terms of why someone shouldn't disrupt a developer (see reference).

On a different day, I was code reviewing a pull request that's raised by my colleague. I was intensely looking into the code if there's a bug, or if there's missing test. A message notification popped around the corner of my screen around lunch poll, I ignored it and continue with my reviewing.

Given the intensity of the task, when there was a distraction, I wasn't as well distracted as when I had a lot of things in my working memory. Distraction has low impact on tasks with high perceptual load

# References

@AnneLoVerso drew the pair programming version of Heeris why shouldn't interrupt a programmer: https://twitter.com/AnneLoVerso/status/973421282707505152