Your code is not a reflection of you. It isn’t a reflection of your beliefs, your upbringing, or your ability to be a good person.
Your code is, however, a reflection of your thinking process at the time that you wrote it.
Given our innate ability to change our minds, consider other viewpoints, and play with new ideas, why do we hold our code so dear?
Your code can change. Your code will change. Your code must change, if it’s ever going to get better.
Stop marrying your code.
The sooner you accept this, the happier you will be and the better programmer you will become.