| There are multiple different psychological theories that might explain why we dislike code that we don't write. I do agree it is an interesting thing to think about. Two that I can immediately think of are 1. Ikea Effect(1) - We place a higher value on things we create vs. things we didn't create How it applies: We place more value on code we wrote compared to what others wrote. 2. Fundamental Attribution Error (2) - We tend to look at our own accomplishments as evidence of our own ability, and our failures as events caused by external influence. When it comes to others it's the reverse, we look at others accomplishments as the result of external events, and their failures as evidence of their internal lacking of ability How this applies: Let's face it, if you're working as a software developer, you don't always have the time to write 100% perfect code (which is not an excuse to write bad code) but a reason why we often settle for "good enough" code. We probably accept this rationalization when reading our own code but are less lenient when reading others code. This then frames their judgment of the code in a negative light. "I hate this code because the developer took shortcuts/didn't do things the right way... " Even though we do the same. 3. Mere Exposure Effect (3) - We like things we're familiar with. How it applies: Since we wrote our code, know how it works (most of the time right...) and what we were thinking when we wrote it, that familiarity is pleasurable vs code that we don't know how it works (yet), and have less of an idea of the mindset that the developer had when writing it. Those are just a few... there are probably more theories you can apply to this problem but I do agree it's a real thing. [1] https://en.wikipedia.org/wiki/IKEA_effect [2] https://en.wikipedia.org/wiki/Fundamental_attribution_error [3] https://en.wikipedia.org/wiki/Mere-exposure_effect |