Cognitive bias: Impacts on software development
LinkedIn
Facebook
Twitter
How confident should we really be about what we know? 

After attending a conference this spring, this question has persisted in my mind. I got home, continued my research on cognitive bias and thought about how it affects those of us working in our fields, specifically mine, software development. 

But first things first, let me explain the concept. Cognitive bias refers to systematic deviations from rationality in judgement, leading most often to errors or irrational outcomes. These biases can affect anyone, including software developers, and can have a significant impact on the quality and effectiveness of the software being developed. Here are some of the most common cognitive biases that software developers may encounter and how they can mitigate their effects. 

Confirmation Bias

Our beliefs have a fundamental impact on our thought processes. Confirmation bias, which is the propensity to seek out information that supports our preexisting beliefs while ignoring or discarding evidence that contradicts them, is one of the most prevalent cognitive biases. 

This bias can show up in the software development process in a number of different ways. A developer might, for instance, be so certain that their code is correct that they fail to catch potential bugs or errors. They are also more likely to choose positive tests rather than negative ones. 

To mitigate confirmation bias, developers should actively look for other perspectives and consider competing viewpoints to reduce confirmation bias. Developers should actively look for different viewpoints and question their own presumptions to combat confirmation bias. This can be achieved by seeking feedback from team members, consulting with experts in the field, or conducting research to explore alternative approaches. 

Anchoring Bias

Anchoring bias is the tendency to rely too heavily on the first piece of information encountered when making decisions, even if it is irrelevant or misleading. In software development, this bias can lead to developers becoming fixated on a particular approach or solution, even if it is not the best one. 

A team of software engineers might, for instance receive an initial estimation from a stakeholder or manager and then anchor their subsequent work on that estimate, be it realistic or not. This can lead to a failure to reassess the estimate as new information becomes available, resulting in missed deadlines or poor-quality work.

Anchoring bias can be overcome if developers gather a range of information and perspectives before making decisions. They should be open to exploring different options and approaches, and not become overly attached to a particular solution. It is also crucial that the company culture promotes and values critical thinking and encourages team members to challenge assumptions and propose alternatives.

Sunk Cost Fallacy

This type of cognitive bias causes people to continue investing time, money and resources into a project or decision even when it no longer makes rational sense to do so. For example, a development team might continue working on a feature or module that is no longer necessary or useful, simply because they have already invested a significant amount of time and effort into it. They might also be reluctant to abandon a particular tool or technology, even if a better alternative exists, because they have already invested time and money in learning and implementing it. 

The sunk cost fallacy can lead to poor decision-making, as developers and project managers may be reluctant to pivot even when it would be in the best interests of the project. To avoid this trap, it is important to regularly reassess the value and relevance of all aspects of the project, and to be willing to abandon or pivot as needed, even if it means leaving behind work that has already been done. 

Recency Bias

Recency bias is another cognitive bias that can affect individuals in software development. This bias refers to the tendency of people to place more importance on recent events or information and to overlook earlier or historical data. 

It can lead to developers making decisions based on the latest information without considering past experiences or data. This can result in mistakes being repeated or important information being overlooked. For example, a developer may overlook a bug that was previously encountered in a project because it has not been encountered recently, or a team may make a decision based on the latest feedback from a client without considering past feedback. To mitigate recency bias in software development, it is important to maintain a comprehensive record of project data, decision logs, feedback, and bugs encountered. This can help developers and teams make informed decisions and avoid repeating mistakes. 

Conclusion

What does all of this mean, then? Simply put, cognitive biases are a common and natural aspects of human thinking but if they are not corrected, they can have detrimental effects on software development. Software engineers should be conscious of these biases and actively work to counteract them. Some strategies to do this include looking for other viewpoints, acquiring a variety of information, routinely re-evaluating priorities, and being willing to acknowledge errors and pivot if required. By doing this, developers not only raise the caliber of their work but also increase the efficacy and value of the software they create.