I know I'm repeating every thing that Mehdi, Richard and Abhinav have said ... but it really is just about
doing it. Practice does make ... well not perfect but not bad :)
I've been in the profession for more years than I want to mention, many of my ex-colleagues think that I'm the consummate professional ... but if you look at some of my past answers on QA I'm still capable of some ****** mess-ups! (At least my really big ***** mess-ups were not in the public domain!). But hey, it worked at the time.
You will, at some stage, go back to your
own code written weeks, months, even years before and say to yourself "what on earth was I thinking". You will look at other people's code on GitHub, here, other sites and think to yourself "what on earth were they thinking".
Keep coding. Keep reviewing your own code. Keep up to date. Keep reading things like
Insider news[
^]. Then 10 years down the line, remember to laugh at yourself - we "professionals" do it all the time :-P