Simple steps to make a strong code basementHonestly, it’s quite hard to write a post like this because the subject is very hard itself. But if you have many times rewrite a whole program due to the weak structure, or you can’t extend anything when your application grow or you have unofficial method to adapt but your app become damn sluggish, you should read my post below and consider it as an advice.
I’m impressed how new language’s features are more and more useful, compact today and I really love to learn them. But even how fancy your household utensils, your house will be no use if it’s basement is weak. Everyone knows that, but every time you get deep in details, you forget the big picture. Here’s some of my tips to working on this:
- Don’t code, just plan first. Don’t write code right away when the idea come to your mind. If your application is large, you should use UML unless paper and pen are your friend.
- Write down what you think to write a good structure and make sure it will work with the way you want it work and it should be suitable with your application.
- Analysis what you’ve written and check is it good enough ? You sure can use some design patterns if it’s needed.
- Never get in a trap which is planning too much. When you can’t think of any way to write, it’s been good enough and get your hand dirty with coding. We will fix any problems breed on the go.
- When you code, focus on the structure and take your time to review your code in constantly of time. Believe me, it’s fun and addictive.