I recently attended Facebook’s F8 Developer Conference. Here are my 8 takeaways:
Facebook emphasizes getting a simple idea to production as fast as possible; the general sentiment is to build better quality code by default. To enable this, they focus on predictability throughout the code base. It should be easy for an engineer to read through the flow of the code. Simply put, given an input state, the output state should be predictable and reproducible. This philosophy has helped them maintain a manageable code base as they’ve scaled their engineering team. Predictable logic flows through the code, which allows them to spend their time gathering metrics and iterating as fast as possible rather than tracing through complex code interactions and trying to keep it all in their heads at the same time.
2. Flux and React
3. Measure and Tweak
The HHVM team told a story of how they doubled the performance of their infrastructure by improving it one percent at a time. They held a massive brainstorm of potential wins and time boxed the research, investigation and building phases to one to three days total. They cranked through dozens (if not hundreds) of ideas in just a few months and through compounding interest saw a massive increase in performance. Given that they already had a strong baseline, they chose to tweak and iterate their way to a better solution rather than searching for a silver bullet. In fact, the exercise was so valuable the team now holds these tuning sessions annually.
4. Origami and Quartz Composer for Interaction Design
Designing and building interactive mockups is extremely valuable to get the feel for how an app will behave without writing all of the code. It allows for rapid changes to be made early in the design cycle and makes it easy to show engineers what it should look like. Facebook created a toolkit for Quartz Composer called Origami that they have used to rapidly prototype their applications and turn their photoshop designs into interactive experiences they can touch and play with. Origami can be found on GitHub.
5. Pop Animation Engine
Facebook has created an animation engine for iOS applications as a replacement for core animation. It is focused on smooth element transitions without creating “jank” or stuttering the UI. Small SDKs like this are the backbone of beautiful interactive applications and help bring the interactive designs created in Origami to life with a simple API. Read more about it in their blog post.
6. Facebook’s Transformation to a Mobile-first Company
Like many engineering organizations, Facebook started out with technology-oriented teams owning the Android and iOS platforms. Feature teams would then approach these teams asking them to implement a new feature. Unfortunately, this doesn’t scale since the Android team now has three no. 1 priority tasks — one from each of the feature teams. Instead, Facebook embedded iOS and Android engineers within each of the feature teams. Each team is now empowered to deliver the feature they want across all platforms.
7. Beta Testing Mobile Apps
Facebook has one million subscribers who push a nightly build of their latest Android apps. This allows the team to monitor crash reports to squash as many bugs as possible before they deploy the app to the rest of the world every four weeks. They also include a fun feature known as the “rage shake” where a tester can simply shake their phone to pull up a bug report dialog.
8. Build Tools and Shipping Mobile Apps
Facebook emphasizes the importance of having strong build tools as your engineering team grows and more people are developing against the mobile apps. They released buck, an Android build tool that caches pieces of the build to speed up the development lifecycle. It also runs a daemon to kick off builds in the background after a file is saved. For iOS development, they stress the importance of using ccache when building iOS apps. They also recommend xctool as a replacement for xcodebuild with better integration for continuous integration and parallel testing.
I highly recommend checking out the videos from F8. We’re already starting to explore several of these tools and process changes at Tagged for ways we can build a better experience for our users.
Barrett Cook is an engineering manager on the web team at Tagged. Follow him on Twitter @barrettcook.