Legacy: Reclaiming the Word
Foreword to The Legacy Code Programmer’s Toolbox by Jonathan Boccara
What we have built is in the past. Where we are is the present. Where we want to be is the future.
Welcome to code. Welcome to the human condition. Welcome to the joys and frustrations of code, to the complexities of the human condition and to what happens when they meet and find themselves drawn into an intimate long-term relationship. Legacy code is as much about the people who surround and work in the code as it is about the code itself.
The default developer response to legacy code is primal. The fight-or-flight response kicks in, logic gives way to emotion, the question “What does the code need?” is replaced by “How can I spend as little time in this code as possible?” This is the thinking of short-term survival, not of long-term living, the habit of defend and attack, not of peace and construction.
To calm our response, we need first to appreciate that legacy code was not created arbitrarily or maliciously. Inasmuch as it may have been written in ignorance, this is because we are always operating with incomplete knowledge — and yes, that we includes you right now.
No matter what we may think of it, code is created systematically. Perhaps not always with a system of thinking and practice that is deliberate or appreciated, but we should understand that it is not arbitrary. The code was written by people — in which we must include our past selves — who were responding to a situation with the tools — and the emotions and the knowledge and… — that they had available to them at the time. Start from there. There are no winners in a blame game.
To understand the system of code we should acknowledge the system of people and practices that created it, we should journey to retrieve the meaning in the legacy and make ways forward possible. There is an underappreciated ingenuity here, an application of time and tools and humanity that deserves our attention. This is what Jonathan is offering you in this book.
But rather than keep legacy at arms length, Jonathan brings it close. Legacy is very real and no one legacy is exactly like another, so you need a toolbox not a silver bullet. And he understands and wants to help you. This is a book of compassion and intelligence.
If development in legacy code is a journey, Jonathan is your patient and loyal companion. He has stories for the road, ideas to help you on your way and suggestions for the route. He’s also brought his tools along and invited you to share.
It is easy to forget that outside the world of software development, the word legacy has another meaning. A positive meaning, a gift of wealth from the past to the present for the future. This book will help you reclaim the word.