24 rules of computer programming

zhaozj2021-02-16  50

1. Fatal abnormal termination is never allowed

2, write in this order: user manual, manual, help, source code

3, unless you use Risk Factor Analysis (RFA), a program will cost double, you think the time required for development - repeated work

4, the amount of coding work should not exceed 20% of the development work

5, test should only be 30% of the project

6, the comment should at least 20% of the source code

7, an error message should report what happened, about this user, what is the next step, and which line of code caused this problem? May also pay attention to time, username and environment

8, good programs will automatically send the nearest error message to the permanent media

9, call a routine three times? Hide it calls once? Don't hide

10, in addition to menus and wrong traps, routines should only need an entry and an exit

11, document code with clear variable name and routine name

12, the database should be related

13, always use the best algorithm

14. First optimize the slowest routine, use the Profiler sign them

15. The best development language is usually the one with the shortest development time.

16, ask customers to sign in the user manual and instructions

17. First, write more risky modules

18, let simple maintenance becomes guiding your lights

19, check each signature and spelling you write

20, don't write any procedures you can copy with a 3 * 5 card cover

21, do you know what to do

22, no list is perfect

23, difficulties are not what you are looking

24. The rules and laws of existence can be free from thinking

转载请注明原文地址:https://www.9cbs.com/read-28257.html

New Post(0)