At one point or another, we’ve all been there. You run across a seemingly small problem that can be fixed in a jiffy. Under the surface to your problem; however, lays a sinister set of traps to more problems. Just as you begin to solve one problem, your solution reveals more magnificent issues.
If left unchecked you could spin your wheels for days correcting all of these problems and still be no closer to accomplishing whatever was originally wrong. When these moments come up it’s best to be able to realize what’s happening. You’re straying off of the path and getting lost! Focus back to the first problem and think more into it.
This sometimes means adding more carefully stacked cards to your already shaky house you have been working with, but it helps get you back to a “green” state. Document all of the -hacks- you have put in place as well as other solutions you’ve tried that also ended in failures.
This will help provide the materials you need in the future to repair the foundation of your application. This is especially true for teams of people working together. Everyone can avoid re-learning where items have gone wrong and can instead spend more time improving the system. As an example I’ll show two different snippets of build scripts, the one I ended up hacking, and the one I should have made instead.
Adding this investment through your code base can pay tremendous dividends. I encourge everyone to look back after stumbling onto one of these “ten minute fixes”. Get back to a “green” state as quickly as possible, and document the actions you had to take to get it there.