How does Working from Home Affect Developer Productivity? -- A Case Study of Baidu During COVID-19 Pandemic

Lingfeng Bao, Tao Li, Xin Xia, Kaiyu Zhu, Hui Li, Xiaohu Yang · DOI

Abstract

Nowadays, working from home (WFH) has become a popular work arrangement due to its many potential benefits for both companies and employees. However, most previous studies have relied on qualitative methods like surveys and interviews. Due to the COVID-19 pandemic, a large number of companies transitioned to remote work, providing a unique opportunity for quantitative investigation. In this study, we analyze a dataset of developers' daily activities from Baidu Inc. to compare productivity between WFH and onsite environments. We find that WFH has both positive and negative impacts depending on metrics like builds, commits, and code reviews, and that these impacts are further influenced by project characteristics such as programming language, project type, age, and size.

Introduction

While working from home (WFH) is often touted for increasing job satisfaction and retention, its actual impact on productivity remains a subject of debate. Most existing research is qualitative, focusing on employee perceptions rather than objective output. The COVID-19 pandemic created a "natural experiment" where entire engineering organizations moved remote for extended periods, allowing for a more rigorous quantitative assessment.

This paper addresses whether WFH impacts productivity differently based on technical factors like programming languages and project types, or organizational factors like project size and maturity. By analyzing standardized activity logs from Baidu Inc., we aim to move beyond subjective feelings to measure actual developer output.

Methodology

We conducted a quantitative case study using daily activity records of 107 developers across 8 different projects at Baidu. The dataset covers 70 working days: 42 days onsite (late 2019 to early 2020) and 28 days WFH (February to March 2020).

To ensure fair comparison across different teams and baselines, we applied z-score standardization to normalize the data. We then employed the Wilcoxon rank-sum test to determine statistical significance and Cliff’s delta ($\delta$) to measure the effect size. Metrics tracked included commit counts, lines of code changed, code reviews, build counts, release counts, and compilation counts.

Results and Analysis

Our analysis reveals that WFH is a double-edged sword. While individual focus can improve, collaborative and complex tasks often suffer.

Distribution of developer activity metrics comparing WFH and Onsite periods.

As shown in the distributions above, metrics like build_count and compile_count often saw shifts during the WFH period. Statistically, WFH had a significantly negative impact on the success rate of project releases ($p=0.002$). While developers can write code independently, the coordination required for production releases appears to be hindered by physical distance.

Statistical Significance of Metrics

The table below details the p-values and effect sizes for various productivity metrics across different statistical measures (mean, median, sum, etc.).

Statistical significance (p-value) and effect size (Cliff's delta) for productivity metrics across different measures.

Key findings from the statistical data include:

  • The Collaboration Tax: Release success rates dropped significantly (Effect size $\delta = -0.842$).
  • Lines of Code: Both lines_deleted and lines_inserted showed significant decreases in mean and sum during WFH ($p < 0.01$).
  • Deep Work vs. Coordination: While build_count and compile_count decreased, some projects saw upticks in commit_count and review_count, suggesting that WFH may facilitate individual "deep work" by reducing office distractions.

Impact of Project Characteristics

  • Maturity: Projects established in 2017 (older) saw positive impacts on commits and reviews, whereas newer projects (started in 2018) saw mostly negative impacts. Mature projects likely benefit from established workflows.
  • Project Size: Large projects (>20 developers) were more negatively affected than smaller ones, likely due to the increased communication overhead of remote coordination.
  • Programming Language: C++ projects showed some productivity gains in commits and reviews, while Java projects were almost entirely negatively impacted. This may be due to the nature of the C++ infrastructure at Baidu, which already required robust remote resource management.

Discussion and Limitations

Qualitative feedback from developers supported these findings. Many reported that WFH allowed for better focus, but 15% of developers experienced significant productivity shifts—either becoming "super-productive" or struggling with self-discipline and home environments.

A major limitation is that this study was conducted during the early, high-stress days of the pandemic, which may have introduced confounding variables like anxiety or childcare issues. Furthermore, the results from a large firm like Baidu may not generalize to smaller startups.

Conclusion

WFH impacts developer productivity in complex ways. It can enhance individual output for mature projects and specific languages but imposes a "collaboration tax" on large-scale coordination and release cycles. Future work should focus on predictive models to help managers identify which project types and developer profiles are best suited for remote or hybrid work arrangements.

Summary updated

BibTeX
@misc{bao2020how,
  author = {Lingfeng Bao and Tao Li and Xin Xia and Kaiyu Zhu and Hui Li and Xiaohu Yang},
  title = {{How does Working from Home Affect Developer Productivity? -- A Case Study of Baidu During COVID-19 Pandemic}},
  year = {2020},
  eprint = {2005.13167},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.13167},
}
Figure