If you work in tech and haven’t heard of static analysis, you will soon. And when you do, you'll hear about Sam Blackshear. Static analysis is becoming an increasingly critical fixture for companies and teams that are writing, running, and maintaining high volumes of code because of its ability to prevent critical bugs from making their way into production and in front of users. Sam Blackshear is at the forefront of it as a software engineer at Facebook focused on their open-sourced static analysis tool, Infer.
Before Facebook, Sam double-majored in Computer Science and Philosophy from Williams College and earned a PhD in Programming Languages from the University of Colorado at Boulder. It’s easy to see how static analysis sits at the intersection of all these interests– the work draws upon not only deep technical expertise but also an interest (or at least a curiosity) about human behavior and reasoning. Through his PhD and near-three years at Facebook, Sam has developed an extremely impressive command of his field of work.
If you met Sam, though, the word ‘command’ wouldn’t jump to mind (despite the fact that he is 6’4”). Sam is disarmingly kind, earnest, and enthusiastic. He’s always asking questions, citing podcasts or works of literature, and has an impressive ability to invoke a relevant line from a song or movie and recite it verbatim. When it comes to his work, he voraciously reads white papers, excitedly attends conferences, and regularly keeps up with his phD advisors and colleagues in the field.
Sam’s innate curiosity has undoubtedly been a force in Sam’s academic and professional success. Sam and I talked about his path pursuing a single subject in great depth, the value of empathy in his otherwise very technical work, and how the student’s approach and mindset has served him in his these early years of his career.
(Interlude: static analysis explained)
To explain static analysis, I like using the analogy of an architectural blueprint. Consider the code the blueprint. When the code is run, or the blueprint is executed upon and the building is built. It can be scary to execute on the blueprint because even though plans are checked as diligently as possible and pressure tested to the extent possible, you can’t ever be sure how the plans are going to play out in reality. To use a specific example, consider the blueprints are for the Millenium Tower in San Francisco. Only once the $350 million building had been constructed, did the architects learn that the building was unstable. The benefit of a static analyzer is that it can foresee the structural issues that led the building to tilt and sink by looking only at the blueprint. This allows that problematic aspects of the blueprint to be addressed before the building is constructed. In the case with code, which is fundamentally a series of instructions written and then executed upon, you can imagine what an advantage is have a static analyzer that does not require any code to run to intercept any impending mistakes. That’s the technology Sam works on and it’s starting to earn a lot of attention in Silicon Valley.
Following a curiosity over a market
Sam came to the world of static analysis by following his own, very particular, set of academic interests as far as the path would take him. He graduated from Williams College in 2010 where he studied math, computer science, and philosophy. Upon graduating, Sam found himself drawn to a PhD in programming languages at the University of Colorado, Boulder “out of a fun mathematical curiosity.” The idea of living in Boulder, Colorado was also appealing to Sam, a collegiate cross-country runner, given the abundance of trail running.
“The more success we have, the more people come to us with their hard problems and I think this virtuous cycle will continue.”
Sam started his PhD in late 2010 and began his work in programming languages writing automated bug finding tools. He quickly discovering that the success or failure of a programming language is deeply rooted user experience. “A programming language can have really nice properties, but if people don’t like using it or can’t use it will, then it’s useless... It’s interesting to think about how someone is going apply a language and what mistakes they might make.” For Sam, this particular interest wasn’t only that (he) was interested in math, it was more about the intersection of people and user experience.”
In the early years of Sam’s PhD program, this kind of work was largely academic and the path looked like it was headed straight for professorship. There weren’t many other options outside of this; the practical applications of language analyzers hadn’t really yet been explored and, as a result, there wasn’t any meaningful market of job opportunities for people in his field. At the time Sam entered into his PhD, there were zero jobs available like the one he currently has today. Still, Sam focused entirely on his own interests and academic pursuit. For someone so driven and talented, Sam dove into his studies with an almost-impressive lack of consideration for a future outside academia.
Largely coincidentally, in the background, the concept of bug-finding tools started to gain some interest from Facebook in particular. The story begins in 2013 when the company was starting to more seriously prioritize mobile. “Mobile code has this nasty problem that web code doesn’t have. Web code can be fixed quickly because when you fix a bug, it’s fixed for the user as soon as they refresh the page. When mobile code has a bug, it sticks there for the user until the next release which can be two weeks later or more. It can be even longer if the user doesn’t upgrade.” As a result, Facebook was losing mobile customers quickly at a time when mobile was a key part of their strategy. They started looking for more extreme measures to fix the problem of bugs finding their way into production code and acquired a small startup created by a group of academics in the field of programming language analysis- precisely what Sam was studying at in his PhD.
Sam did a summer internship at Facebook (after failing to secure a fellowship, Sam begrudgingly completed the two-page internship application while he was on vacation to satisfy his advisor) which turned into a job upon completion of his PhD. Sam started at Facebook in late 2015 and has not only been extremely successful in his work at Facebook in the development and expansion of their open-sourced static analyzer, Infer, but has also pushed the thinking forward in the field overall. Uber, for example now has an entire team dedicated to static analysis. “It was a huge win for the industry that Uber picked up this kind of work.”
“It was a huge win for the industry that Uber picked up this kind of work.”
Today, Sam is thinking a lot about the language, Rust. “People use Rust because it’s a low-level language that gives you a lot of power and control. But it’s also dangerous because you can create bugs and security issues that you can’t create in other languages. People are scared to use it but they don’t want to give up on the language because they don’t want to give up the performance. He wants, in equal parts, tackle the technical challenge and also to improve the very human experience writing code.
The rest isn’t yet history. “The more success we have, the more people come to us with their hard problems and I think this virtuous cycle will continue.”
The philosophy in the technology
“As a language designer, you’ll always have all sorts of ideas for things that are fancy and complicated, but you have to balance that with usability. You have to have good taste in terms of favoring simplicity over complex solution.”
"You have to have good taste in terms of favoring simplicity over complex solution.”
Through talking to Sam and researching static analysis, it occurred to me that Sam’s interest in people and philosophy may differentiate him in this deeply technical field. “You need to be deeply technical, but you also have to have empathy or at least a curiosity about how people think. You have to care about the math behind the program and you also have to care about how people are going to interact with it.”
Sam’s background in philosophy plays a role in how he thinks through those interactions and how he shares his insights with his industry. “The argumentative structure you learn in philosophy- taking the big picture, exploring both sides of an argument, reasoning an idea out logically. Philosophical writing is about playing out a point of view, documenting them, and then maybe coming to a conclusion. I think business writing should be more like that.”
The student mindset in the tech environment
Sam is a life-long learner and he has carried that mindset with him to Facebook. “When I first joined Facebook, I still felt like a phD student.” The team he joined at Facebook was led in-part by an ex-professor runs a lot like a research group. Everyone owns their own project but the team is deeply collaborative in the sense of sharing ideas and asking for feedback. And, perhaps most characteristically, exploratory work is highly encouraged.
The differences in the kind of work that would make Sam effective at Facebook versus in his phD quickly started to emerge. “My advisor in graduate school would always say ‘a problem has to be important and it has to be hard.’ And whenever we were working on a problem, he would start by justifying the work by asking ‘why is this hard and why is this important.’” At Facebook, the ‘hard’ wasn’t as important initially. “Instead, we want to find the problems that are important and easy or can be actioned quickly” to make the most impact.
While Sam “hasn’t completely undone that bias,” that early cognitive shift helped the work his team was doing gain traction within the organization. As Sam’s team started to work with and improve the quality of code and the experience engineering on other teams, they work became increasingly popular and highly-requested throughout the organization. While Sam is undoubtedly excited about making impact by clearing the low hanging fruit, he also thinks of it as “a way to get permission to work on the harder stuff.”
Still, some of the practices and habits he picked up in college and during his phD remain. “One of the strongest traits of my advisor was his emphasis on communication, and specifically written communication.” As part of his program, Sam would participate in weekly written paper critiques in which everyone in the lab critiques the work. “The tone of the critiques is honest and improvement directed. No one is trying to hurt feelings but no one is holding back either.” At Facebook, Sam does a lot of writing and sharing learnings. “I don’t think other people write as much as I do. It helps get my knowledge out of my head and in front of others who can learn from it or use it in their work.”
“I don’t think other people write as much as I do. It helps get my knowledge out of my head and in front of others who can learn from it or use it in their work.”
Outside of Facebook, Sam keeps up with his PhD lab mates (many of whom are in the Bay Area) and his professors and advisors. He also reads white papers and journals, and attends conferences to stay current with what’s going on in the industry. And, he’s done an impressive amount of publishing for the industry, including his most recent paper containing some breakthrough ideas and practices in his field Sam explored through his work at Facebook.
“We’re just getting started on what we can do in the industry, as we do new things- we know a lot about static analysis but we don’t know a lot about how we can help developers better with the problems they have.” The way Sam says it, with energy, humility, and earnestness, it seems true.
“We’re just getting started on what we can do in the industry, as we do new things- we know a lot about static analysis but we don’t know a lot about how we can help developers better with the problems they have.”
How lucky are you?
“I am incredibly lucky. There are many decisions that I made that I have no idea why I made them but I am so happy that I did.”