Be the Surgeon, Not the Architect
Six months into Amazon, I was asked to implement the fees for the upcoming Fulfillment by Amazon launch. Sellers would pay Amazon to pick, pack and ship their inventory. My job was to make sure we charged them correctly.
A week in, the assignment looked less appealing. The existing application was a C++ monolith with almost no documentation. I couldn't build it on my desktop without exhausting the available memory. There were no unit tests and roughly a dozen integration tests, most of them broken.
There was also a host team willing to help. I was an away engineer, working in their system, and they gave me the context I couldn't get from the code.
I came back with a design to clean up the fee logic. Different businesses could extend a common implementation instead of accumulating switch statements and duplicated code. It was the kind of design I had learned to value: more general, easier to extend, less repetition.
A senior engineer asked how I knew I wouldn't break the existing businesses.
We could run the old and refactored implementations in parallel, I said, and compare the results.
Then he asked whether a business we hadn't launched yet justified that much change and the machinery needed to validate it.
I didn't have a good answer.
I had treated the existing code's problems as part of my assignment. They were real problems. But making them mine greatly expanded what had to go right before we could collect our first FBA fee.
The question changed my design. Where could I add the new behavior while limiting the impact on the businesses already using the application? What evidence would show that their fees still came out correctly?
The result was about 1,500 lines of code. More than half was a regression suite checking fee accuracy.
I remember that split more clearly than the implementation. The work wasn't small because we decided to care less about correctness. Much of the work went into establishing it.
The surgeon metaphor helped me then because it forced a specific question: what needs to change for this outcome? Sometimes an old structure really does block the next step, and repeated local patches can make a codebase harder to reason about. A small diff can still carry substantial risk.
In my case, I had proposed a broad refactor before earning the need for one. The senior engineer didn't need to prove that my architecture was bad. He asked me to justify its cost against the business decision in front of us.
That is the part of the story I still use with engineers. A cleaner design is a real benefit, and it belongs in the same conversation as the behavior we might disturb and the confidence we can build before launch.
Continue in Engineering Org & Leadership
The Next Engineer Has to Learn Somewhere
Last week I wrote why a token-consumption chart is an expense report rather than proof of engineering productivity. Funding open-ended exploration makes…
The File Was Third
The right file sat third on the candidate list. Then my bug-investigation agent ran one more search pass and pushed it down to fifteenth. I hit that…