Apr 15, 2021
ELI5: Infer - Finding Bugs Before You Ship
By Dmitry Vinnik
Originally posted here.
In this post, we take a closer look at Infer, a static analysis tool for programming languages like Java and C. This post is a part of our ELI5 series of short posts explaining complex projects in the simplest way possible. If you would like to watch a video about Infer, visit our YouTube channel.
Why Infer?
Catching software bugs in production is expensive. You need to determine the exact steps to reproduce the issue, fix it, test it and then redeploy. This workflow is challenging enough on the web, where your users rely on your servers to serve them the app. Mobile app developers have the added hurdle of fixing bugs installed on their users' devices. The conclusion is clear - bugs cost developers time and money. Hence, tools that help prevent these defects from being released are extremely valuable. One such tool is Infer.
Infer is a static analysis tool used to detect bugs in programming languages like Java, C, Objective-C and others. Infer catches Null Pointer exceptions, race conditions, memory leaks and other defects early in the project lifecycle. More importantly, by intercepting these critical bugs before they are shipped to the users, Infer prevents crashes or poor performance in production.
Built for large-scale codebases like those found at Facebook, Infer reports on new code modifications quickly so developers can see potential errors while working on their code. By integrating Infer into your workflow, you can catch bugs in real-time so that you can work more effectively as a developer.
Where is it used?
Infer was first developed at Facebook and open sourced in 2015. Since then, this project has grown in its adoption outside of Facebook with companies like Amazon, Mozilla and Spotify.
Where can I learn more?
Infer has extensive documentation, as well as a thriving community on GitHub, Twitter and Facebook. If you have any thoughts or questions about Infer, let us know on our YouTube channel, or tweet at us.
About the ELI5 series
In a series of short videos (~1 min in length), one of our Developer Advocates on the Facebook Open Source team explains a Facebook open source project in a way that is easy to understand and use.
We will write an accompanying blog post (like the one you're reading right now) for each of these videos, which you can find on our YouTube channel.
To learn more about Facebook Open Source, visit our open source site, subscribe to our YouTube channel, or follow us on Twitter and Facebook.
Interested in working with open source at Facebook? Check out our open source-related job postings on our career page by taking this quick survey.