A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service
1. Project Design
The dominant idea of project design can be understood as two types: full design and simple design.
Full Design refers to investigating various aspects of the software before writing specific code, analyzing detailed requirements, and compiling all development documents, after all the procedures are designed, write the code again. In other words, after all the plans are completed, we can see the final view and start the war again. This is what many "Software Engineering" books require. At the beginning, I thought this method was good. Everything has been planned. Just do it. But there is an obvious question here: who is going to make this perfect plan? It is estimated that there are only people with BT, but most people want to completely design, and there are no errors, or there are already several backup Fault Tolerance solutions that can be accurately implemented. To achieve the final goal. Such a realm is impossible without many years of work experience. I didn't have this skill, so I gave up this idea.
Simple Design: a simple design concept, an acceptable and simple design. At the very least, the database has been finalized, and the basic process has been finalized as the beginning of the program design, the specific functional design can be modified at any time based on the actual progress. However, the modification of this function cannot be to modify the database structure. That is to say, the database structure has been repeatedly demonstrated before programming. This method reduces the time required for preliminary design, puts code writing and some design work together, and actually shortens the project development time. If the complete design method requires a very strong preliminary design personnel, then the simple design requires a very well-designed programmer. Programmers are not only people with K code, but also responsible for the design of the program architecture. Therefore, programmers have high requirements. A successful simple design is based on a simple logic structure designed by the programmer and its logic structure can be adjusted as needed, that is, the code structure is flexible, another change brought about by simple design is that there will be more meetings and interactions between programmers will become very important. Nowadays, Small and Medium software companies generally adopt simple design unless they are very large software companies.
To sum up, a simple design tests the capabilities of developers. Full design tests the complete capabilities of the preliminary design personnel and the entire project team. (Developers must write some of these documents .)
2. design changes and demand changes
What do developers fear most? Design change or demand change? I think demand changes are the most critical. After your project database has been finalized and has been developed for several working days, we suddenly received a proposal from Party A that a function should be changed and the original requirement analysis should be revised, if the modification involves modifying the table structure of the database, it is the most fatal. This means that some parts of the project have to be re-launched. If this part is related to multiple completed parts, the consequences will be even more terrible. So when this happens, as a project manager, you should first check the owner, whether your demand analysis is not good enough, if the customer approves the change made after the demand analysis, you can fully ask the customer to take responsibility for the change! Sorry, Mr. customer. The new requirements will be included in another version. If it is to change the definition of a previous requirement, it may be necessary to re-launch it, but at this time, don't worry too much. After all, the customer is wrong. (The project has not clearly stated its needs before the formal start ). Therefore, after the requirement analysis is complete, you must ask the customer to approve the signature before starting the project and specify the signature in the contract, when the demand changes caused by the customer's reasons lead to an increase in development costs, the customer needs to pay for it.
If the design changes without changing requirements, it is only the internal conflict between us. In a simple design, because the preliminary design is incomplete, the design changes may occur when any new module is developed. The level of the developer determines the quality of the software.
3. Code Writing
When the requirements are determined, the database is also determined. In fact, we can perform substantive encoding. According to my opinion, it is best to program a person independently and be able to be lazy at any time. (Surfing the Internet and chatting with MM), but now the software project is getting bigger and bigger, and the construction period is getting tighter and tighter. In fact, there are 3-5 programmers in a group, so we should emphasize teamwork. So the code you write allows others to understand it. We must have detailed coding specifications in the actual coding process, which have been mentioned in many books. But at least the following rules must be observed:
1) source program file structure:
Each program file should consist of three parts: title, content and additional instructions.
(1) Title: the comment at the beginning of the file. The content mainly includes the program name, author, copyright information, and brief description, if necessary, more detailed descriptions should be provided (separate comments with blank lines ).
(2) functions such as content control registration should be placed at the end of the content section. The class definition should be in the order of private, protected, pubilic, and _ pubished, and each part should have only one, data, functions, attributes, and events are ordered in each part.
(3) additional instructions: supplementary instructions at the end of the document, such as references, can be placed at the end of the title section if there is not much content.
2) Consistency of the interface design style:
Because visual programming is adopted, all interfaces are similar to Win32 methods, and most of the corresponding controls are standard controls in the Windows operating system, in addition, I have referenced some other enterprise internal management applications related to the market.
Based on the simple and easy-to-use principle, the user interface adopts a Windows-style standard interface and the operation method is the same as the Windows style. In this way, the customer training can be reduced during the implementation process, it also makes it easy for users to learn.
3) Editing style:
(1) indent: the unit of indentation is Tab, and the size of a Tab is four spaces. Global data, function prototype, title, additional description, function description, and label are all written in the top level.
(2) Space: The data and function are of the type, such as _ fastcall. The space is appropriate between the names, and the matching conditions are correct. If the keyword principle is exceeded, no matter whether there are Parentheses or not, use spaces to separate the comments added after the statement line and align them as much as possible.
(3) Alignment: in principle, closely related rows should be aligned. alignment includes type, modifier, name, parameters, and other alignment.
The length of each other line should not exceed the screen size. If necessary, wrap the line properly.
(4) blank lines: There are two blank lines between the parts of the program file structure. If not necessary, only one line can be left blank. Generally, there are two blank lines between function implementations.
(5) Note: There are three requirements for the note:
A. It must be meaningful;
B. The program must be correctly described;
C. It must be up-to-date.
Annotations are required, but not too many. The following are four necessary Annotations:
Title, additional instructions;
Function Description: almost every function should be properly described. Generally, before the function is implemented, it is added before the function prototype without function implementation, the content mainly describes functions, purposes, algorithms, parameter descriptions, return value descriptions, and so on. If necessary, it also describes the specific software and hardware requirements;
There should be a few instructions in areas where the code is unclear or cannot be transplanted;
And a small amount of other annotations.
4) Naming rules:
Adhere to the Hungary variable naming convention. All identifiers are abbreviated in English or English. Do not use Pinyin. the first letter of each word in the identifiers is capitalized, add the "_" interval word when necessary.
4. BUG fixing
Who will fix the BUG in the program ......
The best way is to write, fix, or modify. Modify the code by one person. The Code modified by two people is repaired together.
5. testing by developers
Testing by developers ensures that the code runs normally. errors found during development are often easier to correct. (Another advantage is that no one will scold you. Because only you know ). However, once the software has a problem with the test team, it takes a lot of time to fix the BUG. If the customer finds the BUG, the time will be longer, the pressure on developers is also the biggest challenge. Customers> companies> test teams> developers. This is completely inverted-pyramid, and it is easy to get things done with poor affordability.
In addition to ensuring the normal operation of the Code, the developer's test also has an important aspect: ensure that the code that runs normally last time can still run normally. If this is not done, the BUG will appear continuously, and many bugs will appear repeatedly. So the software seems to have fixed bugs. If this happens, it is necessary for developers to educate again. There are four types of company education. First, wage deduction, second, overtime, repeated overtime + mental attacks. The third type is exclusive. Fourth, mobilize people to help the guy who is in trouble. I hope that the people who read this article will not be given the first three types of education.
Start building with 50+ products and up to 12 months usage for Elastic Compute Service