« You (probably) don’t need to test that | Earning more money as a PHP freelancer » |
Three engineers were standing around chatting at a children’s birthday party. The host approached them and asked, “can you help me hang this piñata somewhere in the house for the children to hit?” The engineers agreed, and set off to figure out the best approach to the problem.
The most junior engineer was young and unsure of himself. He looked around for obvious items that could hang the piñata, and after rejecting several as unsuitable, he proposed that the engineers simply place the piñata on a table, so the children could break it open and access the candy inside. The host didn’t like this suggestion very much; while it met the goal, it failed to meet the scope.
The more mid-level engineer felt this was her moment to shine. She began searching and, upon identifying the stairwell as the best approach, began devising a complex solution that would involve pulleys, ropes, counterweights and shimmy dampeners. The goal, for this engineer, was to construct a system that would allow the piñata to move freely, on its own, driven by the energy being struck, and allow the host to observe and take pictures, rather than have to manually manipulate the piñata. All it would take is a trip to the hardware store and about $75. The host was nervous at this suggestion, since the party would only last for another hour or so.
The senior engineer thought for a moment, and rejected the suggestions proffered by his colleagues. Instead, he asked the host a question: “does the piñata really need to be inside? It’s a beautiful day outside for the children to play.” The host thought for a moment and said, “I guess not.” With that, the senior engineer picked up the piñata, and headed outside to find a suitable tree. Upon finding the suitable tree, the senior engineer hoisted the rope over a large branch, and held the piñata for the children to break open.
The moral of the story: the best solution is almost always to build the simplest thing that works, and iterate as necessary.
Bonus moral of the story: a well-placed question can often limit the scope, resulting in better outcomes.
Brandon Savage is the author of Mastering Object Oriented PHP and Practical Design Patterns in PHP
Posted on 1/5/2016 at 8:08 am
David (@papayasoft) wrote at 1/7/2016 12:14 pm:
Great story. My personal motto to avoid analysis-paralysis – to which I am prone – is: “It doesn’t have to be perfect. But it does have to be something.”
« You (probably) don’t need to test that | Earning more money as a PHP freelancer » |