Your Code as a Crime Scene

Book description

Jack the Ripper and legacy codebases have more in common than you'd think. Inspired by forensic psychology methods, you'll learn strategies to predict the future of your codebase, assess refactoring direction, and understand how your team influences the design. With its unique blend of forensic psychology and code analysis, this book arms you with the strategies you need, no matter what programming language you use.

Publisher resources

View/Submit Errata

Table of contents

  1. Your Code as a Crime Scene
    1. For the Best Reading Experience...
    2. Table of Contents
    3. Early praise for Your Code as a Crime Scene
    4. Foreword by Michael Feathers
    5. Acknowledgments
    6. Chapter 1: Welcome!
      1. About This Book
      2. Optimize for Understanding
      3. How to Read This Book
      4. Toward a New Approach
      5. Get Your Investigative Tools
    7. Part 1: Evolving Software
      1. Chapter 2: Code as a Crime Scene
        1. Meet the Problems of Scale
        2. Get a Crash Course in Offender Profiling
        3. Profiling the Ripper
        4. Apply Geographical Offender Profiling to Code
        5. Learn from the Spatial Movement of Programmers
        6. Find Your Own Hotspots
      2. Chapter 3: Creating an Offender Profile
        1. Mining Evolutionary Data
        2. Automated Mining with Code Maat
        3. Add the Complexity Dimension
        4. Merge Complexity and Effort
        5. Limitations of the Hotspot Criteria
        6. Use Hotspots as a Guide
        7. Dig Deeper
      3. Chapter 4: Analyze Hotspots in Large-Scale Systems
        1. Analyze a Large Codebase
        2. Visualize Hotspots
        3. Explore the Visualization
        4. Study the Distribution of Hotspots
        5. Differentiate Between True Problems and False Positives
      4. Chapter 5: Judge Hotspots with the Power of Names
        1. Know the Cognitive Advantages of Good Names
        2. Investigate a Hotspot by Its Name
        3. Understand the Limitations of Heuristics
      5. Chapter 6: Calculate Complexity Trends from Your Code’s Shape
        1. Complexity by the Visual Shape of Programs
        2. Learn About the Negative Space in Code
        3. Analyze Complexity Trends in Hotspots
        4. Evaluate the Growth Patterns
        5. From Individual Hotspots to Architectures
    8. Part 2: Dissect Your Architecture
      1. Chapter 7: Treat Your Code As a Cooperative Witness
        1. Know How Your Brain Deceives You
        2. Learn the Modus Operandi of a Code Change
        3. Use Temporal Coupling to Reduce Bias
        4. Prepare to Analyze Temporal Coupling
      2. Chapter 8: Detect Architectural Decay
        1. Support Your Redesigns with Data
        2. Analyze Temporal Coupling
        3. Catch Architectural Decay
        4. React to Structural Trends
        5. Scale to System Architectures
      3. Chapter 9: Build a Safety Net for Your Architecture
        1. Know What’s in an Architecture
        2. Analyze the Evolution on a System Level
        3. Differentiate Between the Level of Tests
        4. Create a Safety Net for Your Automated Tests
        5. Know the Costs of Automation Gone Wrong
      4. Chapter 10: Use Beauty as a Guiding Principle
        1. Learn Why Attractiveness Matters
        2. Write Beautiful Code
        3. Avoid Surprises in Your Architecture
        4. Analyze Layered Architectures
        5. Find Surprising Change Patterns
        6. Expand Your Analyses
    9. Part 3: Master the Social Aspects of Code
      1. Chapter 11: Norms, Groups, and False Serial Killers
        1. Learn Why the Right People Don’t Speak Up
        2. Understand Pluralistic Ignorance
        3. Witness Groupthink in Action
        4. Discover Your Team’s Modus Operandi
        5. Mine Organizational Metrics from Code
      2. Chapter 12: Discover Organizational Metrics in Your Codebase
        1. Let’s Work in the Communication Business
        2. Find the Social Problems of Scale
        3. Measure Temporal Coupling over Organizational Boundaries
        4. Evaluate Communication Costs
        5. Take It Step by Step
      3. Chapter 13: Build a Knowledge Map of Your System
        1. Know Your Knowledge Distribution
        2. Grow Your Mental Maps
        3. Investigate Knowledge in the Scala Repository
        4. Visualize Knowledge Loss
        5. Get More Details with Code Churn
      4. Chapter 14: Dive Deeper with Code Churn
        1. Cure the Disease, Not the Symptoms
        2. Discover Your Process Loss from Code
        3. Investigate the Disposal Sites of Killers and Code
        4. Predict Defects
        5. Time to Move On
      5. Chapter 15: Toward the Future
        1. Let Your Questions Guide Your Analysis
        2. Take Other Approaches
        3. Let’s Look into the Future
        4. Write to Evolve
    10. Appendix 1: Refactoring Hotspots
      1. Refactor Guided by Names
    11. Bibliography
      1. You May Be Interested In…

Product information

  • Title: Your Code as a Crime Scene
  • Author(s):
  • Release date: March 2015
  • Publisher(s): Pragmatic Bookshelf
  • ISBN: 9781680500387