3 ms·
I think I would want to look for an accurate "representation" and expression of the right problem, not any particular abstraction technique or mechanical refact
by samsquire 3y ago
I think I would want to look for an accurate "representation" and expression of the right problem, not any particular abstraction technique or mechanical refactoring.
Refactoring code to your understanding helps you understand the code but leaves the code in a different organisation to how it was, adapted for your mental model of the problem.
If programming languages were expressive enough, we could represent things how they are and replicate that base pattern to different cases or scenarios and that would be enough but unfortunately our languages are not expressive of our high level intent and invariants we want to maintain. (Such as extensibility or hookability)
In other words, get the mental model for the problem right and the abstraction will be invisible and the solution shall be obvious.
Abstraction impedance mismatch is when people introduce a design pattern or a strategy that is harder to understand than the problem that was being solved and obfuscates it.