Book Review: Your Code As A Crime Scene

Your Code As A Crime Scene:  Use Forensic Techniques To Arrest Defects, Bottlenecks, And Bad Design In Your Programs, by Adam Tornhill

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 mind, and that both of them often involve unsolved mysteries and a fair bit of messiness and chaos and pattern recognition, they have more similarities than are often considered to be the case, and in combining the two fields, this book is even of interest on the conceptual level to those whose skills with programming, or the lack thereof, prevent a full application of these insights as the author would wish.

This book, in under 200 pages, manages to provide information that is strikingly unusual, technical and practical, and also very humorous at the same time.  The author begins, as a good author of a practical guide should begin, with an introductory section that explains how to best read the book and apply its insights.  After this, the author discusses the matter of evolving software for several chapters, looking at code as a crime scene, crating profiles of possible offending areas of code to investigate under intense scrutiny, find hotspots in large-scale systems of code, judge the function of hotspots through their names, and calculate the complexity trends of code through the shape of code statistics over time.  The author then spends a few chapters dissecting code architecture by treating code as a cooperative witness, detecting the signs of architectural decay, building a safety net for code architecture, and using beauty and elegance in code as a guiding principle in code design.  The third part is perhaps even more striking in the way it encourages the reader to master the social aspects of code by looking at norms, groups, and false serial killers (bad code), discovering organizational metrics in one’s codebase, building a knowledge map of a system, diving deeper by looking at code churn, and pointing the reader toward the future.  Not only is this book practical and technically sound, but it is also thoughtful on the level of human communication and on the patterns of the human mind.

Among the many qualities that make this book such a surprising joy to read is the fact that the author spends a great deal of time poking fun at his own code, using the techniques he discusses on his own code project in order to remind himself of his own shortcomings and occasional shortsidedness in code design, including the combination of multiple features within the same files, which causes them to change more often and be more unstable, and in sloppy nomenclature which can cause ominous problems in trying to figure out what a particular piece of code happens to do.  There are jokes about minecraft, insights about the avoidance of certain areas once a crime has been committed there, and comments on the need to bolster our intuition with solid data.  There are even considerable insights as to the importance of strong data visualization techniques to be found here.  If a reader is someone who codes, and takes coding seriously and wants to minimize the difficulties of maintaining and improving a code base, this is a strong and short book to read, a genuine pleasure that far exceeds the usual dry and boring fare one gets from technical reading.

[1] See, for example:

https://edgeinducedcohesion.wordpress.com/2011/03/08/losing-sight-of-fundamentals-a-rant-on-computer-programming/

https://edgeinducedcohesion.wordpress.com/2016/05/28/give-em-what-they-want/

https://edgeinducedcohesion.wordpress.com/2016/04/09/who-tampered-with-my-report/

https://edgeinducedcohesion.wordpress.com/2016/01/15/the-mind-is-not-a-machine/

https://edgeinducedcohesion.wordpress.com/2016/01/14/some-minutes-of-the-sql-brown-bag-lunch-1/

[2] See, for example:

https://edgeinducedcohesion.wordpress.com/2014/07/07/signs-of-mind/

https://edgeinducedcohesion.wordpress.com/2013/07/31/when-art-and-science-collide/

https://edgeinducedcohesion.wordpress.com/2011/09/23/deuteronomy-21-1-9-righteous-blood-cries-out-for-vengeance/

About nathanalbright

I'm a person with diverse interests who loves to read. If you want to know something about me, just ask.
This entry was posted in Book Reviews and tagged , , . Bookmark the permalink.

4 Responses to Book Review: Your Code As A Crime Scene

  1. Pingback: Book Review: Driving Technical Change | Edge Induced Cohesion

  2. Pingback: Book Review: Creative People Must Be Stopped | Edge Induced Cohesion

  3. Pingback: Book Review: Think Like A Programmer | Edge Induced Cohesion

  4. Pingback: Book Review: The Limits Of Artificial Intelligence | Edge Induced Cohesion

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s