Trace the behavior
The first thing I do when analyzing software is to trace a certain behavior, that I know the software supports, throughout the codebase. Eg:
- Create a contract
- Create a new user
- Terminate a contract
It strikes me time and time again that this at first glance simple analysis is in most code bases very very difficult. For instance, creating a new contract is not just that, it looks more like:
- Create a draft contract
- Review and adjust that contract
- Send a notification to the customer
- Keep on eye on the expiration date of the draft
- Capture signatures
- Turn the draft contract into a real contract
- Start the contracted services
So it looks more like a chain of operations separated in time, we call it a workflow or a business process.
The chase
So I set off to “chase” this series of actions throughout the codebase. Starting with the customer clicking a button and which leads to the invocation of a method on controller X and going deeper down into the codebase. What I expect to see is the sequence of steps described above: the contract workflow. At least in some form or another.
What I most often see is the method on the controller flipping some flag on a contract entity and that’s it… Mmm where is the workflow, what is the next step? Who will pick up after this first action? It could be a worker thread is scanning the contract entities and picks up this contract or it could appear on a UI screen based on a query which thereby trigger the user to do something with it.
Why?
Why can’t I just see the workflow popping out of the code? Isn’t automating a certain workflow / a certain behavior what a software system is supposed to do? I advise all software architects and developers to do this exercise and assess how easy they can do this tracing.

Be First to Comment