We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Strategic refactoring using static analysis

Formal Metadata

Title
Strategic refactoring using static analysis
Title of Series
Number of Parts
96
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Decoupling legacy code bases is not only hard, but often we don’t even have a clear idea of the current couplings that exist in our system. Without a clear overview of the current state we can’t make sound decisions on what we should do to improve. This fact leads to refactorings that are subjective, these refactorings might not yield value except for some subjective measure of “less ugly”.Refactoring with a purpose. I would argue reading code is like walking around in the forrest, enjoying the small details - the scale is 1:1. Static analysis can draw maps from a higher perspective, which is critical for strategic thinking. By using static analysis we can make a map of the current couplings in our system, make a plan for refactorings based on that map, and verify that we have obtained the goals we set out to accomplish by re-running the analysis. This can make refactoring easier, cheaper and yield code-bases that can be proven to be more modular. Using examples from NRK TV (tv.nrk.no and psapi.nrk.no) I will demonstrate, using NDepend, how to analyze unwanted couplings and make rules to make sure they never again will appear in your code base.