The meaning of Code review
Programmers in the world, different people, different backgrounds, different work experiences, levels and habits vary.
Like Loeb and cabbage, who will not abandon who, it is because they have different standards, and in the process of the world, from the open source community, there are countless predecessors according to their life experience summed up the law, is gradually becoming the standard of the procedural standards, with the standard, who went crooked, who walked right, at a glance.
China's special national conditions, resulting in the programmer is not respected, lack of engineer culture, resulting in programmers to move more frequently than the traditional industry or other occupations in the Internet, resulting in lines of business code is constantly being * * *, miserable, extremely difficult to maintain, not programmers are not serious, but the enterprise does not specify standards, Everyone in their own best way to do, nature is colorful.
Most of the work of programmers, boring, especially work for many years, all kinds of business models have come into contact, are constantly repeating themselves, not only the technology will not grow, the original passion has also been lost, reduced to real yards, no ideas, no self.
High-quality code is like art, a little bit less is not so natural, unified norms, let you review code is feeling team and one effect, like the martial arts of the human Sword of the realm, no matter how the rotation of the programmer, the standard is the same, is the follow-up management and maintenance costs greatly reduced.
Do not want to see the code to vomit, do not want to hear "fuck, who wrote the code, have the basic qualities?" "Such complaints, want to every afternoon to a cup of coffee, from code review start bar, below you recommend two review magic."
Gerrit Features and deployment
Gerrit is a free, open source code reviewer, with the earliest versions written in Python, followed by a gradual change to Java && (MySQL | | H2), the efficiency has been greatly improved, the following gives the introduction of Gerrit installation, just the key point of introduction, no fool's teaching.
1) Install Git
2) Install Gerrit
3) Install Nginx
4) front-end with Nginx forwarding
{{{
-
Server {
server_name review.mastsumassage.cn;
Access_log/var/log/nginx/review.log;
location/{
# Proxy_set_header Host
auth_basic "Code Review Site";
Auth_basic_user_ file /usr/local/review_sites/etc/passwords;
Proxy_pass http://10.5.0.10:8000;
Proxy_set_header X-real-ip $remote _addr;
Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;
}
}
}}}
5) gerrit.conf Configuration
6) Create user
7) User Login & Register Email
-
When the user logs in, the user enters MySQL and then needs to set an email to the user. Of course, if you configure the SMTP, then this is not necessary, if not, it is necessary to manually register the mailbox for the user to use in the development process of email notification.
-
{{{
-
}}
-
The configuration for this Gerrit is over, followed by the creation of the project, but this is relatively simple.
Gitlab Features and deployment
Gitlab is an open source code moderator, written in Ruby on Rails, simple and efficient, fully functional, easy to use interface, project management and group management and support code multi-mode review, deployment is extremely simple, highly recommended by individuals.
Gitlab Official website has done the detailed installation steps, simple and efficient, please refer to: https://about.gitlab.com/downloads/
After selecting different operating systems, the installation methods and steps of different systems are given automatically.
Depending on the experience of the individual installation, there are some areas to note:
Install MySQL in advance without a password so gitlab can import the database.
Gitlab software download, and difficult, the file is too large, and the resource station is not many.
Gitlab configuration is simple, according to the steps of the official website will be installed on the SMTP mail server, more than Gerrit to stay cool.
After installation, direct IP access is OK, if you need to set up proxy, domain name can be in:/var/opt/gitlab/nginx file simple modification. A restart is required after the modification.
If you need a package, leave a message, email address, thank you.
This article is from the "Architecture Technology Digest" blog, so be sure to keep this source http://wufaliang.blog.51cto.com/3160882/1617960
Company code review Gerrit VS Gitlab