69: To type or not to type — measuring productivity impact with DAT
Nov 29, 2024
auto_awesome
Discover the intriguing debate on whether typing more enhances productivity or just adds to the workload. The discussion dives into Diff Authoring Time (DAT) as a fresh productivity metric and explores the evolution of the Hack programming language. Learn about the challenges of implementing incremental type checking in large codebases and the importance of developer experience. The hosts also highlight a groundbreaking experiment using typed mocking that led to significant time savings. Get insights on data-driven decision-making in developer infrastructure!
The Diff Authoring Time (DAT) metric quantifies the efficiency of developers by measuring the time taken to create and finalize code changes.
Implementing a type mocking framework within the Hack programming environment significantly reduced debugging durations and improved overall coding workflow efficiency.
Deep dives
Understanding DAT and Its Impact on Productivity
Diff Authoring Time (DAT) serves as a key metric for measuring developer productivity at Meta. It quantifies the time taken by engineers to create and finalize code changes, providing insights into their efficiency levels. The podcast discusses how this metric was refined through experiments, especially by teams like the Hack Language team, that explored the correlation between user productivity and code type systems. DAT not only helps measure current productivity but also guides future improvements in the developer experience.
Enhancing Developer Experience with Hack Language
The Hack language, a derivative of PHP, was developed at Meta to provide a more scalable solution as the company's codebase expanded. With features like a robust type system and improved IDE support, Hack aims to enhance developer efficiency by enabling quick iteration cycles. This system accommodates millions of lines of code while minimizing the delay in providing developers with correctness signals via fast type checking. The discussion emphasizes how feeding performance data back into the development cycle ultimately results in a more effective coding experience.
Productivity Gains Through Type Mocking Frameworks
The podcast highlights a significant project focused on implementing a type mocking framework within the Hack programming environment. Prior to this framework, developers faced frustrations linked to type mismatches only revealed during code review, which could lead to lengthy debugging sessions. The introduction of this framework allowed for early correctness checks, significantly streamlining the workflow. Experimental data indicated that cycles for diff authoring were reduced by 14%, showcasing the tangible productivity benefits of type safety in coding practices.
Efficiency from Code Sharing Frameworks
Code sharing frameworks play an essential role in reducing redundant development tasks across multiple platform applications at Meta. These frameworks permit developers to create a single code change that can be utilized across varying platforms like iOS and Android, hence saving considerable time. The podcast elaborates on experiments measuring the developer time savings these frameworks afforded, revealing that engineers could save upwards of 50% of development time compared to traditional platform-specific coding. This collectively aligns team efforts towards creating more unified and efficient development practices across the company.
Do types actually make you more productive or is it just more typing for you to do on the keyboard? That's just one of the questions we managed to answer at least on a small scale with Diff Authoring Time or DAT, here at Meta. Want to know how we leverage metrics to run experiments on productivity in our internal codebase? Tune in to episode 69.