Rebirth of T-rex

Does dinosaur really extinct? What caused the dinosaur to vanish? Have you ever wonder whether the real 'you' is disappearing and slowly vanishing? Hope that through this blog, we will be able to maintain the real self.

Programming Precepts

Posted by T-rex Lim Huat Heng

I came across the following Programming Precepts when I was tidying up cupboard. Quoted the following to be shared:

1. Keep your algorithm as simple as you can.When in doubt, choose the simple way.
2. Consider time and space trade-offs in deciding on your algorithm.
3. Never afraid to start over. Next time it may be shorter and easier.
4. Be sure you understand your problem completely. If you must change its terms, explain exactly what you have done.
5. Act in haste and repent at leisure. Program in hast and debug forever.
6. Start afresh is usually easier than patching an old program.
7. Always plan to build a prototype and throw it away. You'll do so whether you plan to or not.
8. When the user of global a prototype and side effects is unavoidable, be sure of the subprogram.
9. Keep your documentation concise but descriptive.
10. The reading time for programs is much more than the writing time. Make reading easy to do.
11. Don't lose sight of the forest for its trees.
12. Each subprogram should do only one task. But, do it well.
13. Keep your connections simple. Avoid global variables whenever possible.
14. Never cause side effects if you can avoid it. If you must use global variables as input, document them thoroughly.
15. Keep your input and output as seperate procedures, so they can be changed easily and can be custom-tailored to your computing system.
16. The quality of test data is more important than its quantity.
17. Program testing can be used to show the presence of bugs, but never their absence.
18. Most programs spend 90% of their time doing 10% of their instructions. Find this 10%, and concentrate our efforts for efficiency there.
19. Practice information hiding. Seperate the application of data structures from their implementation.

2 comments:

Amadeus B.V 勇瑜 said...

Wow, that really helps, Thanks man.

Anonymous said...

thanks ko ko!