Summary
In this chapter, we added another tool to our toolbox for writing and maintaining clean code and efficient software: code analysis. We learned that we can do it in two ways: by checking the code before it’s even run (statically) and by watching the code as it runs (dynamically). We tried to figure out what kind of problems we should look out for in each of these analyses, and we also found some tools and techniques that can help.
Just like the other stuff we’ve covered, this chapter is meant to give you ideas for going deeper. Code analysis is often seen as something extra, like an optional step, but it’s a crucial part of making a project efficient and easy to maintain. So, don’t underestimate its importance!
Besides the times when you do analysis and improve your work, it’s crucial to keep a certain level of quality in your everyday tasks. You can make a significant difference with minimal, targeted effort by using some simple but...