Skip to main content

Behavioral Code Analysis - Adam Tornhill

Curated collection of Adam Tornhill's books, talks, tools, and workshops on using version-control data and forensic psychology to understand codebases.

Books

Key Concepts

  • Hotspot analysis: Files that change frequently AND have high complexity = biggest risks
  • Temporal coupling: Files that always change together reveal hidden dependencies
  • Code churn + complexity: Predicting where bugs will emerge
  • Organizational analysis: Mapping team structure to code ownership, finding coordination bottlenecks
  • Change frequency vs. code age: Identifying code that should be stable but isn't

Free Tools

  • code-maat - Open source CLI tool (Clojure/Java) that mines version-control data for all the analyses in the books
  • maat-scripts - Python scripts to post-process and visualize code-maat output (teaching-oriented)

Talks & Podcasts

  • "Treat Your Code as a Crime Scene" - GOTO 2016 (YouTube), also presented at SREcon 2024
  • Software Engineering Radio Episode 554 - Full interview on behavioral code analysis
  • "Prioritizing Technical Debt as if Time and Money Matters" - Philly ETE 2021
  • "The Critical Safeguards for AI-Assisted Coding" - Analyzing 100K+ AI-driven refactorings from real codebases
  • CodeScene thought leadership talks

Commercial Tool

  • CodeScene - Productized version of all these ideas. Has a free community edition.

Workshop

Starting Point

The 2nd edition of "Your Code as a Crime Scene" is the most comprehensive single resource. The GOTO 2016 talk on YouTube is a solid free appetizer to see if the ideas resonate before committing to the book.

Quick find

Search the garden