Your Code as a Crime Scene, Second Edition
Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs
by: Adam Tornhill
Published | 2024-02-01 |
---|---|
Internal code | atcrime2 |
Print status | In Print |
Pages | 336 |
User level | Intermediate |
Keywords | code defects, metrics, software quality, testing, analysis |
Related titles | Software Design X-Rays by Adam Tornhill |
ISBN | 9798888650325 |
Other ISBN |
Channel epub: 9798888650844 Channel PDF: 9798888650851 Safari: 9798888650837 |
BISACs | COM051330 COMPUTERS / Software Development & Engineering / Quality Assurance & TestingCOM051240 COMPUTERS / Software Development & Engineering / Systems Analysis & DesignCOM051240 COMPUTERS / Software Development & Engineering / Systems Analysis & Design |
Highlight
Jack the Ripper and legacy codebases have more in common than you’d think. Inspired by forensic psychology methods, you can apply strategies to identify problems in your existing code, assess refactoring direction, and understand how your team influences the software architecture. With its unique blend of criminal psychology and code analysis, Your Code as a Crime Scene arms you with the techniques you need to take on any codebase, no matter what programming language you use.
Description
Software development might well be the most challenging task humanity ever attempted. As systems scale up, they also become increasingly complex, expensive to maintain, and difficult to reason about. We can always write more tests, try to refactor, and even fire up a debugger to understand complex coding constructs. That’s a great starting point, but you can do so much better.
Take inspiration from forensic psychology techniques to understand and improve existing code. Visualize codebases via a geographic profile from commit data to find development hotspots, prioritize technical debt, and uncover hidden dependencies. Get data and develop strategies to make the business case for larger refactorings. Detect and fix organizational problems from the vantage point of the software architecture to remove bottlenecks for the teams.
The original Your Code as a Crime Scene from 2014 pioneered techniques for understanding the intersection of people and code. This new edition reflects a decade of additional experience from hundreds of projects. Updated techniques, novel case studies, and extensive new material adds to the strengths of this cult classic.
Change how you view software development and join the hunt for better code!
Contents and Extracts
- Welcome to the Crime Scene
- Identify Code That’s Hard to Understand
- Optimize for Understanding
- Understand That Typing Isn’t the Bottleneck in Programming
- Meet the Challenges of Scale
- Beware the Lure of Complexity Metrics
- Treat Your Code as a Crime Scene
- Take a Crash Course in Offender Profiling
- Apply Geographical Offender Profiling to Code
- Limit the Search Area: Spatial Patterns in Code
- Be Aware That Hotspots Reflect Probabilities
- Discover Hotspots: Create an Offender Profile of Code
- Mine the Evolution of Code
- Explore the Complexity Dimension
- Intersect Complexity and Effort
- Drive Refactoring via a Probability Surface
- Exercises
- Hotspots Applied: Visualize Code from the People Side
- Visualize Source Code
- Break Barriers via Language Agnostic Analyses
- Determine How Hot a Hotspot Is
- Understand That Bugs Breed Bugs
- Know That Information Is Only Good When Acted Upon
- Exercises
- Detect Deteriorating Structures
- Calculate Complexity Trends from Your Code’s Shape
- Inspect Negative Space in Code
- Prefer Trends over Absolute Values
- Evaluate the Growth Patterns
- Exercises
- Remediate Complicated Code
- Meet Your Brain on Code
- Spot Nested Logic That Taxes Working Memory excerpt
- Refactor Complex Code via Simple Steps
- Evade Object Disorientation
- Use Abstraction as a Tool for Thinking
- Exercises
- Communicate the Business Impact of Technical Debt
- Know the Costs and Consequences of Technical Debt
- Know Why Half the Work Gets Done in Twice the Time
- Make the Business Case for Refactoring
- Fight Unplanned Work, the Silent Killer of Projects excerpt
- Differentiate Remediation Time from Interest Payments
- Exercises
- Optimize for Understanding
- Build Supportive Software Architectures
- Use Code as a Cooperative Witness
- Recognize the Paradox of False Memories
- Reveal the Dynamics of Change
- Inspect the Modus Operandi of a Code Change
- Understand the Reasons Behind Temporal Dependencies
- Exercises
- Architectural Reviews: Support Redesigns with Data
- Don’t Shoot the Messenger
- Use Sum of Coupling to Determine Architectural Significance
- Understand Change Coupling Algorithms
- Catch Architectural Decay
- Modularize Monoliths
- Exercises
- Use Beauty as a Guiding Principle
- Learn Why Attractiveness Matters
- Use Beauty in Code
- Analyze Pipes and Filters Architectures
- Analyze Layered Architectures
- Analyze Microservice Systems
- Reverse-Engineer Your Principles from Code
- Exercises
- Expose Hidden Bottlenecks: Delivery and Automation
- Understand What’s in an Architecture
- Profile Targets in Test Code
- Create a Safety Net for Your Automated Tests
- Avoid the Automated-Test Death March excerpt
- Design for Human Problem-Solving
- Exercises
- Use Code as a Cooperative Witness
- Meet the Social Side of Your Code
- Meet Norms, Groups, and False Serial Killers
- Learn Why the Right People Don’t Speak Up
- Understand Pluralistic Ignorance
- Witness Groupthink in Action
- Discover Your Team’s Modus Operandi
- Mine Organizational Metrics from Code
- Exercises
- Discover Organizational Metrics in Your Codebase
- Kill a Project: A How-to Guide
- Analyze Hotspots for Coordination Issues
- Spot Conway’s Law in Your Code
- Act on Inter-Team Dependencies
- Exercises
- See How Technical Problems Cause Organizational Issues
- Have Your Code Motivate Retention
- Discover How Code Smells Lead to Coordination Problems
- Visualize Organizational Friction
- Measure the Truck Factor in Unhealthy Code
- Uncover the People Side of Code
- Exercises
- Build a Knowledge Map of Your System
- Know Your Knowledge Distribution
- Expand Your Mental Maps with Social Data
- Dig Below the Surface with Developer Patterns
- Use Fractal Figures to Mitigate Offboarding Risks
- Distinguish Use from Misuse
- Exercises
- Move Toward the Future
- Deepen Your Investigation
- Watch the Next Steps
- Stay Relevant: Programming in an AI World
- Watch Evolution in Reverse: Working with Low Code
- Write Evolvable Code
- Meet Norms, Groups, and False Serial Killers