One very unproductive, even harmful behavior in the software development is the tendency to “protect” our code from critics.
Sure, you gave it a lot of thoughts and sure it’s a snapshot of your way of thinking at the current moment, but… Face the facts. Given there is no way to know what the future brings and how the code would have to change to accommodate new requirements, your code is probably not the best it can be. Have this in mind. Always.
So, what can you do?
First, you should really throw it to the critics and try to learn from them. If the code is really that good, then it should be easy to understand, do the job, consider all the edge cases, be prepared for changing requirements, be time and memory efficient, integrate seamlessly in the application and be consistent with the code base. Does this code do really all of that? Unlikely.. So let start with the mindset “there is space for improvement” and be open-minded to critic. Listen and learn. Some of the obvious benefits: to see problems before the customer runs into them. Also you will build better interactions with the peer software devs, being able to break out of the “defender’s mode” and openly accept help or challenge.
Second, use your code as the best measure of your technical growth. Looking at your code from the last year and thinking it is good means you lost an year of your life learning nothing (sorry for the bad news). The best proof that you are on the right track, getting better each day is to be ashamed of your work from yesterday. That’s the delta. Knowing it, enables the calculation of your speed and direction. It is pointless to compare yourself with other people, since everyone has different start, different prerequisites, different story. But comparing today’s and yesterday’s you, is easy and meaningful. Use this trick to measure your progress.