Goodreads helps you keep track of books you want to read.
Start by marking “Your Code As a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs” as Want to Read:
Your Code As a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs
Enlarge cover
Rate this book
Clear rating
Open Preview

Your Code As a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs

3.63  ·  Rating details ·  152 ratings  ·  34 reviews
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, ...more
Paperback, 190 pages
Published May 2014 by Pragmatic Bookshelf
More Details... Edit Details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

To ask other readers questions about Your Code As a Crime Scene, please sign up.

Be the first to ask a question about Your Code As a Crime Scene

Community Reviews

Showing 1-30
Average rating 3.63  · 
Rating details
 ·  152 ratings  ·  34 reviews

More filters
Sort order
Start your review of Your Code As a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs
Rod Hilton
Full Disclosure: I was a technical reviewer for this book

Your Code as a Crime Scene has a lot of extremely interesting ideas, and for those alone it's worth reading. The essential idea is exactly what the title says - this seems weird or impossible at first but I assure you, the title is genuine. Effectively what this book is about is using forensic techniques to figure out which spots in a large code base are most in need of improvement/refactoring.

There are lots of different kinds of things to
Nikita Salnikov-tarnovski
Good ideas, terrible book.

The author presents several metrics that you can mine from your version control system and several ways to visualize them. All this with the goal of gaining more insights into the structure of your code, the ways your team collaborate and to spot emerging troubles early on. Some of these metrics are really interesting and do give you valuable information in a cool way.

But the book itself is very bad. The connection to forensics and crime investigation is so weak it
Emre Sevinç
Nov 15, 2016 rated it really liked it  ·  review of another edition
Some software projects start from scratch, are very limited scope, you work on them with a very small team for a few months or a year, and then move on to another project. This book is not for people working in such conditions. On the other hand, if you find yourself dealing with software-based products comprised of million line code bases that have been developed by tens of engineers spread throughout the world during many years, and you're supposed to fix bugs, and add new features, thinking ...more
Sep 16, 2017 rated it liked it
Shelves: technology
The book is good at investigating design issues, but not good at solving them. Problems are exposed, but not discussed. The tools presented aren't more than scripts that have to be executed manually and in the right sequence. There is no dashboard or some sort of continuous automated analysis to show the progress of the actions taken after the diagnosis.

The text emphasizes the approach of analyzing the history of changes in files based on version control logs, but I personally think that all
Jul 21, 2017 rated it it was amazing
I work professionally with some fairly large and old codebases (1-200K lines of code). I follow a craftsman's approach to software development, so it brings me great joy to leave a system cleaner than I found it. But not all poor code is equally impeding to maintenance and feature development, and careers are meant for more than post-hoc code cleanup. You know, like sustainably building the right thing for your customer.

This book hits an intersection of respect for cognitive load, seeing things
Matthew Boehm
Apr 06, 2017 rated it it was amazing  ·  review of another edition
Great book for learning how to understand large codebases and how to make data-driven decisions on improving code. The parallels to forensics helped make the book more entertaining and kept me engaged.

It's very easy for programming books to either be too common-sense or too subjective, but Tornhill manages to present novel information which I think has a much better shot at being widely accepted that debates on various testing methodologies, OO design, type systems, and many other highly
Michael Caveney
May 14, 2019 rated it liked it
Some good ideas and approaches in this book, but most are tied to a tool that makes it not especially helpful. Would be much better if it wasn't so tightly coupled to code-maat.
Nathan Albright
Aug 17, 2016 rated it it was amazing
Shelves: challenge
Admittedly, I am not that much of a computer programmer or coder of any kind, although computer programming is a subject of some personal interest [1] and so is forensics [2], and this inventive and creative book manages to combine insights from forensics into an intensely practical way to improve computer coding by using the techniques that people use to solve crimes. Although the idea may seem a bit far-fetched, considering that both crimes and complex computer programs are aspects of the ...more
Jan 22, 2017 rated it really liked it
Shelves: read-tech
Check out my blog for a more detailed review and summary of the book.

Most of us use version control systems only as repositories for code. But they can be much more than that since they contain a lot of useful information about a projects history. Your Code as a Crime Scene describes how to extract this information from them. It presents some novel techniques useful for detecting hot spots and error prone code. The book is accompanied by a tool, Code Maat, that you can use to apply the
Erika RS
Jan 14, 2017 rated it liked it
Shelves: software
I often wish there were a better publication format for things that are worth more than some blog posts but don't have a whole book's worth of content. This book would have made a great booklet, but did feel padded.

