Tuesday, February 22, 2011

About indirection

David Wheeler

All problems in computer science can be solved by another level of indirection. But that usually will create another problem.

Diomidis Spinellis

On the other hand, the effect that indirection has on the comprehensibility of our code is a very important concern, because over the last 50 years, in contrast to the dizzying increases in CPU speeds, the ability of humans to understand code hasn't improved much.

Steve McConnell

The primary goal of software engineering is to reduce complexity.

Corollary
Use the simplest implementation that solves the problem. If you think about using a more complex implementation for the sake of extensibility etc - what is the cost of adding the extensibility later? When you really need it? When you exactly know what kind of extension you have to add? What is the probability that you actually going to need it? (You ain't.) Compare with the increased cost for implementing and maintaining(!) the unnecessary complex solution.