the metrics trap
play

The Metrics Trap Michael Feathers We all know fold foldl1 (+) - PowerPoint PPT Presentation

The Metrics Trap Michael Feathers We all know fold foldl1 (+) [1..5] foldl1 (+) [1..5] 15 We all know Average data Pair = Pair !Int !Double average :: Vector Double -> Double average xs = s / fromIntegral n where Pair n s =


  1. The Metrics Trap Michael Feathers

  2. We all know fold

  3. foldl1 (+) [1..5]

  4. foldl1 (+) [1..5] 15

  5. We all know Average

  6. data Pair = Pair !Int !Double average :: Vector Double -> Double average xs = s / fromIntegral n where Pair n s = foldl' k (Pair 0 0) xs k (Pair n s) x = Pair (n+1) (s+x)

  7. data Pair = Pair !Int !Double average :: Vector Double -> Double average xs = s / fromIntegral n where Pair n s = foldl' k (Pair 0 0) xs k (Pair n s) x = Pair (n+1) (s+x)

  8. Standard ways of reducing information

  9. (average [1, 1, 1, 1, 1, 1]) == (average [11, -9, 12, -10])

  10. It turns out that we do this all the time

  11. Quantitative Bias In every use of units, there’s an assumption of uniformity

  12. Quantitative Bias In every use of units, there’s an assumption of uniformity 1 can be exchanged for 1

  13. “We want to establish key metrics and indicators to measure our progress toward the goal.”

  14. “We want to establish key metrics and indicators to measure our progress toward the goal.”

  15. But..

  16. We don’t have (m)any uniform distributions in software

  17. Distortion via Metrics

  18. There is no “right” number for method size , class size , amount of complexity , etc

  19. Why do we persist in our reductionism?

  20. Maybe it is because we can’t think of anything better

  21. “We want to establish key metrics and indicators to measure our progress toward the goal.”

  22. “Laws” of Metrics

  23. “Laws” of Metrics 1. Distance Causes Misunderstanding

  24. “Laws” of Metrics 1. Distance Causes Misunderstanding 2. Highlighting Leads to Focus

  25. “Laws” of Metrics 1. Distance Causes Misunderstanding 2. Highlighting Leads to Focus 3. Focus Leads to Action

  26. “Laws” of Metrics 1. Distance Causes Misunderstanding 2. Highlighting Leads to Focus 3. Focus Leads to Action 4. Focus Leads to Side-Effects

  27. Death of Locality

  28. Practice Use Qualitative “Measures” when Possible

  29. Practice Silent Alarms

  30. Silent Alarms Don’t have check-in gates. Let people make mistakes. Investigate the mistakes off-line and see why they happened. Then, intervene

  31. Practice Disposable Metrics

  32. Disposable Metrics Secondary effects are less likely when metrics come and go. Use them to highlight concerns

  33. Practice Targeted Metrics

  34. Targeted Metric - Feature Trend Cards Hypothesize a couple of features that you will never add to your code. Task them and estimate them periodically. See the debt trend for areas they touch.

  35. Practice Deluge with Metrics

  36. Deluge The more metrics you have, the harder it is to take any one of them too seriously. They become “vital signs” and indicators as we have in medicine.

  37. Temporal Correlation of Class Changes

  38. Active Set of Classes

  39. Active Set of Classes

  40. Active Set of Classes

  41. Vital Signs

  42. Reduction is the Enemy

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend