Saturday, September 4, 2010

Code of coding

We need a few simple rules to make the best code we can:
  1. Writing code is the last thing you should do. Maka sure the preproduction in finished before you start coding. You shouldn't have any questions and everything should be clear when you are starting write the code. If you have any - find the answer now. Don't waste your time and someone's money writing code that you will have to move to trash when you finally find the answer. New questions will arise and some of the answer will prove to be incorrect. We know that and we want to reduce this losses.
  2. The code is just a resort. Not our main goal. We don't want to have code, we want to have applications that gives users necessary features and fun. We belive the BDD is the best way to achive this goal. Some describe all features using Cucumber or your favourite tool before implementation to make sure you are working on that project you/we/client want.
  3. The code should works. And you have to be sure it works. So write unit test for models, controllers and helpers. 
  4. The code should be easy to read, understand and change. We should know why it works. The code doesn't have to be the smartest and the prettiest one. It's enought if it works, we know why and programmer wrote it fast and happy. 

No comments:

Post a Comment