There are four, communication, simple, feedback, and courage, and the four principles that everyone will pay attention to in the process of usual. But the two masters Kent Beck and Martin Fowler can bring these four points to make them a common programming of this four-wheeled carriage, but it is a small creation.
Let's talk about the four cores of these four cores only on the problems encountered during your own learning and simple practice.
One,
communicate with
1)
Exchange of developers and customers
This is similar to traditional software engineering. In the process of usual development software, it is also very payable of communicating with customers, especially during demand analysis, summary design, and acceptance testing, it is necessary to communicate with customers. Less, that will directly affect whether a project can meet customer requirements.
However, in the development phase of the customer in the extreme programming, the traditional project development process, the customer only needs to be with the developers in the initial time and the last time, their responsibility is the help of business functions. However, this will inevitably lead to such a condition: the customer proposes the wrong or inaccurate demand in the initial time, and then the project team starts to develop, the customer does not intervene in the project for a long time, and in the project acceptance It is found that some places have errors or needs to be modified. At this time, the project team has to pay a lot of time and energy to adapt to the needs of our customers. This is a lot of waste on time and funds. In extreme programming, there is a very master of business, but they not only provide information on the business, but also to write test code for business acceptance tests, which can guarantee the direction of the project in a large extent.
The process of extreme programming is "aiming -" shooting - "adjustment -" Adjust "process, does not force to accurately grasp the direction of the project at the beginning of the project, due to the existence of on-site customers, the direction of the project is constantly adjusted In this way, you can greatly avoid the project to walk.
2)
Communication between developers
When we recruit developers and other staff, we will emphasize the team spirit, but in the actual work process, we will ask others in addition to problems, and when they solve it, they will ask others (I It used to be like this, maybe everyone will be different), then everyone can get together, eat, eat, sing, and other development processes. These can indeed produce certain cohesiveness among the team, allowing everyone to live in harmony, but there is still a certain gap from the truthful team.
The education we have received has been cultivated to independently solve the problem, so when we encounter problems, most of them think of themselves, rather than doing with others.
There is a very important principle in the practice of extreme programming. This is a programs that seem to be a bit strange. Because the question we think is to let two people do one thing, then isn't it to waste a person's productive power? But actually, this so-called pair programming is not a person in programming, and another person is watching, and another person also plays a very important role. His brain is still running, he needs help to encode The person finds a low-level mistake, preventing a directional error, especially when a person who is encoding is not good at solving the problem, he will directly take the keyboard directly, and the role is directly encoded.
The benefits of doing this may only be able to experience after practicing, but it can not only avoid some errors, but can solve some problems that are prone to disambiguia can be solved by direct discussions. And the sparks collided with the two people's ideas can solve the problem more quickly. Moreover, in the process of communicating, the level of everyone will increase quickly. The process of learning the program is also the process of learning. (Unfortunately, I have only one person here, there is no way to practice long-term, but as long as I have a chance, I will work hard) 3)
Exchange of developers and managers
In a project group, the relationship between management personnel and developers is a very important factor affecting the project. If it is not working, it may directly lead to failure of a project. The quality of managers is more demanding. If it is a manager transformed from a technician, his management capabilities need to be greatly improved, otherwise it will lead to the chaos of the project due to the lack of management capabilities. For a simple person with a simple management skill, it is very important to get the technician's admire, otherwise it will not allow the developer to listen to management, then his position is precarious.
Moreover, if developers can communicate with managers, then their working environment will be greatly improved, and they don't have to be very luxurious rooms and senior furniture, just a very comfortable environment, You can make a big improvement in a team's combat power. Moreover, for a project plan and budget, if the developer can make your own ideas, it will avoid the event that the final resulting from the project is not the result of profit.
Managers should also actively listen to developers' opinions. Many developers are some introverted people. If they do not ask them, they will only bury their dissatisfaction in their hearts, and the final result is sudden outbreak. Then resigned away, causing a significant loss.
two,
simple
1)
Simple design
In the process of extreme programming, a simple design practice is advocated. This is because too many design documents will make us waste too much time on it, and the design document has not been modified. Maybe the original design document has long been made to have nothing to do.
Therefore, we must do the most important function we have to achieve in the original design work, then design the overall framework and core technology, these documents will not exceed the top ten paper from the end, so even if there is Some changes, we don't need to spend too much time to make changes. Especially after you have modified, we don't need a lot of strength to let the code and documentation are exactly the same.
However, simple design does not mean that these design can be available. In contrast, the simple number of paper is more important, because the core content of a project is above, so it must be cautious in the process of writing.
2)
Code simple
The simple manifestation of the encoding is in the process of iteration, and there is no need to implement all the needs of all the required functions. It does not need to be changed in the future, and the change is advocated in extreme programming. We can first simply implement a point, then add more content, then reconstruct the program, the final code will be very simple, because in accordance with the principle of reconstruction, all classes and functions, process It is very short instead of lengthy, and the functions per module completed are very clear.
However, don't put simple and casual equivalents. Although we have to achieve simple coding, there is still a code of coding, so that all people can easily understand the procedures we write. Other iconic properties should be defined by nouns, and the process should be used to start with the verbs, and we should follow.
3)
Comment simple
In some projects, the comment requirements are very stringent, and even the amount of annotation in a program must reach a percentage. This first thing seems to be reasonable, because the comment can make us better understand the function of the program, but it is impressed, but it is not a matter. I have said that "the general programmers can write the procedures that the computer can understand, and a real master can write ordinary people can understand." It is indeed that, with it to explain the program, it is better to use everyone when you give the variables and procedures, and you can understand it, even if there is not much comment, another programmer wants to read the program you wrote. It is not a very difficult thing.
Therefore, in the process of writing code, you should use the code itself to explain the problem, not the help of the annotation, we have to write the code, if there is too much unrelated code, on the one hand, we will waste us The time may also cause ambiguity; on the other hand, it should not be more inconsistent to Microsoft's Windows Source Codes. Those comments are only the effect of decentralization of people who will read code.
4)
Simple test
Usually our project is based on the development of waterfalls. After all the test will be done, including monomer testing, integrated testing, functional testing and acceptance testing, and most tests are done by manual. . So according to the experience, if the code is used for 20%, it is tested at least 40% or more. And during the test, there are many problems need to be modified, which also leads to a lot of time for testing.
In the limit programming, the test is dial by writing test code. Especially in some object-oriented programming environments, we can use the XUnit tool to quickly and effectively perform monomer tests. Moreover, these monomer test code can even be before formal encoding. After each modified the program, you have to run the test code to see if there is a problem. And for the integration of the program, the limit programming is continuous integration, which is constant to prepare a good code module that has been integrated through the single test module to the system, where you can use Test Suit's integrated test, thus Guaranteed that the code will not affect the entire system.
We can see that the encoding and testing in the limit program is a small step, so it is convenient for us to find and modify the error. The automated test tool guarantees our work efficiency and allows us to avoid too much repetition.