Practice Makes (Almost) Perfect
One way to improve a skill is to practice… Software development is a skill that requires a lot of practice, and then some. Nobody picked up a keyboard and wrote well designed code from day one. There is no Mozart C++ developer out there (go ahead, Google it!)
If your day job is programming then you are getting enough practice, but are you actually improving your skill? You can’t just hit a tennis ball against a wall for years, then go and win Wimbledon.
I had the privilege of seeing Steve Wozniak live at a conference this past weekend. At the Q&A session a student asked him how to become a better engineer at university. His answer was that after you completed a project to go back and see how you can improve it, find a way to do the project in fewer steps or using less code. After doing it enough you then will naturally start doing better projects.
The two things I learnt- Firstly, solve a problem, then go back and refactor, as mentioned before. Secondly, practice makes perfect!
Practice, learn, practice
The only way to get better at development is to always look at improving on what you did before. As you write code, you have to find what works and what doesn’t, what other developers are doing right and most importantly, what does great design look like and are you doing it.
However, you can’t just look at a great design; you have to understand what makes it great. Although imitation is the sincerest form of flattery, if you are only going to copy what you saw you are going to miss many opportunities to improve.
Understand what made a design easier to understand or maintain and try and apply those principles to your own development. As The Woz said, after a while you will start applying those principles instinctively.
Learn from others
Your own experience can teach you a lot, but somebody else’s experience can teach you even more. Learn from your peers, read books and articles, and follow awesome blogs. If you are reading this, you are already doing one of them (that’s right, I said it, this blog is awesome).
Developers know there is nothing like a perfect design, but there is something like toilet code. Practice will (almost) make it perfect and at minimum remove a lot of code smells.
If you have read any great books or blogs about design leave a comment about it. One book I can recommend is Robert C. Martin’s book Clean Code.