A Tale of Two Programmers
In a software development shop far, far away, there were two programmers. There each had years of experience and each had been successful. Yet each viewed systems in different ways. The first programmer viewed systems as objects interacting with each other. As a result, he developed object frameworks for each system he developed. The frameworks were clear and well thought out and were easy to work with. The second programmer viewed systems as tools to work with data. He felt that the data and its interactions were more important and as a result developed his systems with far fewer objects whose main purpose was to work with data. His systems worked well and kept to the KISS principle.
One day, a manager came into each programmers cube and said “Your system is suffering from performance problems; you must tune it to perform better”.
Each developer began to scramble to find the performance problems.
The first programmer began testing each manager, factory, and collection manipulator objects to look for the performance issue. It was intensive and required the developer’s intimate knowledge of how the objects interacted.
The second developer began looking at his data and queries. He quickly found the few queries causing the performance problems. In a short time he had added a couple of indexes and changed the queries and the performance problem was no more. He was done and left for the day; a little late for dinner but not too bad.
The first programmer finally found the few spots in his framework causing the problems and began to refactor to alleviate them. After working through the night, he had the framework changed and the performance was now acceptable. He left to grab a couple of hours of sleep and then come back in to see how the system behaved (and to finish regression testing his refactoring changes!).
Although both programmers met the goal of adjusting their systems to meet the performance requirement, the second was able to more readily locate and more easily address the performance issue. Neither programmer was doing anything “wrong”. Both systems worked and now both systems met the performance requirement.
But the real question is, which developer would you rather be? The one leaving at a decent hour with the changes made or the one that worked through the night and ultimately got the same result?