Social networking giant Facebook is no stranger to the world of open source. After all, CEO Mark Zuckerberg originally built Facebook on top of open-source infrastructure components. During a keynote at the Linux Foundation Collaboration Summit on Feb. 18, James Pearce (pictured), head of open source at Facebook, detailed how the company's open-source efforts have been reinvigorated in recent years with an increasing number of projects and code contributions.
"Open has always beaten closed, being connected has always beaten being isolated, and sharing has always trumped secrecy," Pearce said.
Pearce's responsibilities at Facebook include 235 projects that have been open-sourced by the company over the years. All those projects amount to more than 10 million lines of code that Facebook has made available as open source. Many of those 235 projects are available on GitHub, where Pearce said Facebook now has more than 150,000 followers and 26,000 forks.
"So these are projects that people are finding valuable and useful," Pearce said.
The pace of open-source project development at Facebook has accelerated in 2014. In the second half of 2014 alone, Facebook launched 64 new open-source projects, he said.
"What's interesting is not just the quantity of projects, but the diversity of them," Pearce said.
Among the projects launched by Facebook in 2014 are data infrastructure, Web infrastructure, mobile tools, developer infrastructure and even the firmware for the Oculus Virtual Reality DK1 headset.
Why Open Source
Contributing code into the open-source community has some very practical and tangible benefits for Facebook.
"We're an engineering-led organization, and the open-source philosophy fits very well with that," Pearce said. "We think that it also helps people to think of Facebook in a positive light."
One area in which the positive light of open source has helped Facebook is in its talent recruitment efforts. Many new engineers who join Facebook cite the open-source efforts as a reason why they want to work at Facebook, according to Pearce. Familiarity with Facebook's open-source projects also has other benefits for new employees.
"When people join the company and they are using technology that they are already familiar with, since it has been open-source, they are able to become effective more quickly," he said. "If you have to wait six months for an engineer to get trained on a proprietary internal system, that's time wasted."
Open Source Is Better Code
There's another benefit to open-sourcing code: The whole process of making code available as open source leads to better code overall. Pearce explained that because code will be available as open source for anyone to use means that code is first put under heavy scrutiny.
"We make sure that the APIs are all super clean, we make sure it's really modular, and we make sure it doesn't have tendrils stretched throughout other parts of the architecture that it shouldn't," he said.