Another Level of Indirection

In computer programming, indirection/dereferencing is the ability to reference something using a name, reference, or container instead of the value itself. The most common form of indirection is the act of manipulating a value through its memory address.

A famous aphorism of David Wheeler goes:

All problems in computer science can be solved by another level of indirection.

And indeed if you think about it all problems can be made to fit this pattern:

  • Customer needs more than one address: Add relation between customer and address.
  • Site should display in multiple languages: Add resolution of keys to translated strings by language.
  • Content should be displayed in multiple formats: Add selection of format and delegate to that.
  • File gets too large: Split into parts and simulate by indirection.
  • Need to boot more then an OS: add bootloader which selects OS.
  • Need redundant hard discs: Use multiple discs and let RAID controller simulate a redundant one.

beyond the comfort zone…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store