Programmer A has met programmer B. "Scrum is terrible," said programmer. "Why? I heard that SCRUM is good. Our company is also preparing to implement scrum ." Programmer B answers. "Never, you will regret it ." "Are you implementing real scrum ?" "Of course, we have three roles, four meetings, and three products in scrum ."
Agility is very simple, but extremely difficult. Agile Methodology consists of a series of agile practices, but when people implement agile, they are eager to implement the entire methodology at one time. They pay attention to the simple form of agile practice, but do not understand or do not want to spend time understanding the meaning behind any agile practice. As a result, no agile practice can be done in place and cannot enjoy the corresponding benefits. In the end, we found that the investment was so large, the expectation was so high, and there were so few gains. Agile implementation only brings endless pain points and has to say goodbye to agility.
"Who said I couldn't see? I just focused my eyesight to change my previous views on things?"-Stephen Chow's westward journey. Let's focus our vision on a single agile practice to see if we can change our views on the world.
Pairing agile practicesReview
1.Yes.
A pair of review code is reviewed by two developers. It occurs when a developer completes a piece of code. The division of labor between the two developers is between the code writer and the review developer. The review end-to-end interaction with the code writer to complete the review. The review personnel asked the code writer six questions in sequence: "What functions does the Code complete ?" "Why do we need to complete this function ?" "What is the design idea ?" "Is it in line with the architecture idea ?" "Does it comply with code specifications ?" "Let's take a look at how the Code corresponds to the first five questions you answered ?" (Not limited to security issues .)
It is recommended that you set a review for no more than 30 minutes. The review code should be the code of the last 1-2 days.
It can be simply described as two people, one code segment, six problems, 30 minutes.
2.Available
2.1Code Review
Paired review can effectively solve the problems existing in the review of traditional code. Traditional code review has the following problems: 1) low input-output ratio, most of the problems detected are low-level problems; 2) unstable results, which are heavily dependent on review personnel; 3) implementation of the system and poor sustainability. In reality, few software companies are able to review the code. As I have said before, this is a basic indicator for testing the software development capabilities of software companies. Here, the traditional code review refers to the traditional method of writing code by a person with higher code capabilities.
2.1.1Input-output ratio
The Code review has three levels. 1) the code is standard: the code can run, conform to the encoding specifications, and has no low-level errors. 2) the code is correct: correct understanding of requirements, architecture, and design; 3) code is maintainable: clear business and application architecture, simple design, and good code readability.
Traditional code review focuses on the first level, taking into account the second and third-level differences, while paired review mainly applies to the second and third levels, taking into account the first level. Traditional code review has no explicit rules on review frequency. It is very costly to understand and discover level 2 and level 3 problems. Excluding accidental factors, the highest goal pursued by traditional code review is that all codes comply with code specifications, which is of little help in promoting code evolution. The goal of pairing review is much higher, which can stimulate thinking and promote code evolution.
The six questions of review examine the relevance of code implementation, business understanding, design ideas, architecture understanding, and other dimensions. In addition to the code specification issues, it can more effectively discover business understanding problems and design defects that were hard to find before. In addition, the dual-person mutual supervision method is used to enable active thinking during the pairing review process.
Paired review can go beyond correctness and focus on readability and simplicity to improve the maintainability and scalability of the entire system and product. In the process of pairing review, you must clarify the business, design, and code implementation in a short time. This requires not only correct code, but also clear thinking and simple code, and can effectively avoid unexpected programming.
2.1.2Personnel dependency
Every software company wants better code. To ensure the effectiveness of the review, the traditional code review method relies heavily on people with higher code capabilities to review code that is weaker. This method has significant side effects. 1) people with strong code skills are so occupied that they do not have time to complete their work. 2) This may even cause power competition, who is qualified and who is not qualified is the criteria for determining whether the code capability is recognized by the company. If people are keen on the review qualification of the code, it will greatly increase the company's internal consumption and affect the improvement of the technical capabilities of the entire company's developers.
This is not the case for pairing a review. It does not have much business technical dependency on personnel. In fact, in the process of pairing review, the code problem is often found by the person who writes the Code. For more information, see "Rubber Duck" in "from small workers to experts ". The first time I saw this, I wouldn't believe it. It was a bit intuitive. In fact, most high-level problems are related issues, while human attention is limited, and there are often omissions in relevance when writing code. The focus of the investigation on the six review problems is on association. Often, the review personnel have not responded yet, and all the code writers have found out.
Of course, pairing review has a dependency on people's personality and other aspects. If people who always criticize or write code do not want to show their own understanding and design ideas to others, they will find a quarrel.
2.1.3Sustainability
The review of traditional code is based on the traditional management philosophy. The right thing should be done, and what should be done will be forced by the system. What the system brings is resistance and violation. This is China's favorite sport-style management. If a leader attaches importance to it, it will be better. If the leader does not pay attention to it, it will basically be ineffective. Time has passed in the movement, but enterprises are still standing in the same position year after year.
A pair of review considers sustainability from the very beginning. The cost of pairing review will continue to decrease with the level of proficiency. By the end of the process, it will take 15 minutes every day. However, the gains it brings are sustainable. Basically, some problems can be found every time, and there are other gains. For more information, see the following personal learning and team building. Compared with the boring code, it is much more interesting to communicate with people, and you can joke or something. Interesting and rewarding things can be done frequently or even become a habit.
2.2Personal Learning
Learning is essential for software developers, but learning is a problem. For more information, see "learning for the future. New people face problems such as "Planting mushrooms", and many elderly people face the limit of growth.
2.2.1Newcomer
There is a new cultivation method called "mushroom ". Refer to the mushroom Management Law: "mushroom Management" is a kind of management mentality that many organizations treat beginners. Beginners are placed in a dark corner (unvalued departments or jobs ), let's drop a piece of dung (without any criticism, criticism, and proxy efforts) and let them survive (without necessary guidance and support ). -- Interactive encyclopedia
Another way to train new people is "mentoring system ". The new employee is assigned a mentor to guide the new employee. However, instructors cannot meet the requirements of newcomers in all aspects, and enterprises lack enough excellent mentors.
There is also a new type of out-of-band training, and 3-6 months of concentrated training for new users. This training model is costly and cannot be undertaken by most small enterprises.
Peer review is an effective method for training at work and can be effectively supplemented with the preceding three methods.
New people who are doing well are naturally paired. They know that their code has a lot of room for improvement, and they will take the initiative to ask other people in the team, you will often see them participate in the discussion, actively ask, they grow fast. However, Chinese people are relatively passive, and many new people are still not paired. Their growth may not be as expected. Therefore, it is necessary for new people to promote their own growth, and enterprises to promote their own growth.
Pairing review provides a better environment for new users and gives them more guidance. New users can get to know more about business, architecture, design, code, and other aspects through peer review. The actual code is much more effective than the training. The code written by a newbie can be paired with a review. Various problems are found during the review process and various instructions are provided to improve the Code Quality and learn more.
2.2.2Old man
The problem for the elderly in software companies is the growth limit. After 3-5 years of work, many people have reached the limit and cannot get more gains from their daily work. There are so many high-end positions in the company, and it is impossible for everyone to do experiments at will, although the way to promote experiments is common in the software industry.
Pairing a review can give the elderly a chance to exercise, so that they can gain more benefits from their daily work.
When the elderly review the code of a new employee, they must learn how to ask questions, learn how to mine deeper content from the information, and do not make the new employee feel uncomfortable. Peer review allows the elderly to learn how to encourage and communicate with others.
When the old man's code is reviewed by new people, they should learn how to explain the key points in a concise manner and how to explain complex problems in a simple way, this will effectively help the old people accumulate their knowledge and skills.
When the elderly review each other, they should learn how to PK, how to control the topic within a certain range, how to compromise and reach an agreement, and how to persuade others more effectively.
The above communication, influence, conflict resolution, and problem solving capabilities are essential for every high-end talent, however, many do not intentionally cultivate these skills that are vital to their future development at work.
2.2.3Learning
Everyone wants to be a lifelong learner. Being able to stand out from the crowd in any environment that is superior to others is exciting. However, most people give up because the purpose of their work is the result, so they have to repeat the experience and skills they have learned one day and one day.
Pairing review can effectively combine work and learning. On the one hand, you can get better results with the same time investment, and on the other hand, you can meet the expectations of lifelong learning.
By pairing review, you can learn the knowledge. Whether you are a newbie or an old man, you can see the world through the eyes of more people, learn a lot of business and technical knowledge, new people can grow rapidly, the old man can avoid their knowledge structure become outdated.
You can master the skills through pairing review. For example, the key to the design model is not what the design model is. Such knowledge can be learned through books. In the process of pairing review, you can learn a lot of other people's thoughts on the design pattern, and understand when the design pattern is suitable for use and under what circumstances it is not suitable for use, discovery and Application Design Patterns solve real-world problems. This practical exercise is the best way to master skills.
You can exercise by pairing the review. Communication, influence, conflict resolution, and response capabilities can all be improved through peer review. Many people complain that they do not have the opportunity to exercise these abilities.
Through pairing review, you can learn how to learn and develop learning habits. It is difficult to find a learning method that is more elegant than review. It is simple, safe, effective, and sustainable. It is simple, because you only need to find someone who is willing to talk to you for 30 minutes to start. It is safe. You can identify where the code can be upgraded. It won't make you lose face in the public, it won't affect your assessment. It is effective and can get effective feedback quickly. It is sustainable, a skill that can be used for a lifetime and can be used in any company.
2.3Team building
We all know that a team is different from a group of people. Everyone expects to work for a team. In this team, people not only walk together to complete the task, but also create products that exceed expectations. The work is interesting and challenging, everyone can feel respect and trust. The team is filled with a friendly atmosphere and everyone can grow. However, it is a pity that such a team cannot be requested. Agility tries to describe such a situation to everyone. Many people believe it, but after the experiment, they find that they cannot. The final conclusion is that agile requires too many people and only enough talents can turn agile.
The real reason is that we don't know how to build such a team, and we don't know how to fulfill our dream. Can a pair of review help us?
The key to a software development team is collaboration, not division of labor. Pairing review is the most basic way for two people to collaborate.
2.3.1Expose team issues
In most software projects, people do not communicate with each other, and even a little conflict is only a small problem, as long as they can complete the work assigned to them, after all, software developers are introverted, poorly communicated, and difficult to manage. At the same time, traditional management methods emphasize division of labor rather than collaboration. However, those we ignore will eventually hurt us. We can draw a conclusion from the bug types in software development. More than 70% of the problems come from requirements misunderstanding and omission, these problems may be solved through communication and collaboration.
Pairing review forces two people to sit and communicate with each other. If they cannot communicate and collaborate well, they will immediately be exposed. Solving collaboration problems in advance can not only train the team's ability to resolve conflicts, but also eliminate a hidden danger for future work.
2.3.2Team atmosphere
A good team naturally has a good team atmosphere, but how is this atmosphere formed?
There is a method called ice breaking ". Breaking the ice is an effective way for team members to quickly familiarize themselves with each other. However, if they are not well controlled, they will be "yellow and violent", which will go beyond the bottom line of some people, instead, the formation of the team is damaged. In addition, because most of the ice-breaking content has nothing to do with work, it is still unknown whether people can cooperate as well as they do not work at work.
Peer review is a kind of gentle team building method integrated into the work. Starting from two people, in the process of pairing review, review users need to open their hearts and be honest with their own thoughts. Review users need to think hard and use questions to inspire more inspiration, both parties jointly discover, solve, and share the small achievements of review. A team atmosphere of mutual gratitude, respect, openness and transparency gradually begins to form with the small details in the work. This team atmosphere is gradually formed through long-term careful care and cultivation of review.
Of course, destruction is always easier than construction. Even if they are useful for review, a team atmosphere that is difficult to build can be wiped out by other measures within a few days.
2.3.3Makeup backup
Active position filling is a powerful team capability that allows the team to calmly face the accidents of multiple employees, such as illness and false. However, it is difficult to implement passive makeup. It may be because people are not familiar with each other's work, or because they are not motivated or competent. After pairing the review, none of the above three problems are solved, and the basic problem of bit filling is solved.
Many companies have mandatory backup measures, meaning that if someone leaves the company, the company will not suffer losses. This kind of measure is often intentionally or unintentionally resisted, usually in the same way. The mesh backup relationship formed by pairing review is a more advanced backup relationship, and its construction does not require additional emphasis and efforts.
2.3.4Team behavior Specification
Every good team has their own tacit understanding and behavioral norms. These behavioral norms are not written on paper, but are proudly declared by team members. This is our way of doing things. Such behavior norms can be formed only after a long period of close cooperation. Peer review is a typical form of close cooperation, which can promote a unified understanding of the team and quickly form a team behavior specification.
"Your code looks strange. It is different from our previous style. You see, it should be written like this ." "This business is not so understandable ." "This method is great ." The above words are quickly disseminated in the team by pairing review to form code specifications in execution.
2.4Organizational transformation
Many enterprises are not satisfied with the status quo and want to change. However, enterprises often find that they have been kidnapped by their long-formed organizational culture. The so-called transformation is difficult. What they can do is to change leadership and change the process, does not affect the behavior of most people in the enterprise.
I made a small statistics some time ago. Where did developers spend their time? It was found that a developer only spent 1/3-1/5 of the time writing code, more than half of its work is in the process of applying for permissions, understanding the details of requirements, various meetings, waiting for test results, waiting for release, and querying logs. Can their work be optimized and their efficiency be improved? The answer they get from themselves is yes, but enterprise leaders may not be able to see it all.
Pairing a review does not necessarily have such a big effect. It can only change one person's work performance and the relationship between two people at a time. However, I firmly believe that micro-optimization will eventually reflect the macro-level. If any person does a better job and the relationship between the two is improved, the entire enterprise will be affected and changed.
2.4.1Enterprise culture/Values/Complex System
A relational network composed of individual with certain self-organizing Characteristics in a simple way is often a complex system, and an enterprise is such a typical complex system. A simple way to change a complex system is to change the interaction between these individuals. Common organizational transformation methods include organizational restructuring and process system transformation. These methods fundamentally change the interaction between people.
Pairing review changes the interaction between software developers. When it is promoted to the entire Organization, The Emergence Effect can change the entire organization.
Enterprise culture/value is an example of this emergence. Corporate culture is a manifestation of an enterprise. The way internal employees do things and the code of conduct are the values shared by all people in the enterprise.
Recently I have heard of many "openness, transparency, sharing, and responsibility". These values are believed to be more or less mentioned in the corporate culture of many enterprises. If the management mode of an enterprise is based on information asymmetry and top-down, this control mode is in violation of the above corporate culture, and the enterprise culture will eventually be mounted on the wall, either.
Paired review can lay the foundation for corporate culture at the micro level. The review owner must be open and transparent to the review owner in the Process of pairing the review, and describe his own thoughts and understandings during the code development process. They share their understanding and understanding of business and technology and share the results of software development. As a habit of pairing review, developers establish mutual trust, and people are more "open, transparent, shared, and responsible", all of which lay a good foundation for corporate culture, it helps to implement corporate culture.
2.4.2Knowledge management/Learning Organization/Social networks
Knowledge management in an enterprise refers to positive and effective management of the explicit knowledge and tacit knowledge owned by individuals and communities in terms of confirmation, creation, mastery, use, sharing and dissemination. Peter Shengji's "fifth practice" makes learning organizations widely known. learning organizations refer to organizations that learn to update employees' knowledge and maintain their innovative abilities.
However, most enterprises have a lingering weakness. Knowledge Management in Enterprises forms a document library, which sets up training institutions and organizes a large number of trainings. However, at the micro level, does the growth of employees meet expectations? Is there enough talent?
The key to knowledge management is the flow of knowledge. At present, we are in an age with a wealth of knowledge. It is normal to get lost in the ocean of knowledge. In this case, the controlled and orderly flow of knowledge is the key to knowledge management.
In theory, paired review can be a way for any two people in an enterprise to flow explicit knowledge and tacit knowledge. If we think of an enterprise as a social network composed of two relationships, we define the flow of knowledge between two people, and the knowledge closely related to work flows in the enterprise. The speed at which information flows on Weibo is based on the relationship between the two.
There is also a tactic called "Information bombing tactics ". It is the use of frequent pairs of reviews to form a work-centered atmosphere of information filled up, the use of employees subconscious thinking time, maybe there are any good ideas from then on.
3.And......Related
3.1Deformation
A pair of review can be added although there are two persons in the description. For example, add two or three people to review the code of a person, one of whom serves as the primary questioner and the other two as the secondary questioner.
When the form remains unchanged, there are multiple deformation methods for the paired review.
3.1.1Time Deformation
Pair Programming: The pair review can be seen as the follow-up of programming, and moving forward will become the end-to-end programming. The pair review is similar to the pair programming in XP. Should it be called Pair programming? Otherwise, in the Wikipedia of extreme programming, Pair programming has been changed to Pair programming. The harsh implementation conditions of Pair programming are daunting and cannot be effectively supported by management. Peer review can be recognized by developers and supported by the management layer. It can lay the foundation for Pair programming. In the future, you can use Pair programming when writing key code.
Peer design (agile modeling): Moving the peer review to the programming stage becomes a peer design or even agile modeling. It can be used for key code design and review of user story design ideas.
3.1.2Role Deformation
Peer review can be used for review of test cases between test and test, design ideas of user stories, code or test case review between development and test, and review of user stories between development and test Po.
3.1.3Content Deformation
Peer email review: generally seen in foreign companies. Most developers lack the English skills and communication skills to communicate with foreigners, peer review allows you to send valid emails and quickly master the ability to write emails. When I first worked in a foreign company, one of my managers review emails sent to foreigners with me every time, which gave me a quick grasp of the basic capabilities of English mail. Thank you very much.
There are also a variety of variants such as the pairing Scheme Review, pairing Plan Review, pairing summary review, and pairing pptreview.
3.2What kind of agile practices can help
After pairing review is implemented, it will be helpful for the following agile practices.
Simple Design (XP): Paired review facilitates implementation of simple design practices. What kind of design can be called a simple design? A design that can be clearly stated and agreed upon within a short period of time is difficult to become complex. In addition, paired review can make the code simpler and have better readability and maintainability.
Code standards (XP): Almost all software companies have code standards, which are included in the document. However, the code specification can only prevent code from getting worse to a certain extent. Code compliance does not necessarily mean good code. Code standards only mean that our company has been hurt and our Code cannot be worse than the code standards. Peer review helps to form code standards in execution and ensures continuous code optimization, which may continuously improve code standards.
Agile Modeling: the habit of opening discussions and sharing on review is very helpful for implementing agile modeling.
3.3Benefits of agile practices
If the following agile practices have been executed, you can help implement a pair review.
Every Hitachi Conference: Peer Review is an effective method for implementing peer review at every Hitachi conference.
Review Meeting: the review meeting makes it easier for the team to reach a consensus on the review, thus facilitating the implementation of the review.
Full team: the team members cannot change as they do with resources. This will hinder the preliminary promotion effect of review pairs, and the complete team practices can provide some help.
3.4What agile method is used?
From the above deformation, we can see that pairing programming, pairing design, and pairing review are the key. Here we have summarized a basic agile method and paired it. It seems that the so-called agile practice may be the result of the application of several Agile Methods in software development practices. These agile methods can also be applied to non-software development.
What agile methods exist? How to apply these agile methods? Is it better to understand agile methods? We hope you will have the opportunity to share your understanding in this area later.
3.5Relationship with agile values
See agile values and the values in scrum and XP. I will not repeat them here.
This article is too long. For more information, see the relationship between review and corporate culture/values.
3.6What agile theory is applied?
Complex Systems: many concepts and ideas about self-organization and emergence in agile systems come from the complex system theory. Modern learning organization/knowledge management and enterprise management theories are also related to complex system theories. For your reference.
4.Implementation methods and Cases
Please refer to the previous series of articles "Peer Review", and consider introducing a more complete agile implementation methodology and cases later.
5.Postscript
I did not expect this article to be written so long, so tired. In fact, my intention is to give a summary of the review practices that have been being done this year to complete the process. I don't want to talk about it much more. Later I want to make a similar analysis of the relevant agile practices, and start to understand and understand agile based on it, discuss agile implementation methodology and describe some cases. Now it seems that the above goal is simply a book. Write this book as one of the 2012 goals. Wish all readers a Happy New Year!
PS: without special instructions, most of the terms in this article come from Wikipedia.