.
Python language constructs, inheritance, tree traversal
Code reviewers often face significant cognitive load. Depending on the project, they must scrutinize the implementation, check that the code adheres to conventions – such as using the latest syntax and language constructs – verify that the code is properly documented, and much more. When performed manually, these code-quality checks can easily monopolize the reviewer’s time. As a result, it is a key priority to offload as many tasks as possible onto static code analysis tools – like linters and formatters – so the reviewer can focus on the implementation itself.
How do these tools work, and how could you build one of your own to enforce conventions specific to your codebase? In this keynote, I will walk you through the process of creating a simple static code analyzer in Python using a data structure called an abstract syntax tree, which represents your code's structure and allows you to access its components in order to perform checks.
Stefanie Molin is a software engineer at Bloomberg in New York City, where she tackles tough problems in information security, particularly those revolving around data wrangling/visualization, building tools for gathering data, and knowledge sharing. She is also a core developer of numpydoc and the author of “Hands-On Data Analysis with Pandas: A Python data science handbook for data collection, wrangling, analysis, and visualization,” which is currently in its second edition and has been translated into Korean and Chinese. She holds a bachelor’s of science degree in operations research from Columbia University's Fu Foundation School of Engineering and Applied Science, as well as a master’s degree in computer science, with a specialization in machine learning, from Georgia Tech. In her free time, she enjoys traveling the world, inventing new recipes, and learning new languages spoken among both people and computers.