Metrics are paramount in every engineering discipline. Software engineering, however, is not considered a classical engineering activity for several reasons. In general, if a software system is seen to deliver the required functionality, only few people if any care about the internals. Moreover, defining, understanding and applying software metrics often looks like an overly complex activity, recommended only to 'trained professionals'. Lanza and Marinescu demystify the design metrics used to assess the size, quality and complexity of object-oriented software systems. Based on statistical information from many industrial projects and generally accepted semantics they deduce many single and combined threshold values. They show in detail how to identify collaboration and classification disharmony patterns in code, how to visualize their results using the freely available CodeCrawler visualization tool, and how to devise possible remedies. The combination of theoretically sound results and practically tested procedures and solution paths makes this book an ideal companion for professional software architects, developers and quality engineers. The pattern-oriented description of disharmonies offers easy access to detecting shortcomings and applying solution strategies. "This well-written book is an important piece of work that takes the seemingly forgotten art of object-oriented metrics to the next level in terms of relevance and usefulness." Richard C. Gronback, Chief Scientist, Borland Software Corporation.
Check out my blog for a more detailed review and summary of the book.
Object-Oriented Metrics in Practice is a must read if you want to know how to use metrics effectively. It shows how to use metrics to characterize and get an overview of the design of a system. The bulk of the book shows how to evaluate the design and identify design disharmonies by using detection strategies. The authors also present techniques of how to prioritize and recover from these design flaws. The theoretical advice is backed up by lots of practical examples and statistical data extracted from 45 Java projects and 37 C++ projects.
This book also presents some interesting visualization techniques. The Overview Pyramid describes the overall structure of a system. The Polymetric Views contain a lot of information about code elements and their relationships. Class Blueprints help you analyze suspects and quickly assess the structure of a class. It’s a shame I haven’t seen these visualization techniques embedded in more IDEs.
If you’ve ever looked at a bunch of metrics and issues related to your code base and wondered: How should I interpret all this information? Is this good? Is this bad? Where should I start? then this book is for you.
The book takes a while to get going, but then chapter 3 gives some interesting ideas on how to visualise various software metrics. At this point, I almost started to get a bit inspired.
Unfortunately, from then on, it's all downhill. The rest of the chapters deteriorate into repetitive and tedious recipes on how to detect various code smells. The idea is interesting, but it doesn't make for interesting reading.