Hmm. I wonder if he got that from Simon while he (JB) was at CMU. He (HS) once said to me, jokingly, I think, “One makes an observation, two makes a generalization, three makes a proof”.
Re:Goodbye, Clean Code
by DataWorker on Sunday January 12, 2020 @12:21PM
(#22027500)
Sounds good but is wrong. Sometimes you need more than 3. Maybe 3 is for those who need to move fast and break things though.
Yeah. I think he (HS) was joking. He had a Nobel, and (co)invented AI. I’m pretty sure he knew what a proof is.
Yes, he mentions it in Effective Java. When designing APIs, collaborate with 3 clients if possible.
Until an example that “doesn’t fit” ?
Re:Goodbye, Clean Code
by scarface74 on Sunday January 12, 2020 @01:18PM
(#22027952)
And then if the example “doesn’t fit”. It’s by definition a different thing than you originally modeled
* If you generalise based on one example, you will get a flexible API that can handle only that example. * If you generalise based on two examples, you will get a flexible API that can switch between those two examples. * If you generalise based on three examples, you have a chance of abstracting over the common essence.