Friday, September 21, 2012

Should Web Apps Be Comfortable With Paradox?

Coffee is like the nectar of the gods, because it fills you with energy and new ideas. Coffee is like nicotine, because it transforms your body for the worse, creating actual physiological addiction (as opposed to the metaphorical kind) and raising your blood pressure.

Coffee, therefore, is both glorious and awful.

Unions inhibit the power of oppressive corporate aristocrats; unions also hobble the capacity of entrepreneurs to innovate. Unions are both wonderful and terrible.

In each of these cases, you have a real-world thing, and two models of that real-world thing, both of which are valid to some degree. Cybernetics addresses this phenomenon with the phrase "the map is not the territory," while Athenian philosophy had Plato's Cave.

If you have a web app with a services-oriented architecture, you might choose to describe one single element of the business domain with a Ruby model in a Sinatra app, an ActiveModel in a Rails app, and a Backbone model in JavaScript or CoffeeScript (or both), all at the same time. You might also choose to represent this element of your business domain simultaneously as a succinct atom in a Redis queue, multiple rows in Postgres, and an entire tree in Mongo. Synchronizing these databases, and synching the corresponding code in version control, has countless associated challenges.

The easiest answer, of course, is not to do it. The easiest way to deal with paradox is to narrow your worldview sufficiently that it disappears. It's a very old solution, but it's not a very bold solution.

One of the oldest and greatest problems in philosophy is relevant to web apps. I don't know what the answer is, but I think it's worth figuring out. In code, as in life, you operate with much greater power if you can find ways to reconcile paradoxes.