The Shame of Legacy Code is the feeling you get when you explain legacy code you wrote, or somebody else in your team wrote, to somebody who is not familiar with it.
I started learning about its devastating effects since last year. I've been helping new developers onboarding in the codebase my team handles and so I have been the point of contact for any question related to the design of the code.
Question after question, I found myself answering more that the design was not good or that some part of code was messy. I paid attention to the reaction of the new developers and I could see in their face the surprise mixed with disappointment or even disgust by the status of the code.
Their reaction hit me hard. Really hard. More than I expected and more than I wanted to admit to myself. Even if I didn't write the code I somehow felt guilty because I let this happen under my watch.
The result was a sense of despair and lack of motivation that made me on the verge to quit many times. Several nights I went home from work and cried out of despair because I felt I was a failed developer, a complete incompetent one.
A developer cannot sustain to do bad work every day for long time without it taking a toll on him/her. One will eventually forget what it means to do something properly.
I did not quit because that is the easy way and I don't believe you grow by going away from the tough situations.
But then again, when is the time you are allowed to walk away?