确认偏误
人们倾向于寻找和相信支持已有观点的信息。
显示原始英文内容
Confirmation Bias
A tendency to favor information that supports our existing beliefs or ideas.
Takeaways
- When reviewing code or debugging, notice if you're only looking for evidence that supports your initial hunch.
- Challenge yourself when actively thinking about problems. If you have an opinion about an issue, try to ask, 'What would I expect to see if I'm wrong?' In this, we can counteract our natural bias only to confirm.
- Regarding team decision-making (for example, tech stacks and/or design decisions), seek input from people with differing opinions. Bias confirmation can be overcome by looking into alternative solutions. For example, if the whole team 'feels' that technology X is the superior choice, assign someone to look into the opposing view on technology X.
- Base decision-making on objective criteria (facts, not opinions). Automated tests, performance criteria, and experimentation (A/B tests) can provide truths regardless of human bias.
Overview
We all like to be right. Confirmation bias is our mind's way of cheating to feel right more often. Psychologically, once we form an opinion, we subconsciously filter information, noticing bits that support our view and ignoring those that contradict it.
In software, a typical scenario is debugging. A developer convinced that module A caused a production issue will comb through module A's code intensively. If module B (assumed to be fine) is also throwing errors, they might not even look there, missing the real cause. Awareness of this bias leads to asking "What am I missing? Maybe there is another explanation?" and encouraging environments where beliefs are constructively questioned.
Examples
In code reviews, a reviewer who trusts a colleague's skills might skim over potential issues, assuming the code is probably fine. Or the opposite: a reviewer expecting sloppy code from a junior developer might find "issues" that aren't really important.
Confirmation bias also affects testing. A developer may write unit tests that assert the code works on typical inputs (happy path), but might not try edge cases that could break it. Teams combat this through code reviews with fresh eyes, writing tests specifically aimed at breaking their own code, and post-mortems asking "What went wrong and why didn't we see it?"
By checking for confirmation bias, engineers can become better at solving problems with an open and critical mind.
Origins
One of the first to identify confirmation bias was Peter Cathcart Wason, an English cognitive psychologist. In 1960, he conducted a famous experiment (Wason's rule discovery task) where participants had to guess a rule for a sequence of numbers. He found people tended to test sequences that would confirm their initial thoughts rather than those that could prove them wrong.
Wason coined the term "confirmation bias" to explain this phenomenon. Since then, countless studies have confirmed the existence of confirmation bias in human reasoning.
核心含义
技术选型、事故分析和产品判断都容易受到确认偏误影响。人们会更重视支持自己方案的案例,而忽略反例、失败信号和不确定性。
可以通过预先写下假设、主动寻找反证、邀请不同立场的人评审,以及在实验开始前定义成功标准来降低偏误。
实践例子
团队先决定采用某个框架,再只收集它的成功案例。若改为列出必须满足的约束,并要求每个候选方案都提交风险和失败条件,比较会更可靠。
来源与边界
确认偏误是认知心理学中的广泛现象。它不是某个人的道德缺陷,而是所有人都可能出现的判断倾向,需要靠流程和证据补偿。