google website development tools

2022.03.15

(google website development tools)Google's in-house developed tool is the world's leading,It provides a solution for many pain points of large-scale software development。But almost all of the tools are tightly coupled with Google's unique internal ecosystem,Can not be used in other contexts。This article describes how to introduce better development tools in software development,Improve productivity and team members themselves,Thus effectively disseminate best practices in large-scale software development,Engineering for the company to enhance efficiency。

This article was originally published inabout.sourcegraph.com(《An ex-Googler's guide to dev tools》),Authorized by the original author,Depend on InfoQ Translation and Share。

Years ago I worked in the short term Google。Despite the gloomy After thereafter,However, during Google access to their internal development tool experience,I had a long-term impact。In many ways,Google's internal developer tools is the world's leading。Google not only in the expansion of its own software system at the forefront,But also in the efficient method of constructing large-scale software is the leading。Google code base for scale、Code discoverability、Organizational issues as well as multi-service deployment share knowledge to provide a solution,Most companies have not yet reached match the height。Reference,recommend《Google Software Engineering》(“Software Engineering at Google”)This book。

But from another perspective,Google's internal tools is very limited。In fact,Almost all of these tools are tightly coupled with Google's unique internal ecosystem。This means that once people leave,Unfortunately you can not use these tools in other contexts。

despite this,The Google staff departures talented lessons learned in the work of the world's leading technology organization,And then injected new impetus for many other organizations。But other than Google adaptation programming development environment is not easy,In particular, some tools they have formed no way dependent on the use of。

(google website development tools)these years,I learned a lot from themselves and many others who leave Google。Sourcegraph Many early customers,It is because they missed the original company code search after leaving Google and find us。By working closely with customers,We understand that they desperately need to fill gaps,And then to build Sourcegraph Capabilities to meet their needs。Former Google employees are exploring how to use the new mode of development tools in the current organization。The inspiration for this work comes from their use of Google development tools and have experience。Of course,Some exploration was successful,Also some sink like a stone。

This issue,I think writing a practical focus on the practical operation and external development tool guide is very meaningful。Can Google's internal development tools ecosystem cloned directly into new company,No doubt many former Google employees desire,But it should not be too ambitious。Now I will talk about my views,How to talk about Google employees before the valley began to look for them and their new team work as efficiently as possible tools。

Software development life cycle

(google website development tools)For people just leave Google and other companies to join,You may find it difficult to adapt to the efficiency of watered down。Although we all feel the need to make some improvements,However, it should be where to start?The first step requires careful consideration,Is how to find daily work from the point where the real pain。

Both for internal Google or other organizations,Software development life cycle are basically like this:

  1. Lists the characteristics to be built,Or need to fix software defects;
  2. By reading a lot of code and documentation,And to carry out exchanges with colleagues,Build awareness of the problem,And generally gives a solution suitable for existing systems;
  3. Begin programming。First thing to do to run out of,You may need to be repeated during the part of the code and view the document。
  4. Once the code can be executed to the extent,Then do not rush delivery。Doing code testing,Repair the defect and further testing。And then refactor the code,Generation of clean and easy to understand the code taken over by。Code generation library branch code that pushes,Waiting to run continuous integration。During the code might achieve some additional fixes and small improvements section。
  5. Submit code patches for review of,Team members make changes based on comments given。This process may be repeated several rounds,By changing the code until the auditors。
  6. Merge patch,And make deployment。
  7. Monitoring operation of the system has been deployed,Determine if there are problems in the production environment。If the new patch lead to system downtime fight,Responsible for fixing the problem。
(google website development tools)Each stage of the process,We need to be undertaken under the applicable development tools aid。Development tools guide developers to play by the rules,Dominated workflow,Control the work efficiency。

google website development tools(google website development tools)

google website development tools(google website development tools)

Appropriate tools are selected,In order to improve development efficiency。I recommend a Github Code library,Address
https://github.com/jhuangtw/xg2xg。Which lists almost all of the internal Google tool,External tools and includes a corresponding function。A list of very detailed,But the slightly lengthy。

Initial stage:Familiar with the existing tools,Do not introduce new tools

When we just participate in a project,Do not try to make any changes to the status quo,Just follow the old practice。

(google website development tools)As a rookie team,Or less likely to have the right to be able to affect the entire team to cater to your personal preferences tool。also,You also lack understanding of the team's way of doing things and things that cause and effect。That set mechanically Google,Maybe not apply to new team。therefore,The first is to comprehend the new team works and taboos。

Start from the easy improvements

I think first of all can be improved,It is the code search function。Since I itself is a co-founder of a company's code search,Certainly think so。at the same time,More convincing reasons given below。If the reader does not agree,Large skip this section。

  • Code Search is part of the daily tool Google former employees usually missing。
  • You can try it yourself various code search engine,Really easy to find out the options recommended to give others。That means you do not need to get permission leaders,Do not take the risk to catch his character try to convince others that you have not used their own tools。
  • Most teams have not used the code search tool,So the question to force others to change existing habits do not exist。If the team is already in frequent use very good code search tool,Feel skip this section!

The new company may have multiple teams,Then we will inevitably processing capability beyond a reasonable range of personal code。Even working in smaller-scale company,We also may get a lot of open source code via dependency。When building new features,Or when tracking the source of some serious errors,Require in-depth study of all the code in some cases。

Given the current code size almost all developers need to face,Undoubtedly inefficient code search will seriously hamper the progress of development,Lead step was hard。

When select code search engine,The following factors should be considered:

  • Query Language:Regular expressions are a standard。Ensure that the code search query language has a good expressive,And easy to use。Provide intuitive search by word,And provides advanced pattern matching capabilities。
  • Expansibility:Ensure that the current size of the code search engine for code library。If the size of the code base for several monthsGB,Search engines need to consider whether to support the three yuan word indexing techniques。The technology is suitable for large-scale code base of regular expression matching。
  • Code View:usedGoogle Code SearchPeople understand,Search only completed part of the work。When you view the search results,Similar toIDEView Code in the same development environment,Jump to define the functions needed to support,And easy to find references。If the code view is not powerful enough,Then you need to frequently switch between the editor and the search engines。
  • Authority:If the business mandatory code library authority,Code Search engines need to consider the suitability of authority。
  • Overall costs:You need to consider the cost of deploying code search engine,And the overall maintenance cost of online use。

It is currently used by major search engines, including the code:

  • OpenGrok:OracleThe product,Most historic,Also been used。
  • Hound:Section byEtsyCreate and open source code search engine engineers。
  • Livegrep: Depend onStripeofNelson ElhageCreate a code search engine。
  • Of course,And ourSourcegraph。

Good monitoring

Another consideration is the monitoring aspect improved as soon as possible。Engineers sometimes have to deal with problems in the production environment。But production is very different from development.,Unable to add a breakpoint or directly printf And see the effect in several seconds。From computing resources、Developer time、And the worst is to give users and customers.,The cost of doing updates in the production environment is particularly high。

The deployment has undergone huge changes in the past five to ten years.。Micro service、Kubernetes、Cloud migration and other technologies,Greatly improved the company's software deployment。Many companies use these new ways and new technologies,However, there is no need to update the monitoring structure to facilitate debugging new production environment.。

(google website development tools)Good news is now have some good open source tools and companies.,Greatly improved the monitoring and observability status outside of Google。

  • Prometheus:A signBorgmonTiming metric tracking and visualization tool。Apply the application tracking metric for the user to display the dashboard,E.gCPUuse、Error rate、p90Situation, etc.。
  • Grafana:A signViceroyDashboard tool。Common scenarios are connected toPrometheus,Build a view of a series of key indicators on a single page,Show the overall health situation。
  • Distributed tracking is an essential tool for multi-service architecture,Here,Google DapperLeading the lead。LightstepByDapperOne of the foundersBen SigelmanLaunched project。Distributed tracking is the characteristics provided by many monitoring systems,Tool toolHoneycombandSentryWait,as well asUberOpen source tools launched by engineersJaegerWait。
(google website development tools)Considering that monitoring must be integrated into the production environment,So searching more difficult than introducing code。To introduce monitoring needs to change the deployment environment,This means to persuade a team that controls the deployment environment。Monitoring may also need to add a dashboard code,This involves submitting patches to all instrument dial code related teams。But introducing such new tools does not require anyone to change existing habits,In a sense, it is not an irrelevant。People can choose whether to use new tools,This avoids facing strong objections when we implement new tools。

Step by step:Code review

(google website development tools)Introduced code search and monitoring,Will not change the existing workflow of other team members。But improve the code audit tool,You need to cooperate with。

For people with Google work experience,It is very likely that it is not very suitable for code review methods outside Google.。For common code audit tools GitHub Pull Request(PR),Complaints focus on the following:

  1. Not intuitive enough,Sometimes you can't view changes made since the last round of audits。Simple path only supports viewing significant differences;
  2. Change request requesting to support backlog(Stacked CR);
  3. Overall all the differences in all files in the same page,It is difficult to track audited items;
  4. GitHub PRThe review implementation is not characterized(unopinionated)。If you don't add a third party integration,The review process is loose。Even the third party integration,Indicate forced fine-grained audit and checkout strategy;
  5. Despite the vague of some languages“Jump to definition”(jump-to-def)and“Find reference references”(find-references)Limited support,But far from the internal use of GoogleCritiques level。

and Critique The closest google tool is Gerrit。Gerrit Earlier Rietveld A branch,and Rietveld It itself is Google initial code audit tool Mondrian One open source branch。Because of the inheritance of the tool line,The two look very similar,Designed for creating code auditing methods supported by Google。

Phabricator It is Google before Google staff likes to replace Github PR Another tool。Phabricator At the beginning is Facebook Code audit tool,Subsequently open source and release。This toolPhacilityCompany support,Provide managed instances and service support for users who don't want to maintain instances。

Before Google Piotr Kaminski Created Reviewable Is another tool worth recommending。Unlike Gerrit and Phabricator,Reviewable Used only for cloud,Provide a code audit experience similar to Google's internal。

Recommended to other members of the team Gerrit、Phabricatoror Reviewable The advantages,It is important to point out the pain points of the team's existing code audit tool.。Hereinafter Github PR Class tool steering class Gerrit Some pain points solved by tools:

  • GerritProvide clear issuance(sign-off),Helps the review process more structured。If the system enlays the team and enforces more stringent review strategies throughout the organization,This feature is very easy to use;
  • GerritEasy to review a lot of differences,Support for one by one、Changes after the last round of review and backlogCRReview,Offer faster、More comprehensive review。

Gerrit、Phabricator and Reviewable Audit process similar to Google's internal,But no target code intelligence function。If the current code audit tool does not have code intelligence,Or discover GitHub PR Medium deficiency code intelligence,TrySourcegraphBrowser extension。It connects to Sourcegraph Example,Provide tool help for code audit、Jump to definition and cross-reference,support GitHub PR、Phabricato and Bitbucket server,Implementation Gerrit support。

Prepare the Dragon

Software development of the most tricky part of life cycle,Usually continuous integration and building systems。Because it is necessary to understand,Never understand each part of the entire code base。Accelerating the construction speed is the desire of everyone,So everyone has used some techniques and optimization measures in building code.,Further, it is possible to truly ensure that the number of people who do not have any negative impact do not produce any negative impact.。

in short,Building system is usually thousands of Wanxu(giant hairball)。While respecting the improvement of underlying developers,It is necessary to clamine one by one。I want to have already found the dialect of the seedlings.,Blaze Is the best tool,Google is even Blaze Derivative product Bazel Open source provides help。but Bazel Finally Blaze,Google's external environment is not applicable to Google Tools。As an example,Blaze Lack in Bazel Large-scale distributed construction cluster features provided by the package package。

Bazel Not a panacea(silver bullet)。exist Bazel First release,Go Many open source projects in the community are for standards Go Build a favorite and turn to use Bazel。But within one year,face Bazel Complexity and difficult defects(And look Bazel The construction speed is also slow),Many projects turn back Go Community。Although the current Bazel right Go Support has made great improvements,But when turning to use it,Still need to make a serious assessment of the improvements obtained。

Strict assessment,Need to have some easy development tools。Especially good code search tools,In this way, we can effectively study the build scripts of each part of the code library.,Understand their coming dragon。Need very good code review tool,Because the change building system is a complex thing,Need support for multiple different engineering teams。

Once you are ready to Dragon,exist Bazel There are other tools that can be extended from the design of the scalable build in the design of the large-scale code base.。include:

  • Facebookwhich providedBuck;
  • JavaSome fields are widely used in the fieldGradle;
  • Pants,Before a Google, employeesTwitterandFoursquareDevelop;
  • Please,It is also a new build tool for Google's new employee.,Mainly borrowedBlaze。

And the same as Google staff Yves Junqueira Release ofYourBase。YourBase It does not build tools,It is a continuous integration tool,Specific build tools used independently in the background,Provide fast outside Google、Scalable build。

Summarize

Google is uniquely provided with priority to developers experience and developer tools.,Make Google employees and the former employees can benefit from one hand obtained by using the first-class development tool.。These tools greatly affect their talents and capabilities。

Once you leave Google,The utilization of these experiences is a competitive advantage。People can bring excellent new development tools into new organizations,Improve the productivity of yourself and team members。By using these tools,Communicate effective best practices in large-scale software development,Can be organized for the new company,This is a major competitive advantage of Google.。

Sincerely,Large-scale software construction is not easy。As《Moon myth》(The Mythical Man Month knows)Said a book,Good software is not to be achieved by hiring more developers.。Given the software is a multiplier of end user productivity,The development tool is a multiplier productivity of software construction personnel.,We need better tools。If you recognize the concept of new business,Then just play the unique opinion of the staff before Google,Bring the best developer tools for new companies。

Description:

An ex-Googler's guide to dev tools

https://about.sourcegraph.com/blog/ex-googler-guide-dev-tools/

Focus on me and forward this article,Private letter“Receive information”,You can get free of chargeInfoQvalue4999Yuan mini book,Click on the end「understand more」,StepInfoQOfficial website,Get the latest information~

返回列表
更多新闻资讯