Static and Dynamic Analysis
On our way to clean, robust, and maintainable code, we’ll often need to “take a look” at how our software works and how it’s written. After identifying the code smells and doing some refactoring steps (in fact, we should never stop doing this!), it can be useful to scan our code for design flaws, security vulnerabilities, and more.
This analysis can be carried out directly on the code – that is, static analysis – or on the running program – that is, (without involving too much imagination) dynamic analysis.
Static and dynamic analysis tools scrutinize code to identify issues and inefficiencies. Their insights provide the foundation for improvements, and this is where refactoring comes into play.
In this chapter, we’re going to talk about the following topics:
- What is static analysis?
- Why do we need static analysis?
- Some static analysis tools
- What is dynamic analysis? ...