As I have been developing more and more programs, it is becoming increasingly clear that it takes far too many words to "explain" simple things to computer. Very often, it is very simple to explain a task to a developer, but that same task can take the developer several months to "explain" it to a computer.
Imagine the following task:
"Write a graphic editor that allows users to draw a picture, consisting of geometrical shapes. It should be possible to select some geometrical shape from a palette (rectangle, circle or line) and then draw it by using a mouse. In addition, it should also be possible to select these shapes in the editor, move selected shapes, change their size, and delete them. It should be possible to save the resulting picture to a file and to read the saved graphic from a selected file."
This explanation to a programmer can take about 20 minutes maximum, considering their additional questions about exact specifications. After this, it will take about 1-5 days to write the program and to fix all the bugs. In any case, the program source code will be much longer than this short and simple paragraph description as above.
Moreover, an in-depth knowledge of some libraries (input-output, graphic library, UI library) will be required from the developer. The developer should also be concerned about a good program design, i.e. by creating a base interface that will be implemented by all classes related to geometrical shapes. Such a design is required to have the possibility to easily add new shape classes in future.
Why is it that we cannot explain this task directly to a computer, and must instead, explain it to a developer?
The matter of the fact is that any OO language (like Java, C++, etc) is not brief at all. It has very few language notions that can be used to express a program - class, method, expression, if, for, etc. This means that because it possesses such a limited vocabulary, it is therefore required to explain everything to a computer in detail.
One can object to this by pointing out that OO languages allow one to create new classes and methods that can express new notions. But the fact still remains, that all classes and methods look the same to the computer. Their names and comments make sense only to their human manipulators. What all of this means, is that a computer can only help a developer on the language level (i.e. like IntelliJ IDEA currently does). However, a computer is of limited help when domain knowledge is needed. For example, a computer has no clue that a given method is an implementation of a remote access method for a given session bean in an EJB because this fact is not reflected by any language construct.
In the article by Czarnecki, etc : "domain specific knowledge may get lost in the implementation because there exists a semantic gap between domain-specific abstractions and features offered by programming language"
Most of all these "OOP design patterns" are needed only to cover this "Gap".