Chapter 6Remediate Complicated Code

At this stage, you know how to detect hotspots in codebases of any scale, visualize the issues, and prioritize code that deteriorates over time. You’ve come a long way already, and now it’s all about making the findings actionable. In this chapter, we’ll highlight common code smells that you’ll likely come across when inspecting hotspots.

We’ll start from the perspective of the human brain with its cognitive limitations. The cognitive perspective clarifies the impact of complexity-inducing coding constructs such as nested logic, the bumpy roads code smell, and low cohesion. Once we know what to look for, we’ll be ready to dig into the code and simplify. Let’s get started.

Get Your Code as a Crime Scene, Second Edition, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.