Abstraction Addiction

I admit that I am an abstraction addict. I keep searching for higher-order ways to develop software. I strive to represent stuff with some kind of compact math-like notation or factor out the repetition and parameterize the differences rather than long-winded loops and IF statements.

Sometimes it works, sometimes it fails, and sometimes it works but others complain because they are not used to either abstraction itself, or my flavor of abstraction. They have a point because they may have to maintain it later. I get bored if not allowed to find abstractions. Without such, programming is little more than data entry. Should I see a shrink?

No, you needn't see a shrink; though you might co check out your MyersBriggs personality type. My bet is you're INTP.

Is AbstractMercilessly? good or bad? ItDepends. When abstractions make things clearer or more maintainable, they can be good; when they "leak" (deviate sufficiently from messy reality), they can be bad. JoelSpolsky has an interesting essay on this at http://www.joelonsoftware.com/articles/LeakyAbstractions.html.

It boils down to this: All non-trivial abstractions, to some degree, are leaky. In other words, an abstraction is a model of reality; because it is a model, it doesn't exactly map to reality, and that impedance mismatch can cause problems. Joel isn't by any means the first person to notice this, of course: the aphorisms "TheMapIsNotTheTerritory" and "All models lie; some are useful" are equivalent forms.

I have encountered cases where the DuplicationRefactoringThreshold was set too low. Around 4 is about where I put it at now. In the past when I tried 2, things often got ugly, resulting in PrematureAbstraction.

The following used to be listed as AbstractionDelusion:

A friend of mine 'suffers' from manically raising the abstraction level of everything he works on to a level, where he never really finishes. Its not like BigDesignUpFront. Its rather, that while he works on something, he sees, that something can be generalized or improved and works on that. When it is done he either returns to the original project - only to dive into the next sub problem - or more often he discovers, that his current project can be improved even further. And he likes doing so.

I admit, that I can understand him and that I sometimes do the same. I think even, that many of us are dissatisfied with our tools and would like to improve them.

But to get anything real done, one has to accept the shortcomings - at least for a while. One should complete the main line and then refactor one sub-part of it after the other. Otherwise one can just too easily builds one own PrivateLanguage, which may be satisfying, but not useful at all.

Not everyone, that applies abstraction suffers from abstraction delusion. This would be like saying that a mathematician sees mathematics in everything ... and that this is somehow a bad thing.

I disagree with the word "delusion". Nowhere above do you describe a delusion, you're talking about the value of getting things finished rather than further abstracting and perfecting endlessly without finishing anything.

As you briefly point out, also, there is a tradeoff between accepting shortcomings in order to get things done versus being sufficiently motivated by dissatisfaction to tackle the difficult problem of figuring out better approaches.

Abstractions are formed as a recognition of similarities. They become concrete and defined examples when they are formed within a context.

See also: AreBusinessAppsBoring, MentalMasturbation

CategoryAbstraction CategoryPsychology

EditText of this page (last edited October 29, 2014) or FindPage with title or text search