Nice point: a program is a solution to a problem. The better you understand the problem ("domain knowledge"), the better the solution will be. This is why it is easier to write a great solution to a very specific and concrete problem, instead of to a general one.
Once you have solved 2 or 3 similar problems, you may understand the general problem sufficiently well to be able to write a general solution to that class of problem.
Linus said something to this effect in an article, about the Linux filesystem (IIRC). He said that instead of trying to invent a whole new clever approach, he just studied the 3 main approaches, and made sure that his was compatible with all of them (so that Linux could be ported to such platforms). I think I've misremembered some details there, but the point was that thinking in terms of concrete and specific problems is an effective way to write great code (where great code is a great solution to a problem).