When tackling a problem, why not see if it’s already been solved?
Most problems that we encounter have already been encountered—and solved—by others. For simple problems, examining pre-existing design patterns can often speed up the process of tackling them. These patterns are generally logical templates that lay out a simple and efficient way to solve the problem to spare others the hassle of having to go through them for themselves.
Say a programmer wants to implement a quicksort function, why bother working through the solution blind? A quick search online would yield a template of the steps to produce a quick sort. In fact, a programmer could easily find exact code for such a simple problem to save himself or herself the whole of the trouble of implementng it. But perhaps the programmer would still like to procude the code himself or herself, then a design pattern could be used to find a happy middleground. The programmer would still have the expierence of making the code by his or her own hand, yet wouldn’t have to waste time needlessly by re-discovering the logic.
Using templates and snipets done by others is a great way to be a more efficient programmer. Most of the work that needs to be done for most projects is not unique, or at least not wholly unique. Learning to reappropriate code and learn for what has already been prodiced is important skill that all coders need to develop. A programmer who produces all of his or her code on his or her own is either a genius or a moron—but it’s more likely the latter. It is simply more efficient and sensible to save time on the meanial tasks and instead focus time and energy on the more serious problems that require original work and creative problem-solving.
If I built houses, I would look at past blueprints for inspiration and guidance. If I performed brain surgeries, I would follow a pre- established procedure. If I sewed shoes, I would follow the instruction provided for me. If I’m going to create a compiter program . . . It would be no different.