http://en.wikipedia.org/wiki/Just-world_hypothesis
They are closely related but people always forget the second one.
I'm still for teaching common biases in secondary school. Won't hurt, and may sometimes help. But I don't think knowing biases changes people. At least that wasn't my experience.
My aim is to judge others by their repeated actions and track record. This is hard, but I've definitely found it worth doing.
Yet when he died, the people of Columbia wept in the streets.
In general, we only need to see someone being smart once and then we will forever label them as smart. It's as if being smart is an achievement and they've proven they're capable.
However, in general we only need to see someone being evil once, and we will forever label them as evil. It's as if that's their true self, and all the other instances of them being good are a ruse.
http://psychcentral.com/lib/2008/sway-the-irresistible-pull-...
Even if you think you see a pattern, someone who seems stupid at something may just be outside of their comfort zone/talent area. In another field, they may be quite smart.
90% of the time, when people look at the code, you will hear comments like 'who wrote this garbage??'. In reality, the system was generally built to the best knowledge / requirements that were available at the time.
(I'm sure many people here have thought 'who wrote this crap' and then viewed the author to find out it was something they wrote many years ago, but have just gotten much better over time)
So yeah, it is hard to fight a first impression.