The Pragmatic Engineer

Stacked diffs and tooling at Meta with Tomas Reimers

· Summarized

Share this episode
Anyone with this link can open it.
Share Link
Start at 0:00

Key takeaways

  • Meta's internal tooling is highly integrated, providing a seamless developer experience that enhances productivity.
  • Stacked diffs are essential for managing code reviews effectively, allowing developers to work on multiple features simultaneously.
  • Transitioning to monorepos improves collaboration by centralizing code and reducing dependency management challenges.
  • AI will continue to revolutionize software development, making code reviews and quality assurance more critical than ever.
  • Metrics, such as time to merge and pull request activity, are vital for understanding and improving engineering workflows.
  • The evolution of Graphite represents the value of responding to developer needs and pivoting business focus to meet those demands.

Summary

Understanding Developer Tooling at Meta

The episode delves into Meta's unique approach to internal developer tooling, exploring how it built its own tools like Fabricator, Sandcastle, and Butterflybot instead of relying on industry-standard solutions like GitHub. Tomas Reimers emphasizes the integration across these tools and how they promote efficiency in code reviews and development workflows. He explains the functionality of Fabricator as an internal code review tool and illustrates how Meta’s tools enable deep integration for tasks, monitoring translations, and version testing, creating a streamlined developer experience.

The Concept of Stacked Diffs

Tomas introduces the concept of stacked diffs at Meta, a method that allows developers to work on multiple branches for different features simultaneously, thereby managing code review bottlenecks more effectively. He details how this practice emerged and why it became essential within Meta, highlighting the advantages of creating smaller, manageable pull requests that are easier to review, ultimately accelerating the development process and enhancing collaboration.

The Shift to Monorepos

In discussing Meta’s transition from polyrepos to monorepos, Tomas outlines the benefits of having a single repository for all code. He explains that this transition facilitates better collaboration, reduces dependency issues, and integrates more seamlessly with the tools used by developers. The conversation touches on the challenges that larger organizations face with multiple repositories and how unifying under a single monorepo can enhance productivity across teams.

AI's Impact on Software Development

Tomas shares insights on how AI tools are transforming software development, especially in enhancing code generation and deployment. He notes that while AI accelerates development, it also increases the volume of code that needs to be reviewed, thereby making code reviews even more critical. The discussion explores the need for maintaining high-quality code and accountability in the face of AI-generated outputs, suggesting that robust testing and thoughtful reviews will become increasingly important.

Engineering Metrics That Matter

The episode discusses key engineering metrics often used by organizations to measure productivity and performance. Tomas highlights metrics like the number of pull requests, time to merge, and specifically a metric on the inactivity of pull requests during code review. These metrics give teams insights into their workflow efficiency and can trigger improvements in processes to enhance developer productivity.

Graphite’s Origin and Pivot

Tomas narrates the journey of Graphite, from its initial focus on mobile release tools to identifying the greater need for better code review processes. He shares how feedback from former colleagues led to a pivot towards creating tools centered around stacked diffs, reflecting the real challenges developers face outside large tech companies. This transformation showcases the importance of adaptability within a startup environment.

Sponsors

  • Swarmia · The engineering intelligence platform for modern software organizations.
  • Sentry · Error and performance monitoring for developers.

Show notes

Supported by Our Partners

• Swarmia — The engineering intelligence platform for modern software organizations.

• Sentry — Error and performance monitoring for developers.

—

Why did Meta build its own internal developer tooling instead of using industry-standard solutions like GitHub? Tomas Reimers, former Meta engineer and co-founder of Graphite, joins the show to talk about Meta's custom developer tools – many of which were years ahead of the industry.

From Phababricator to Sandcastle and Butterflybot, Tomas shares examples of Meta’s internal tools that transformed developer productivity at the tech giant. Why did working with stacked diffs and using monorepos become best practices at Meta? How are these practices influencing the broader industry? Why are code reviews and testing looking to become even more critical as AI transforms how we write software? We answer these, and also discuss:

• Meta's custom internal developer tools

• Why more tech companies are transitioning from polyrepos to monorepos

• A case for different engineering constraints within the same organization

• How stacked diffs solve the code review bottleneck

• Graphite’s origin story and pivot to their current product 

• Why code reviews will become a lot more important, the more we use AI coding tools

• Tomas’s favorite engineering metric 

• And much more!

—

Timestamps

(00:00) Intro

(02:00) An introduction to Meta’s in-house tooling 

(05:07) How Meta’s integrated tools work and who built the tools

(10:20) An overview of the rules engine, Herald 

(12:20) The stages of code ownership at Facebook and code ownership at Google and GitHub

(14:39) Tomas’s approach to code ownership 

(16:15) A case for different constraints within different parts of an organization 

(18:42) The problem that stacked diffs solve for 

(25:01) How larger companies drive innovation, and who stacking diffs not for 

(30:25) Monorepos vs. polyrepos and why Facebook is transitioning to a monorepo

(35:31) The advantages of monorepos and why GitHub does not support them 

(39:55) AI’s impact on software development 

(42:15) The problems that AI creates, and possible solutions

(45:25) How testing might change and the testing AI coding tools are already capable of 

(48:15) How developer accountability might be a way to solve bugs and bad AI code

(53:20) Why stacking hasn’t caught on and Graphite’s work 

(57:10) Graphite’s origin story 

(1:01:20) Engineering metrics that matter 

(1:06:07) Learnings from building a company for developers 

(1:08:41) Rapid fire round

(1:12:41) Closing

—

The Pragmatic Engineer deepdives relevant for this episode:

• Stacked Diffs (and why you should know about them)

• Inside Meta’s engineering culture

• Shipping to production

• How Uber is measuring engineering productivity

—

See the transcript and other references from the episode at ⁠⁠https://newsletter.pragmaticengineer.com/podcast⁠⁠

—

Production and marketing by ⁠⁠⁠⁠⁠⁠⁠⁠https://penname.co/⁠⁠⁠⁠⁠⁠⁠⁠. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.



Get full access to The Pragmatic Engineer at newsletter.pragmaticengineer.com/subscribe

Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account

Couldn't load the audio. A blocker may be stopping the show's tracking links. Open the file