That said, the techniques were useful. The book, at it's core, is about using data in the source code repository to get a broader understanding of a code base. The techniques are described in some detail, but the book leaned a bit heavily on a particular tool (Code Maat). I would have
Mar 01, 2016 rated it it was ok
First, this book is not about crimes, not even for the case your application was hacked. The reference to crimes is often very constructed and could be better described with psychology than crime fighting. There are some great ideas and very much promotion of the tool created by the author.

The idea to count the whitespaces in front of the line of code to determine the complexity is a genius idea. Counting tabs and whitespaces is easy and still gives you a very good idea on the complexity, then
Aug 22, 2016 rated it really liked it
This is a very interesting book. Adam tackles some important points in the software developing. In a nutshell this book is all about getting valuable information that is hidden in your version control system. Be it git, svn, or any other repository there is lots of information regarding the healthy status of your project. Adam present us with a bunch of metrics and tools to extract the respective values. The approach is a mix of technical stuff with concepts from human sociology the will keep us ...more
Mar 13, 2016 rated it really liked it
This fairly short book provided a really interesting way to analyze software projects, with analogies drawn from criminal forensics. Nearly all the analysis is done via processing source-control metadata, but the range of insight that can be extracted is impressive. The book backs up the value of these analytic techniques with a good amount of information drawn from academic studies, not just personal or anecdotal experience. I also appreciated the variety of projects used in the examples. I ...more
Suvash Thapaliya
I've always wondered about (the lack of) tools that introspect the software as it's being written, from personal to architectural level. The findings in this book very well resonates with the kind of tools/techniques I'd like to work with (hopefully) in the future, hence I'm obviously biased towards liking the book.
With more introspection in how we develop software, whether it be at a social/organizational level or within the code itself, we can get a better overview of maintaining/writing
Nov 16, 2017 rated it did not like it
Shelves: programming
There is one interesting idea in this book: use your source controls history feature to find which parts of your code change frequently and which do not. Then also correlate what parts change in unison. The rest is just marketing. The crime scene aspect is just very lame marketing. The tool used to analyze logs, today is a commercial service.
Dont buy.
Gábor László Hajba
Nice book, gives new ideas on how to approach software projects and their potential failures.

The only drawback in my eyes is that this book could have had more examples (even for SVN because this tool is widely used on big and legacy codebases and it is hard to work with them for the tools mentioned in the book).
Mark Seemann
Apr 05, 2020 rated it liked it
Shelves: software
Learn techniques for analysing a code base. Not so much static code analysis, but analysis of source control repositories like Git.

The title's implied connection to real criminal forensics is tenuous at best, and becomes entirely conceptual as the book progresses, but the metaphor still seems apt. The techniques presented strike me as a set of suggestions that you can apply in an ad-hoc manner to investigate specific topics.

Part III covers how you can use these techniques to uncover
Jake McCrary
Jun 27, 2018 rated it liked it
The book has some interesting ideas in it. I should probably try them out on some codebases I've worked on to see what could be useful and what isn't.

The ideas didn't seem new to me. Maybe this is because I've heard them before or, once heard, they fit my mental model of how code changes.

I found the connection to forensic stories to be weak. I don't think that stories of catching serial killers helped the books arguments, though maybe it made it slightly more interesting.
Dec 18, 2018 rated it really liked it
Great book on using data analysis to understand and improve organizations, weaving together hands-on tutorial-style analysis and introduction to team dynamics with lots of references to research and the classics of the field (such as Brooks and Conway's laws). The storytelling in between will make fans of crime show happy, but I didn't care too much for it personally :)
Dushan Hanuska
This book presents interesting ideas of extracting some hidden knowledge out of code meta-data, mostly commits to git repository. It is quite centric around a tool called "maat". All-in-all it is worth reading if you have time and are looking at how to improve your teams and their coding skills.
Pragtideep Singh
May 24, 2017 rated it really liked it
Different view of analysis the software .
Mikael Svahnberg
Jun 26, 2019 rated it liked it
The premise is nice, but imho the author fails to deliver fully on the idea. They could have done more with the idea. Also, the book felt repetitive and lacking in substance after a while.
William Anderson
Apr 07, 2015 rated it really liked it
Im rounding up from lets say a 3.9

