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…

Love podcasts or audiobooks? Learn on the go with our new app.

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
Angry Red Cat

Angry Red Cat

beyond the comfort zone…

More from Medium

Cyclomatic Complexity Code Metrics

Cyclomatic Complexity

The Top 4 New Eastern European Nearshoring Heavens!

Nearshoring, Easter Europe, Nearshoring Eastern Europe, Bulgaria, Romania, Poland, Turkey, Software developers, software development company, Dreamix

TDD book by Example — Kent Be

7 things I learnt about code review in 2021