iOS zero-Starting Code Review

Source: Internet
Author: User

Http://www.cocoachina.com/ios/20151117/14208.html

This post is not about the methodology of code review throughout, but the previous paragraph documenting how our team has never had this habit to review every day, and the small section gives some of my suggestions. I hope to be of help to your team.

The first team to come to this new group was the wood with code review. Head said, this month you come to do it.

When I first knew I had to get review, I actually refused! Because I think ... Ah ... You can't ask me to do it right away. First, I want to try, I don't want to say ... There is no such habit before the team. After I had done that, that delayed the daily work time AH. As a result, my colleagues will scold me and give them extra work. I said let me try it first. What now... Every day in the review! every day in the review ... I also promoted to other teams! Come on!

Feel the difficulty, do not get up, want to refuse the reasons are many:

    • Team members finish writing requirements, no code review consciousness.

    • Technical atmosphere is not strong

    • Uneven levels

    • There's no right tool.

    • ...

But in general is a, wood has code review. If there is, whether it is really engaged in, or formalism, the host is not difficult.

From zero to one, from scratch is always difficult, we started a number of ways to try:

First attempt

The original version was written by other teams, and when our team took over, everything was on the tree. What comma equals the left and right spaces, the first letter of class name lowercase, the method name capitalized; depend on the mess; Write a business in view and send a network request in view. When I saw this code, I was in a broken heart.

Let me try one person to help the whole team review. Scattered look for a few days, the problem code affixed to dozens of PPT, groove points too much, looks very moving. Later I gave up.

Conclusion

Code Review It is not advisable for a person to carry N-person codes.

Second attempt

Pair programming can be seen as an agile code Review. Direct pairing will Beatles the death. So I thought about stepping on a new pair of pairing programming.

Two programmers new knot pair team, each person a computer, sitting in the adjacent station, the two partners to complete a set of functions (can be two or more independent modules) design, code implementation. But for a certain module design and code is separate, one person is responsible for the design, the other person is responsible for writing code, for other modules and vice versa.

When I was in the team to find a pair of partners, found that the wood can design modules, project progress is similar, can be pairs of small partners.

Conclusion

The Code review requires ground gas.

Third attempt

The third attempt, I want to use a game method to carry out the review

    • Each time the review presided over, by the guys elected to find the least bug of the students to preside.

    • At the beginning of each round, first put out the code, by the following students say the problem. (This is the time to pay attention to the next students who have found problems in wood)

    • Finally, all the questions are listed by the host students.

    • Go to the next round

    • If often the following students say more than the host, the host continued the next day.

    • The host classmate, the daily minimum prepares 6 questions ppt broken.

    • The problem pointed out by the moderator to specify a modified classmate modification.

    • The second day of the host responsible for the day of the bug into the Jira, and responsible for tracking these fixes.

It's too idealistic, it doesn't work.

Conclusion

Do not feel good is good, Code review is a team thing, the plan is decided to take out to sneak.

Fourth attempt

Helpless, I went to ask my head, how to open this head. The head gave two words: pressure.

So the small partners under my mercy carried out the first code review. I used the first ppt I've compiled. The effect is unexpectedly good. The little friends spit each other out of the slag code I pointed out, the atmosphere is very happy.

However, the key issue is not a unified standard to change. So I immediately arranged a code to share. The next review, the point of the big goods spit groove is relatively concentrated.

Conclusion

Code review need to have standards in the early stages. Let the little friends how to review.

Fifth attempt

Since the atmosphere was good, a small partner a proposed to take out his responsible modules to collectively review. Have the initiative, of course, cannot refuse. The rest of the day was review his module. Incidentally also did a design share of his module.

In one day's review, a small partner, B, says that the site refactoring is not what he is good at. US: What are you good at? Small Partner B: I am good at xxx. Me: Next week you can share it with the big stuff. Small partner B: OK, I'll get ready.

As a result, small partner B is hidden, continuously sharing a whole series.

Conclusion

Wen Tao has successively, the operation industry has specialized, do not underestimate your small partners.

Sixth attempt

The task I was hanging on was code review, so I occasionally looked at the small partners ' codes. One day suddenly found a small partner C, in the refactoring optimization code. I take advantage of and he said some of the programming aspects of thinking and skills, tell him can also be so refactoring, with tabular hair instead of conditional statements, using polymorphism instead of conditional statements, using runtime to generate the method name, runtime execution method. So he also came out with a technology to share. It's a pity that the sharing of ideas about programming is so intense that it can only come slowly. But when we finished eating fast 8 o'clock back to the company, found that there are two small partners de in writing demo, before the discussion C technology sharing.

Conclusion

The idea of programming needs to be slowly realized, not a brain of irrigation.

Seventh attempt

Once review, I had to leave early. However, this is half an hour to share the feeling not to have fun, and extended for 20 minutes. There were a couple of previous shares that I didn't host. Subsequent review I will try to further dilute my hosting. Let our review be able to go on with self-organization.

Conclusion

The Code review needs to be in the right state-no need for me to be able to run, or it will be a political task at the end.

Postscript

As the number of teams increases, the collective review will also be adjusted, and we will introduce some code review methodologies and tools. The beginning of everything is difficult, since it has opened the head, I believe that the subsequent adjustment is not difficult.

Suggestions

How to make a zero-based code review, my advice is:

    • Tech leader to get everyone started code review, that's the most important step.

    • Scheduling technical sharing of coding specifications

    • In the early review, this code review how to carry out, where can improve

    • Encouragement for active classmates, support on-site refactoring code

    • Not only can review the code every day, but also can arrange the whole field of technology sharing

iOS zero-Starting Code Review

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.