Foreword to the Japanese translation of Your Code as a Crime Scene, 2nd ed

by Adam Tornhill, October 2024

The book Your Code as a Crime Scene, 2nd edition.

The 1st edition of Your Code as a Crime Scene introduced a novel perspective on code analysis and maintainability. The book was based on hard-won lessons from my years as a software consultant. The techniques had helped my teams rescue legacy systems, escape the technical debt trap, and succeed with large-scale greenfield projects. Writing the book was an opportunity to share these ideas with the broader software community.

Fast forward ten years. Since the 1st edition, I have been working full time on evolving the techniques from the book and even had the chance to start my own company to refine the tool set. I also had the privilege of teaching the techniques to thousands of developers and technical leaders via keynotes and master classes. Simply put: I've learned a lot, mainly thanks to all the brilliant people I've met and discussed software with. Now was the time to incorporate those learnings into a new edition of the book, making the content more actionable than it was back in 2014.

Another goal was to prepare the reader for emerging global trends. Never before has there been a larger shortage of software developers. This gap in supply and demand will only continue to widen as more of society is digitalized. Combined with an ever-increasing pressure to deliver on shorter cycles, we can easily find ourselves mired in stress,unsustainable workloads, and software death marches. A significant part of the problem is technical debt. The average software company wastes a large portion of its developers' time dealing with the consequences of bad code and inadequate software architectures. But it doesn't have to be that way. I believe this updated edition of Your Code as a Crime Scene offers tools and insights that help mitigate these challenges.

A lot has changed since I wrote the first edition, including the rise of generative AI and machines that write code. AI is a disruptive technology, so will we programmers go the way of lamplighters and switch-board operators? No, it's unlikely. Rather, the age of AI will reinforce the need for strong engineering principles and high-quality code. My perspective in the 2nd edition is that optimizing code for understanding will remain the key concern,whether it is hand-coded or AI-generated. This book will show you how to do just that,regardless of the state of your codebase today.

Over the years, Your Code as a Crime Scene continues to reach a much wider audience than I possibly could have imagined back in 2014. Seeing it translated into Japanese means a lot to me. I'm deeply grateful for this journey and hope that you, dear reader, find the book both useful and fun. Writing it was a joy; may your reading be rewarding too!

Adam Tornhill, Sätofta, Sweden, August 2024

About Adam Tornhill

Adam Tornhill is a programmer who combines degrees in engineering and psychology. He's the founder of CodeScene where he designs tools for code analysis. Adam is also the author of Software Design X-Rays: Fix Technical Debt with Behavioral Code Analysis, the best selling Your Code as a Crime Scene, Lisp for the Web, Patterns in C, a public speaker, and software researcher. Adam's other interests include music, retro computing, and martial arts.