DEV Community

Cover image for Confirmation Bias: How your brain wants to wreck your code

Confirmation Bias: How your brain wants to wreck your code

Matt Eland on September 13, 2019

We suck at testing our own code. We suck so badly at it that it has led to entire professions like as Quality Assurance analysts and test engineers...
Collapse
 
stealthmusic profile image
Jan Wedel

We don’t have QA testers and I don’t think this is really necessary (which you seem to suggest).

In my team, we love testing because that makes us sleep better after shipping code to production.

To fight the confirmation bias, we do code reviews (which is OKish,
But not optimal) but much better, we do pair programming whenever possible (in that case, we don’t do code reviews). This really makes you develop differently. Usually, while pairing, you won’t write code that “will hopefully be OK” because of the peer pressure. You will write more and better tests.

Collapse
 
integerman profile image
Matt Eland

I do think pair programming is a help on the journey. I've worked with all forms of QA from mine to a dedicated and very involved department that did Tom's of exploratory testing as well as feature and bug testing. I've seen good dev testers and bad ones as well as awesome and awful QA. Every team's needs are different.

Collapse
 
aleksikauppila profile image
Aleksi Kauppila

This is a really nice series. Thanks and good job Matt 👍👍