One of the five patterns used to describe adaptive programming in the Demeter group at NortheasternUniversity?.
Name
Inventor's Paradox (IP)
Purpose
Simplify by solving a more general problem. Applied to programming this means to simplify by writing a more general program [ Adaptive Programming Book ]. Split the program into several loosely-coupled building blocks or aspects. Avoid unnecessary spreading or duplication of information in program building blocks to improve understandability and to reduce size of programs. Use appropriate filters to select what is relevant to one building block from other building blocks. (This pattern is not about any kind of abstraction mechanism in programming but it focusses on those abstraction mechanisms which significantly simplify the solution by solving a much more general problem.)
...
See http://www.ccs.neu.edu/research/demeter/adaptive-patterns/AOP/IP.html
See also ProblemFrame
-vs- YouArentGonnaNeedIt -- XP's idea, which is nearly the opposite.
Example: You have a MutuallyRecursive? data structure (A->B, B->A) and must process it (alls A and B). Maybe it is simpler to have A and B both be a C and simplify your recursion to just C->C with some special cases in.
Widely credited to G. Polya's book HowToSolveIt. At http://www.cut-the-knot.com/Generalization/epairs.shtml he is quoted:
See also: http://www.nous.org.uk/inventorparadox.html
-- JasonBucata
But YouArentGonnaNeedIt is accompanied by TheSimplestThingThatCouldPossiblyWork. If the simplest thing is the general case, in XP you would write the general case.
In the first example I ever saw of solving a problem by generalising, the general case could be solved recursively. You had to solve the general case to solve the special case, at least by the simplest method.