I frequently find myself in the second situation and only a handful of times have I been in the first situation.
I frequently find myself in the second situation and only a handful of times have I been in the first situation.
1. Go to a local meetup group for your favourite language, take your laptop along, and show some folks what you've been working on. Show them what it does, and then walk them through the code. You can do this over beers. You will end up learning something either by explaining things to others, or by receiving questions and feedback from more experienced developers.
2. Ask a more experienced friend to meet you one weekend, for a couple of hours, to look at some of your code. Getting a code review from someone outside your normal environment will likely result in a few valuable tips.
3. Read books about architecture, like 'Web scalability for startup engineers' or books targeted at intermediate developers, like 'Powerful Python', and immediately go back to some past work to figure out where those patterns might be of use.
4. Ask any and all of your friends who are engineers about what they've been working on, what difficult problems they've had, and how they are working to solve them.
5. Read open source code. (This is a bit hard, as not all open source code is of high quality, and it's hard to know if it's good unless you're already a great developer.)
You learn a lot from other people by looking through their code, and you learn ways to improve your code by having people with more experience review your code.
Maybe find someone who is familiar with the language/application you are interested in and is willing to review your code.