This question already has an answer here:
Serious question here. I love programming. I've been messing around with code since I was a kid. I never went the professional route, but I have coded several in-house apps for various employers, including a project I got roped into where I built an internal transaction management/reporting system for a bank. I pick stuff up quickly, understand a lot of the concepts, and feel at ease with the entire process of coding.
That all being said, I feel like I never know if my programs are any good. Sure, they work - but is the code clean, tight, well-written stuff, or would another coder look at it and slap me in the head? I see some stuff here on SO that just blows my mind and makes my attempts at coding seem completely feeble. My employers have been happy with what I've done, but without peer review, I'm in the dark otherwise.
I've looked into peer code review, but a lot of stuff can't be posted because of NDAs or confidentiality issues. A lot of you pros might have teammates to look at stuff over your shoulder or bounce ideas around with, but what about the indies and solo guys out there like me? How do you learn best practices and make sure your code is up to snuff?
Or does it not matter if it's "the best" as long as it runs as expected and provides a good UX?
EDIT: Wow, I can't believe the great response and helpful answers this question generated!!! In the spirit of democracy I have selected the answer with the most upvotes as the correct one -- in reality, I wish I could accept many of these answers, since they all made some great points and helped me expand my mind a bit when it comes to my programming. Thank you to everyone who took the time to answer and comment!