This is a hard one but an important one. I found this quote on Jeff Atwood's Coding Horror blog on an old post that was referenced from a current one. (It'll be nice to one day to be able to refer to myself as well as others in my own posts!)
Egoless programming occurs when a technical peer group uses frequent and often peer reviews to find defects in software under development. The objective is for everyone to find defects, including the author, not to prove the work product has no defects. People exchange work products to review, with the expectation that as authors, they will produce errors, and as reviewers, they will find errors. Everyone ends up learning from their own mistakes and other people's mistakes. That's why it's called egoless programming. My ego is not tied to my "perfect" or "imperfect" work product. My ego is only tied to my attempts to do the best job I know how, and to learn from my mistakes, not the initial result of my work.
It's hard to sit there and watch your work get pulled apart and examined by somebody else and to take it and be constructive with it. I know my first reaction is to throw up the defenses and start giving excuses or pushing that it's fine how it is. BUT I do it because I know that it improves my code and improves my programming skills.