IV program planning
Program planning is the overall design concept, all the programs in advance of the comprehensive and systematic analysis, and then set a clear framework for the production.
The best way, is from the user's point of view, first decide applications, with key input form, spatial structure and the delineation module.
These are identified in order to find what you want, according to a blueprint for writing programs. That is, planning that first goal to define the proper order to progressively, sequential execution.
1, awareness of the work: program planning, the equivalent of building design blueprint, we must first clearly understand the nature, characteristics, conditions, choose to take in an appropriate manner, in order to get the best results.
2, the program's structure: the structure to the prior decision was the adoption process or the module? Whole or in part using assembly language? Is the division of labor according to the quality of staff, or unification with the production line? Program segment, data segment and stack segment space allocation, the arrangement order of each program join, register definition, buffer settings, etc., should carefully consider carefully, and record the basis for the work.
3, parameter setting: the processing parameter is the object program must be reasonably arranged, and have room for expansion. Because the parameters and functions of classification and the efficiency of the program is closely related to the programmer, the parameter that is equivalent to the treatment program objects; on the application who is equal to the work of the classification criteria. The arrangement of the results, the value would be a tremendous influence function.
4, the efficiency requirements: the first chapter in section III, we emphasize the efficiency of the rule, the purpose of using the computer, it is the pursuit of efficiency. Therefore, in planning the beginning of each paragraph should be provided the efficiency of the program requirements.
In addition, the parameters used, should also consider the frequency of use, all in one ready in advance, and must not wait until the application again when the temporary calculation.
5, the standard test: Test is the quality of management, the program targets to be achieved, by the confirmation of the test. General programmers only program correctness. In fact, accuracy has nothing to do with the index, but the most basic responsibility of programmers.
The quality of assembly language programming, writing programs should be included in the original specifications and time limits; program ideas, concepts; implementation of the limitation; program the size and arrangement of space; applications to facilitate or not; instruction use is appropriate and so on.
Implementation of the program's quality control, you can test the program through completion. This test program should also be the beginning of the planning, taken into account.
6, the production of progress: the progress of the program produced very difficult to control, but because of its difficult to control, caution must be exercised, prior planning. The method is first in accordance with the nature of the work, set work "difficult to value." Programmers to work again to assess their "capacity value", and so setting a "reasonable" progress. Finally, based on the actual progress of work adjustment. In general, programmers need more than three years of writing experience to develop the concept of progress.
As the program itself takes up space, so its structure is good or bad, on the program a great impact on production and efficiency in the implementation. Good programs should be based on the nature of the structure, frequency of use, handling processes has, in the efficiency of the position, for full consideration.
First, the nature of the program
Before, have introduced the type of procedural, in the planning, to better understand the nature of the program. Because of the so-called efficiency, one that produced the program, maintenance, one refers to the implementation of the program and call. Both the nature of the program must make appropriate arrangements.
Generally speaking, the nature of the program only two, one is active, users can directly control the execution; the other is passive, common for the other program calls.
The former can also be said application, and the latter is more similar to the system program. Only to emphasize here is that its nature and how to plan according to their nature.
Active program preferably on the same module, when the program is too large to be split, we should also try to join together. However, if different functions, the module called the case of no intersection, cross section and paragraph in order to avoid loss of efficiency when there is no need to consider whether placement in the same module.
As the active program involving the use of people's habits and the idea of the designer, often need to modify the adjustment, change significantly. Because of this factor, the "re-use" value is not high, the requirements for efficiency and lower.
Planning, active and passive programming code must be separated, when in production, should pay attention to the space they occupy, and the relationship between paragraphs.
Since it is common passive programs is bound to have some basic functions. The so-called passive is that the program only under certain conditions, was the call. Because of its "re-use" characteristics, should be designed to streamline the child program. Required by circumstances, then, or to save space on the disk, the program at any time to cover other sub-way call, or to the efficiency of the direct connection standby.
Second, frequency of use
The efficiency of the implementation of the program, the space and processing time, often need to make some trade-offs. If the program too, space is insufficient, in the planning, the first statistical frequency of use of each program.
Not used to the program, does not mean not important, but taking up space, then the efficiency of damage.
This program is best as a separate module, so that at any time in response to space conditions, then.
Therefore, program planning, arrangement of space, frequency of use should be given priority. In other words, to try to make
Third, the program flow
Run the program has certain rules, known as the "process", which means the execution, in accordance with pre-arranged sequence of 11 flows through the process.
Writing the traditional program, process is important because people need based on a concept to progressively test and put into practice. But since the attention module, each module represents a fully functional, and feature set can achieve the effect, far from the process can be expressed. This way, the importance of the process to reduce, and their status is reduced to only a part of the structure only.
Because the combination of modules is available, the more modules, the main process will be shorter. Although each module also has its own processes, well-structured modules, can be further broken down into several sub-modules, and so on. Therefore, the process far less modular and flexible concept too is dull.
However, even in the module design process, sometimes through the process step by step reasoning necessary to understand the detail of the structure. In this position, the original application process understandable. But once become masters, programmers do not process that is no way of thinking, on a gross mistake.
Process is one-way thinking, people often use this process of reasoning though, but more importantly, the capacity comes from "abstract thinking." Abstract thinking is in many complex, intertwined phenomena, to immediately grasp the key, for the purpose of solving the problem.
In the program, the equivalent of abstract thinking that a comprehensive understanding of all modules, not just the process of reasoning. With full awareness, flexibility to be called, the program features on the next level, greatly increased.
If programmers know only under the process of writing programs, used to develop, not only the program ham, even people's thinking are related affected. Generally called "unimaginative", "doubtful" is the result of this mechanical training.
Therefore, I do not use process to plan the program, but a process of interpretation or explanation, it does not rule out the process of convenience.
4, flow chart
The first step is the painting process flow chart, according to a further detailed process flow chart, and then detailed process to understand or programming.
In the above example, the first production flow chart is as follows:
Please note that the figure does not export, which is characteristic of the module, when the code = 0, the entry end of the program. Book module's job is to arrange the information, return to the arrival of Office.
As mentioned above, each code is defined under the group code from each take one yard immediately after the default under the terms of code mapping. (See Section 1, the task) This will not only speed and space to streamline.
Of course, the code has its own sub-flow chart, as too simple, a few words will explain completion, no longer drawing the: first determine the location, width, length, straight or horizontal line can be drawn, that's all.
5, detailed process
Detail the most important process is to determine the function registers the other necessary auxiliary buffers should also elaborate on the details. As for detail to what extent, the complexity of the program must be based and determined programmers writing.
If the writing process and program for the same person, and no need to leave for others to reference, the detailed process can even be done away with. However, if the collective production, and need to file, is not only necessary to write more clearly so that others can at a glance, is whether anyone can take over.
As the earlier examples too simple, if the write detailed process, not wait for finished, the program had written earlier. So, sometimes not too much formality. The next section of the application instructions, notes only way to explain detailed processes, in contrast with the program, but more efficient.
6, Progress
The progress of the most important, not the increased speed of production, but to foster a spirit of professionalism and the ability to judge the work.
Progress of work by master schedule, the production schedule needs to have all quite familiar with the work. Therefore, the progress of the equivalent of a comprehensive and systematic thinking about the details of the work, the work of the programmer capabilities are of great help.
Of course, progress can effectively supervise the work, whenever the progress of the scheduled completion of the programmer is concerned, that is, a sense of accomplishment. In the production of large-scale program, time is often delayed for a long time, if no progress for reference, people often have a kind of lost in the ocean, I do not know where the sense of loss.
Ability of people, often working correctly determine the time required; the other hand, do not know how long the work or the progress of the book far from the truth, that the programmers have limited capacity or lack of.
However, writing programs entirely to meet the schedule, it is not a correct concept. Discussed earlier, writing is an art program, rather than assembly-line production, creative arts is strong there can be no progress to be controlled.
There is no set way of making progress is, as long as the note of the work of the project, estimated completion time, the actual completion time can be. Just made is one thing, execution is another, only serious and responsible implementation, will be of practical value.
Means nothing more than the implementation of daily or regular inspection schedule, If the progress does not meet, should immediately analyze the causes and make amendments to adjust. As for the results of the analysis, preferably written down for the next reference for improvement.
All this has developed a habit, naturally, have the ability to automatically analyze and judge, but will also enhance the planning and design ideas.