Legacy system replacement: reading requirements from the old code
If you are in a legacy system replacement, someone has to write down what the old system does before the new one can do the same. The usual way is to click through the old system and ask the people who use it. In a running interim mandate for an ordering platform that is relevant for over 70 markets, I had a third source. A colleague on the client side had given me the source code of the old system in spring.
What I read from the old source code
The code came as a large dump without version history. In the summer I wrote an index for it, before I took a single requirement from it. The index says what lives where and which part answers which kind of question. With it I search the code by concept and then read the two or three files that match.
The index names what is useful in the code. The validation rules each have a test, so the names of the rules and tests read like requirements. The definition of an order shows what an order contains and which fields are mandatory. The settings show what differs per market. The order states and the order types stand in the code as fixed lists.
In November I wrote the requirements for three order flows this way. One example is what the order review page needs across all order types. I did not have to guess that from the screens, and it saved one round of work. I have not measured how much time that was.
I describe the working sessions on these requirements in “How to write business requirements developers can estimate”. The first weeks of the same mandate are part of “Interim product owner: what the role does in a mandate”.
What the old code cannot tell you
I wrote the limits into the index on the same day. The code says nothing useful about the architecture of the new platform, because the structure of an old monolith is not a plan for a new landscape. It is also no input for screens and layout. There it only shows that a field existed.
The third limit concerns the requirements directly. Code that was shipped is not behaviour that is active. A rule can be switched on or off per market or per customer. The dump has no history, so I cannot tell dead code from live code. Every finding is a candidate requirement until someone has confirmed it against a live market. The code also shows what was built once. It does not show what users want today. User research and the business owner stay the source for that.
Legacy system replacement without copying every feature
An article on Martin Fowler’s site uses the name “feature parity” for a new system that rebuilds the old one feature by feature. Its authors write that teams underestimate the effort and that old systems contain features nobody uses. They generally do not recommend the approach. Where parity is required, they do treat the old system as the specification. Karl Wiegers and Joy Beatty describe the same reading of code, screens and database as software archaeology, and they advise against carrying forward all requirements of the old system.
In this mandate the code gave me a first list, and the business owner signs the requirements off. For the other direction we had a rule of thumb in the working sessions: if something goes beyond what the old system does, ask where it comes from. I have no case to report in which the code was wrong, and I have not counted how many requirements came from it.
I work as a product owner for companies that build digital products and online shops, for some months or for some days a month. The entries in this diary come from that work.
More entries in the diaryInterim Product Owner
A senior product owner in your team, full time, for three months or longer.