Chapter 1. Congratulations, Your Problem Has Already Been Solved

<feature> <title>In This Chapter</title> <objective>

Introducing design patterns

</objective>
<objective>

Knowing how design patterns can help

</objective>
<objective>

Extending object-oriented programming

</objective>
<objective>

Taking a look at some specific design patterns

</objective>
</feature>

As a programmer, you know how easy it can be to get lost in the details of what you’re doing. And when you lose the overview, you don’t plan effectively, and you lose the bigger picture. When that happens, the code you’re writing in the trenches ends up working fine for a while, but unless you understand the bigger picture, that code really is a specialized solution to a particular problem.

And the heck of it is that problems rarely stay solved after you’ve handled them once. Developers typically regard their work as tackling individual problems by writing code and solving those problems. But the truth is that in any professional environment, developers almost always end up spending a lot more time on maintenance and adapting code to new situations than writing entirely new code.

So if you consider it, it doesn’t make sense to think in terms of Band-Aid fixes to remedy the problems you face because you’ll end up spending a great deal of time putting out fires and trying to extend code written for a specific problem so that it can handle other cases as well. It makes more sense to get a little overview on the process of code design ...

Get Design Patterns For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.