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 applications 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 on Stack Overflow 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 professionals might have teammates to look at stuff over your shoulder or bounce ideas around with, but what about the independent 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 user experience?
How do you know you're writing good code?
code quality
The biggest clue for me is:When you have to go back and add/modify a feature, is it difficult?  Do you constantly break existing functionality when making changes?If the answer to the above is yes then you probably have a poor overall design.It is (for me at least) a bit difficult to judge a design until it is required to respond to change (within reason of course; some code is just bad and you can tell right away, but even that comes with experience.)