Beauty of Simplicity
I tend to not blog about design/developing software is I once did. For
the most part I don't feel compelled to parade my solutions in some
misguided attempt to show how smart I am. With age comes wisdom and
scares. Still here I am about to boast about a solution I am
particularly proud of.
At work I was presented with a problem where not all of the data needed will be in our systems. It requires an external call to be performed when we hit one of three possible scenarios. My first inclination was to add the checks for these three scenarios at the end of my processing. I ended up having several edge cases mucking up a flow that was fairly simplistic before.
I absolutely hated the implementation. I just kept looking at the new code and thinking there had to be a simpler solution. Eventually I moved on to designing and developing the actual external call. After designing the external call I realized there was a flaw in the original design and knew it could be simplified.
The original case specified three cases where we would perform the external call but there were only two distinct types of external calls performed. In short we either were making the external call to get the most recent data or we performed the external call to get missing data. The three use cases really boiled down to two possibly outcomes. Once this realization was clear I was able to refactor the code which simplified the solution tremendously. There is something tremendously gratifying about finding the simple solution to a problem.
At work I was presented with a problem where not all of the data needed will be in our systems. It requires an external call to be performed when we hit one of three possible scenarios. My first inclination was to add the checks for these three scenarios at the end of my processing. I ended up having several edge cases mucking up a flow that was fairly simplistic before.
I absolutely hated the implementation. I just kept looking at the new code and thinking there had to be a simpler solution. Eventually I moved on to designing and developing the actual external call. After designing the external call I realized there was a flaw in the original design and knew it could be simplified.
The original case specified three cases where we would perform the external call but there were only two distinct types of external calls performed. In short we either were making the external call to get the most recent data or we performed the external call to get missing data. The three use cases really boiled down to two possibly outcomes. Once this realization was clear I was able to refactor the code which simplified the solution tremendously. There is something tremendously gratifying about finding the simple solution to a problem.


Comments