Most of the code you will write will look stupid when you comeback some times later to review it. Just like when you write a nice article, you know when you re-read it the next day you will find lots of mistakes. But this shouldn't be a reason not to deploy your code to production.
It is very easy to read someone else's code and point out the mistakes. But when you read your own you simply fly through them and ignore them. You let someone else read it and your feelings are hurt. The next thing you know, you are afraid to deploy your code because you might have left a bug in.
The more experience you get the less you will want to admit that you can make mistakes. Break out of this habit and accept that you are only human. Bugs happen even in production; this is why we use source control.