YCAACS (as I will call it from now on even if others don't) is really great in its exploration of different areas to investigate when gauging the health of a code base, looking for problem areas, and potential ways of visualizing said areas, and more. My favorite part was the section on code beauty where the focus was on the white space to the left of code in a document. I've thought about and enforced this on projects which I have led in the past and the visual
Sundarraj Kaushik
Oct 01, 2016 rated it really liked it
A very different way of looking at problems in the code. The author suggests various non-traditional means of identifying problems in software development.

Number of times a code has changed, code churn (number of lines added, removed), number of developers working on a single piece of code, code changing together.

The primary requirement for all of this that the version control should be adhered to correctly. Every developer should have a personal login Id and should use it to checkin at regular
Jul 19, 2015 rated it really liked it  ·  review of another edition
Not too bad a book. A bit wordy and repetitive at times. I feel the content could have been more densely packed. The writing style is engaging. I guess the book would read more like a "thriller" based on the provocative title. The use of forensic psychology techniques seems more indirect than one would guess. Murder and code don't seem directly aligned. From the title itself, one would think that "your code is terrible and here is why" is the message.

I read through without applying techniques to
Sebastian Gebski
Controversial book - not in terms of the content, but idea VS execution.

Idea was neat - we (in general) suck at digging out info from code. Static / dynamic code analyzers are heavily underutilized & what is more, they usually focus on low pattern detection, not on in-depth higher-level pattern mining. Unfortunately, except of few decent ideas, there's not much content in the book - IMHO it should have been much more thorough & detailed.

What's even worse, author uses his own,
Christophe Addinquy
Mar 08, 2018 rated it really liked it
Recommends it for: craftsman and developers overall
Shelves: craftmanship
There's a new craftsmanship point of view in town, and this is it ! For too long I found myself turning in round between the XP practices and Robert Martin's SOLID principles. They are all fine but we needed something new. And there comes the code forensics. The techniques and viewpoints the author proposes here are original and refreshing. For instance, he uses Git as a time machine (as a matter of fact it is) to detect correlation of events over time such as correlated changes. Long story ...more
Jan 06, 2015 rated it it was ok
Although I'm reading a "beta" version of this book, there's simply not enough meat here. The author has one or two ways of tying the concept of "criminal investigation" to code analysis, but its weak; there's enough here for a blog post, or maybe a conference talk, but not enough for a book. Easily 40% of the text is how to use his personal metrics tool to parse formatted git logs. Take that out, and its a slight work. It feels like a waste of such a catchy title and a great premise for a book.. ...more
Sergey Shishkin
I liked the book, but much less than I anticipated to. It is based on a great premise and demonstrates some very useful analyses to be mined from a code version control log (e.g., complexity hot-spots, temporal coupling, churn etc.)

It probably would be better presented as blog series. There is simply no story for a book.

Very helpful techniques and examples nonetheless.
Jun 03, 2015 rated it really liked it
although the book are focusing into several programming languages and tools, I try to re-create code analyzer for certain languages that I use and it was awesome experience! I also could refresh my memories about several machine learning + data mining algorithm. Some algorithm could also be used in another areas and conditions.
« previous 1 next »
There are no discussion topics on this book yet. Be the first to start one »

Readers also enjoyed

  • The Pragmatic Programmer: From Journeyman to Master
  • Fatemarked (The Fatemarked Epic, #1)
  • Hello World: Being Human in the Age of Algorithms
  • Too Like the Lightning (Terra Ignota, #1)
  • Agency (The Peripheral #2)
  • Data Science at the Command Line: Facing the Future with Time-Tested Tools
  • Confessions of a Public Speaker
  • Seven Concurrency Models in Seven Weeks: When Threads Unravel
  • The Unicorn Project
  • Flights
  • Accelerate: Building and Scaling High-Performing Technology Organizations
  • Manipulation: The Dark Psychology Ultimate Guide - How to Analyze People’s Personalities and Influence Anyone Using Mind & Emotional Control, Hypnosis, Persuasion, and NLP Techniques
  • Designing Data-Intensive Applications
  • Bullshit Jobs: A Theory
  • Kettlebell - Simple & Sinister
  • The Gamer's Brain: How Neuroscience and UX Can Impact Video Game Design
  • Programming Elm
  • Artificial Condition (The Murderbot Diaries, #2)
See similar books…

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »

Related Articles

San Francisco is a gold rush town. There aren’t many books about people in their 20s who move to Silicon Valley with dreams of earning a living wag...
34 likes · 1 comments