There is no recipe for learning how to develop code; it's about experience.
well, after 15 years of building / basic / pascal / java / c / C ++ / C # and other languages, sometimes my code just doesn't sort as it should (or maybe), but I pay well and is usually considered a good programmer.
There are too many reasons for this, tight release dates, too fast developing technologies, dumb customer requirements, monstrous frameworks intended only for reflection on extensibility (this is even an English word) and do not focus on usabiliy.
When I start a new project, the first thing I do is coffee.
Then I contact the client (or those who will use the application), and try to understand what they really need. Understanding what the client needs is a real goal (after receiving, of course, ^^)
After that, I took a pencil and paper and drew without following any standards. Boxes, circles, arrows, with notes, some kind of artistic brainstorming.
Designing templates ... the best way to use them is to avoid them. Too often, they do not correspond to real life problems, but programmers around the world abuse it everywhere, yes, this leads to actualization. But if you feel the absolute reason for using them, start with the Beast GoF (Design Patterns: Elements of Reusable Object-Oriented Software: Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides).
2 years is just a small amount of time. It takes a little longer to develop good code (and, of course, experimenting in different languages)