Tuesday, December 29, 2009

The place for force

In the last post we discussed a method of representing of finite geometries as terms in a computational calculus. The background aim of this endeavor is to re-situate Einstein's physical intuitions about geometry, gravity, mass and energy in a new formalism; and, the background aim of that endeavor is to construct, out of a computational formalism, a physical theory that includes both quantum mechanics and general relativity. In short, the aim is to get "it from bit" in a way that unifies gravitation with quantum mechanics.

With that in mind, the purpose of a framework to study evolving discrete geometry should be clear, but where is the place for force in all of this? That's where the choice of the particular variant of the π-calculus becomes relevant. In a reflective higher-order calculus there is a rich structure on names, which is a place to host a rich "synchronization algebra", i.e. the algebraic structure determining when two names are triggers of a process synchronization. In the ordinary π-calculus, it is name equality that does this job. The simplest form of synchronization comes from the comm rule, such as the one for a monadic, asynchronous calculus like this one

x?(y).P | x!(v) -> P{v/y}

In a reflective higher-order calculus names have internal structure deriving from the structure of process terms. This gives a very rich setting to express synchronization constraints. In a previous post we described one we call annihilation.

s = @S, t = @T, ∀ R. S|T →* R => R →* 0
------------------------------------------
s?(y)P | t!(Q) → P{@Q/y}

This comm rule says that if (this is all the stuff above the horizontal line) s is the transcription (aka code) of some process, S, and t the transcription of some process T and that whenever you run S and T in parallel composition together whenever they (eventually) reduce to a state R, that state (eventually) reduces to 0,

then (this is all the stuff below the horizontal line) s and t can be used to synchronize for an interaction that results in a substitution. This basic idea can be used to provide a template for different kinds of force. Before we discuss that thought, however, the attentive reader might be wondering about something. If the "comm" rule is the most basic of the rules governing reduction, but it mentions reduction in its hypothesis, is this rule well-founded? Will it ever allow reduction to take place?

The answer is 'yes'! Note that we require that 0 is the unit of the parallel composition monoid and so 0|0 = 0 ; similarly, and after no steps we get from termination to termination, or in symbols 0 →* 0. From these two facts we have @0 can be used as a channel to synchronize with itself. Taking one step further we see that @(@0?(y)0) can be used to synchronize with @(@0!(0)). More generally, the reader may verify, we have that processes that cancel each other out, matching every output with an input, (alternatively said, imposing a kind of linear discipline on i/o) can be used to provide the codes for channels that can be used to synchronize. Hence the name: annihilation.

Returning to the topic at hand, the thought is that running the check for annihilation -- which amounts to exhaustive execution of the processes the codes of which are the subjects of guards -- provides a natural vehicle in which to express force. The intuition is that the less complex the annihilation calculation the stronger the force. An example may prove illustrative. Consider the following race condition

xl!( Ql ) | x?( y )P | xr!( Qr )

Suppose that the check that xl annihilated x was simply more complex than the check that xr annihilated x. Intuition suggests that the race is more often won by the less complex check. The effect, therefore, is a certain tendency to evolve in one way over another. To an outside observer this looks like a force between x and xr. Well, if it looks like a force and feels like a force and quacks like a force... why not investigate whether this might not be a sufficient framework to model force?

One important aspect of the construction of this model is that the choice of synchronization algebra is nearly independent of the method of modeling the geometry. However, once we have a geometrical structure, how the geometry is likely to evolve is determined by the synchronization algebra. In other words we are building up our model of physics in a compositional manner. Another important aspect of this particular modeling choice is that it has enough structure to construct many apparently different types of forces -- roughly aligned to complexity classes of the annihilation calculation -- but there is only one notion of force: the complexity of annihilation.

Again, this is starting feel like it's moving in an interesting direction, but it raises a host of very challenging questions. In this model, because of the way the structure-behavior relationship is repackaged, we do not need a "differential structure" to host an expression of dynamics. The gold standard, however, of physical theories are general relativity and quantum mechanics. The first of these (and arguably the second) is certainly dependent on a notion of derivative to express dynamics. If we are to judge the quality of this alternate approach we have to build a means of comparison. Ideally, we would like to find an interpretation mapping the standard expression of these physical theories into the new model. A question that stands out when contemplating such a mapping is how to interpret the derivative -- and in particular its relationship to dynamics -- in this alternate model?

Monday, December 28, 2009

The secret life of space




Over Christmas i took the time to code up a π-calculus representation of the Fano plane. [1] From a layman's point of view, you can think of this as a very specific way to write a computer program that represents the information of the Fano plane. What is novel about this is that the program can evolve. As it evolves it can turn into other projective geometries. This blog records some of my motivations for engaging in this kind of activity.

Imagine that the issues around the reconciliation of quantum mechanics and general relativity have to do with a sort of impedance mismatch of the devices used to capture the intuitions -- not the intuitions themselves. i've long thought that Einstein's intuitions would be better expressed in a different sort of formalism. In particular, i think certain computational formalisms in which there is a different account of the structure-behavior relationship have the promise of being better containers for Einstein's intuitions. Remember -- after all -- Mr E had to essentially invent much of the apparatus he eventually used to express his ideas. Often the first container is not the sleekest or best suited to the job. Compare the model T to the Prius or the Kittyhawk to the 787.

Certain models of computation have hit on a novel combination. To understand the technical and historical novelty you need to understand that in classical approaches to modeling the relationship between structural (or even kinematic) aspects and behavioral aspects of physical phenomena there is a clear dividing line. Algebraic structure encodes structure, and maps or functions between algebraic structure encodes behavior. The classic example of this is linear algebra. Vector spaces are where you encode state. Maps between vectors spaces are where you encode behavior.

Now, certain families of computational calculi -- notably lambda and π-calculi -- do not endure this division of labor. Rather, behavior is "folded into" the specification of the structure. You have a 3-fold spec: an algebra (the grammar of the terms in the model), a structural equivalence (saying which "syntactic differences" can be treated as noise), and a reduction relation -- which says how terms (aka programs) behave or evolve. (See, for example, this specification of the variant of the π-calculus i used to construct my encoding.)

This is a novel way to package structure and behavior. The novelty has had some interesting technical and cultural consequences, but that's beside the point. The main point is that this packaging makes these calculi intriguing candidates for encoding Einstein's intuitions about the relationship of geometry, gravity, mass and energy.

Of course, one of the tricky things about these calculi is finding notions of geometry inside them. Direct (but not entirely simple-minded) interpretations of the topological structure of these formalisms get you things that are not even T-2 -- that is, do not even enjoy certain basic separation properties that we think must hold in models of physical space. So, how do you get geometry to show up in these types of formalisms?

One approach is to encode the geometry. On one level we know this must be possible, because both the lambda calculus and the π-calculus are Turing complete. So, since we know we can encode convincing simulations of (the geometry of) physical space as ordinary programs, we know we can encode them in the lambda or π-calculus. However, the question remains whether that encoding bears any relationship to the fundamental machinery of the computational model. In other words will it be of any use to encode these notions in the model, or will it just be another formal representation -- potentially with more baggage to push around.

That's where employing certain principles -- principles we have picked up from working with computation -- comes into play. Notably, when the structure of the encoding is in alignment with something called the Curry-Howard isomorphism, it enjoys certain properties. It's another long discussion to try to explain what those properties are and what they offer to this endeavor. Suffice it to say that encodings enjoying this discipline are more easily aligned with a whole host of other structures and so are more easily probed and more easily beaten into layers of abstraction that simplify pushing baggage around.

So, i've now exhibited a very simple-minded encoding of the simplest of projective geometries, the Fano plane, into one of the computational calculi, the π-calculus. The encoding aligns with the Curry-Howard isomorphism in a specific way. From a layman's point of view, you can think of this as a very specific way to write a computer program that represents the information of the Fano plane.

What is novel about this is that program can evolve. As it evolves it can turn into other projective geometries. That's starting to feel more closely aligned with Einstein's program -- while being far from a full expression of his ideas. i can't begin to calculate the precession of the perihelion of Mercury. On the other hand, i have a good handle on how to import the recent work by Abramsky and Coecke on axiomatic quantum mechanics into this framework -- a pay-off of respecting Curry-Howard.

The 'Doh!' moment i had over Christmas was that this sort of task was in my grasp years ago. i've already demonstrated a somewhat more challenging encoding -- encoding knots as processes in the π-calculus. But, it just never occurred to me to start with the Fano plane and work out the simplest encoding that exhibited all the desiderata. Again, this simple-minded effort raises many, many more questions than it answers, but it's still pretty cool, nonetheless.

There is an intriguing connection with biology that has occurred to me ever since i began this research program. i confess the idea is not mine, but Christopher Alexander's. In his seminal work, The Nature of Order, this world class architect suggests that 'life' is an objective property of space. He suggests that there are objective, consensually validatable properties of space that allow us to gauge which configurations of space have more life.

Since i began investigating geometry itself as an outcome of information-processing behavior i reached the startling conclusion that there might be something to his idea. Specifically, a number of folks from Cardelli to Priami, have shown that biological processes -- from signal-processing to immunological behavior -- have relatively straightforward representations in the formalism i have been using to represent geometry.

To reiterate, Priami, Regev, Silverman, et al, have represented biological processes as π-calculus processes. i now have in hand representations of both geometry and topological properties such as knottedness in terms of properties of π-calculus processes. This suggests the very real possibility that there might be overlap in the kinds of processes inhabiting the target of these encodings. In other words, could we find encodings of geometries that are also encodings of biological processes? Could we find encodings of biological processes that are also encodings of geometries?

This leads to the startling thought: space itself might be alive!

Again, this is fully in line with both credible lines of investigation and with credible methods of investigation. Wheeler, for example, coined the phrase "it from bit" to describe the research program of physics arising from information-processing. What is more natural, and more in alignment with a reductionist view point than that biology ought to lie wholly inside physics? So, if physics arises from information processing and life arises inside physics, then life arises from information processing.

Ironically, however, this provides an intriguing escape hatch for life: abstraction. The abstract properties we use to characterize those processes that are alive allow it to climb up out of any specific physical container and inhabit any formal dynamical system of sufficient complexity. Life once again shows itself to be uncontainably resilient and robust!

[1] If you want me to publish the encoding, drop a comment. If i get enough requests (say 3), i will put up the encoding. Actually, here is a more interesting artifact -- the synchronization skeleton of the encoding. It has all the connectivity of the Fano plane, but what happens after interaction is yet to be specified. There are solutions for Pij, Qij that regenerate the plane, so that the artifact is static. However, there are other definitions that generate new structures.

Monday, November 9, 2009

A bridge between nominal and positional information

Many developers have been faced with the design trade-offs around nominal versus positional access. Nominal access allows one to be noncommittal about shape information of data types. For example, if the only access to data is via a collection of functions called cons, head, rest, ... many, many shapes support valid and useful interpretations. On the other hand, this sort of specification doesn't play well with traditional pattern-matching. That is, pattern-matching -- which is traditionally a form of positional access -- nails down the shape of data.

Recently, i found myself writing Scala code in the following pattern.

trait T[P1,...,Pm] {
def location1 : Type1[P1,...,Pm]
...
def locationN : TypeN[P1,...,Pm]
}

abstract class C[P1,...,Pm](
location1 : Type1
[P1,...,Pm],
...,
locationN : TypeN
[P1,...,Pm]
) extends T
[P1,...,Pm]

case class CC(
location1 : Type1
[K1,...,Km],
...,
locationN : TypeN
[K1,...,Km]
) extends C
[K1,...,Km]

This spells out a clear relationship between nominal and positional access, but it made me wonder if one could have a tighter, clearer relationship. Could you insist, for example, that all nominal types (the types of things that represent names, variables, etc) encoded positional information?

Before showing how simply this can be done, let me provide a little additional motivation through chemistry -- literally. Walter Fontana once remarked to me that one of the real dividing lines between the practice of alchemy and chemistry was the development of the periodic table. Before the periodic table the names of the elements didn't (obviously) encode structural information about the elements and hence nominal information about mixtures of elements had no predictive power over the properties or behavior of said mixture. After the periodic table the names of elements effectively became their positions in the periodic table which reflected structural information about the elements they named. This enabled the practitioner to write equations of the form

Na + Cl => NaCl

2H + O => H2O

and make a formal theory of their meaning that had predictive properties of the physical world. That was a big step.

In my mind software development suffers because so much rests in the informal or contextual information encoded in nominal access to information -- such as variable names or function names. In point of fact many pieces of code are behaviorally equivalent and not recognized as such because they are encoded via nominal access that obscures this fact. On the other hand, purely positional access can be prohibitively inexpressive. Higher-level languages are clearly more understandable to humans than machine code precisely because of the ability to add contextual information in nominal access -- such as variable names or function names. Therefore, finding better relationships between nominal and positional access -- in particular understanding what the possible set of relations are -- seems like a worthy goal. Is there the equivalent of a transition from software-as-alchemy to software-as-chemistry?

McBride, et al's, recent work on the derivative of regular data types turns out to provide a step in that direction. Let me illustrate the idea via the lambda calculus. We can write down a domain equation for the terms in lambda calculus.

T[N] = N + N x T[N] + T[N] x T[N]

This domain equation can be viewed as a transcription of the standard syntactical presentation of the lambda calculus

T[N] ::= variable N | abstraction N T[N] | application T[N] T[N]

each summand in the top equation corresponds to it's labeled choice in the second. Ironically, reflecting the topic at hand, the first equation is purely structural while the second allows some nominal information to sneak in to help the human understand the contextual relevance of each structural option: the first choice of terms that are just names are variables; the second choice of terms that are functions from names to terms are lambda abstractions; the third choice of pairs of terms are applications.

The corresponding Scala code might look like

// Lambda terms are parametric in a notion of name
trait LambdaTerm[N]

// Variables are a kind of lambda term
case class Variable[N]( n : N )
extends LambdaTerm[N]


// Abstractions are a kind of lambda term
case class Abstraction[N](
formal : N, body : LambdaTerm[N]
) extends LambdaTerm[N]


// Applications are a kind of lambda term
case class Application[N](
fn : LambdaTerm[N], actual : LambdaTerm[N]
) extends LambdaTerm[N]


Note that we have acknowledged the data type is parametric in the notion of name. Whatever type supports the constraints of a nominal theory for the variables in the lambda calculus can be supplied. Now, given this parametric type, T[N], you can calculate the data type of contexts. This data type provides context and path information to allow "plugging in" of term to context. We write this ∂T[N] and refer to McBride's paper as an excellent resource for the reader who wishes to calculate this type for themselves. The key point is that this type represents positional information in type of lambda terms. So, to make a bridge between nominal and positional information all we have to do is to tie the recursive knot.

T[N] = N + N x T[N] + T[N] x T[N] 1
N = ∂T[N]

Note this step is not the end of the story, but rather the beginning. In particular, there are several desiderata.
  • What ties the particular use of a position as a name to something that is coherent or consistent? Specifically, what additional constraints are necessary to ensure that a nominal points to a location in the structure it uses?
  • Without specific additional term structure to make use of the positional information available in the nominal entity this is little more than another method of generating tokens. However, the recursive relationship makes nominal structure sensitive to modification of term structure.
In the rho-calculus, a π-calculus-like theory of processes in which the names of channels are quotations of processes, Radestock and i added the de-quotation of a name as a term. This form addresses the second concern and is easily adapted to the setting here. However, the first concern is really quite new. Of the many directions this question leads i'm captivated by the following.
  • How do DeBruijn indices relate to the solution to these recursive equations?
  • Can the contextual positional information be used to construct a better encoding of ambient calculus into π-calculi?
  • Can the correlation of nominal and positional information give a better way to correlate gravitation to metric?
[1] The reason we consider the data type

T[N] = N + NxT[N] + T[N]xT[N]

where we take a strictly syntactic view of lambda terms as opposed to say

T[N] = N + [N => T[N]] + T[N]xT[N]

is to keep clearly in the regular types differentiable in McBride's original paper.

Thursday, September 17, 2009

Composition, delegation and interface -- a 20K ft critique of Noop

Someone just asked me to give my opinion on Noop's composition proposal. It reminds me a little bit of Self which found its way into JavaScript. It also reminds me a little of Haskell's type classes. In general, movement away from inheritance is good. The proposal, however, feels a bit like looking for the lost quarter where the light is good, rather than where you lost it. Before considering delegation machinery, let's consider the value of an interface. How many interfaces are there? One way to see that is just to consider all the sub interfaces of a single interface with n methods on it. Hmmm... that's 2^n interfaces. That's a lot. Does that give us any confidence that any one way of carving up functionality via interfaces is going to be sane? Further, in practice, do we see random distribution through this very large space?

What we see over and over again in practice is that the answer to these questions is 'no!'. That means that there is something that binds a collection of methods together. What might that something be? One place to look is mathematics. Which maths should we look at? The maths of category theory has been very fruitful both in explaining existing functional programming techniques and -- perhaps more importantly -- suggesting ways to improve them as well as wholly new techniques. What we find in category theory is that it is natural to collect maps (read functions) together. A good example of such a beast is a monad. A monad -- viewed categorically -- is
  • a map, T, taking types to new types and functions on those types to new functions. Let's call the universe of types and functions expressible in our model of computation (as proscribed by our programming language), C. Then T : C -> C.
  • a higher order map, unit. Just like T takes C to C, we can understand a "noop" like map that takes C to C, call it Id. Then unit : Id -> T. We intuitively think about it as putting basic types inside the container T, but it's really a higher order map.
  • another higher order map, mult : T^2 -> T. We talk about it as a kind of flattening (and in Scala it's called flatMap), but it's a higher order map.
Now, one is not finished spelling out a monad when giving this collection of maps. One must also show that they satisfy certain constraints.
  • T is functorial, meaning T g f = T(g) T(f)
  • unit and mult are natural transformations, look up the meaning because unpacking it here would take to long
  • mult( mult T ) = mult( T mult )
  • mult( unit T ) = mult( T unit )
This set of constraints must go with the monad. This example provides a little more detail in terms of what binds a group of maps together, and hence of what might replace the notion of interface and explain what we see in practice. Good programmers invariably pick out just a few factorizations of possible interfaces -- from the giant sea of factorizations (read different ways to carve up the functionality). The reason -- i submit -- is because in their minds there are some constraints they know or at least intuit must hold -- but they have no good way at the language level to express those constraints. A really practical language should help the programmer by providing a way express and check the constraints that hold amongst the maps in an interface.

i submit that this idea is not the same as "design by contract". i am not proposing an Eiffel-like mechanism. Again, taking a functional approach to computation via category theory leads one towards modeling interfaces as categorical "situations" like monads, comonads, distribution laws, etc. This means that a large number of the constraints come down to
  • functoriality
  • naturality
  • coherence
Language support for this approach might include keywords for these kinds of assertions. It is a gnarly beast to offer automatic and/or compiler support for checking general constraints. Even this limited family of constraints that i'm proposing can generate some very difficult computations, with very bad complexity. However, for those situations where a general purpose solution to check assertions of functoriality, naturality and coherence are infeasible, one can use these hints to generate tests to probe for possible failures. This idea follows in the same spirit of replacing proof with proof-checking.

[Note: just after i posted this Tony Morris posted some ScalaCheck code that lines up precisely with what i am talking about. Here are some checks for functoriality. Here are some checks for coherence.]

So, we might consider a specification of the form

situation Monad[T,A] {

unit : A -> T[A]
mult : T[T[A]] -> T[A]

functorial(T);
natural(unit);
natural(mult);
coherent(T,unit,mult);

}

Of course, this is not the only way to go. i've yet to be convinced that category theory offers a good account of concurrency. Specifically, categorical composition does not line up well with concurrent composition. So, interfaces organized around types for concurrency is also something to consider. In this case, one might find a natural beginning in interfaces in which -- roughly speaking -- the methods constitute the tokens of a formal language the constructors of which are given by the types for concurrency paradigm.

Regardless of whether the constraints associated with an interface are categorical in nature or derived from behavioral types the key point is that they are the principal value in the interface. Take a hint from the failure of inheritance. One of the central failings of inheritance was its bad interaction with concurrency. Documenting the issues around the inheritance-synchronization "anomaly" (tell tale name) was a cottage industry in the late '80's and throughout the '90's. The issue is that specialization can relax behavior relative to synchronization guarantees provided at a superclass. Because inheritance does nothing to support or enforce the synchronization constraints it is actually harmful in the concurrent setting. The moral -- again -- is that constraints make the interface. How about we look at that problem before we enable delegation through 2^n possibilities -- most of which -- let's face it -- are not going to work?

Wednesday, July 29, 2009

Another step towards Stockholm

[Ed. note: click on an image to get an enlarged view. Code has been captured as images due to strange layout behavior.]

Today, i committed Stockholm's first version of the SQL persistence layer based on Stefan Szeiger's scala-query to github.

Let's take a look at how this all fits together by way of a familiar example. Our old friend, the lambda calculus, is a paradigmatic DSL -- the mother of all DSL's, with that peculiar kind of specificity that makes it generic again. Here's the syntax of a version of the lambda calculus in the input language for Stockholm.



From this language we generate
  • a parser for a concrete language that we can type in at the keyboard;
  • latex'ed and html'd versions of documentation of the concrete syntax;
  • an abstract syntax that doubles as a data model, expressed as Java objects that are accessible from Scala;
  • a persistence mapping for the data model;
  • a lift-based web wrapper around a minimalist REPL that simply reads the concrete syntax and pretty prints the abstract syntax tree corresponding to the input expression
  • as well as links to pages for the documentation on the lift site map;
  • a RabbitMQ transport for JSON serialized versions of the data model.
Above we see a screenshot of the first page of the generated site (after the login page); and below we have shot of the REPL page



The form is backed by the following scala code which determines what the user has asked to do with the source (parse it, evaluate it, type it or send a JSON representation of it to a queue).



Parsing an abstraction like the one in the top window will result in an instance of the Java object that represents Abstractions



Instances of this object can be stored and retrieved via the scala-query mapping for the Abstraction object.



These bits and bobs enable the sorts of communication flows depicted in this diagram.


The point, of course, is that all of this infrastructure is completely generated. Instead of our old standby, the lambda calculus, we could have put in a description of patient records in a health care information processing system.

Saturday, July 11, 2009

House calls

Several months ago i was thinking about the current situation we find ourselves in regarding health care and hit upon an idea that i felt was worth socializing, so i dropped it into my twitter and fb streams. Now that our illustrious federal legislative bodies are considering health care policy, i would like to do everything i can to bring attention to this simple idea and some of the principles it embodies.

i should say, up front, my concern with health care is the cost. i would much prefer that the state not get involved in health care, itself. i'm very left-leaning as far as my political views go, but i have a lot of basic misgivings about the state getting involved in health care -- largely because my views about what is healthy seem very far from what i take to be mainstream views on what is healthy. As one example, all of my children were born at home, with a midwife present at the birthing. This was the natural and correct choice for my children and my family, from which we have derived lasting benefits. While the country, as a whole, has moved closer to supporting this kind of choice, i could just as easily see it drifting away from it again. So, i'd simply not like to have the state deciding for me what constitutes proper health care and what doesn't; and, as soon as they get involved in providing health care, that is a natural next step, given the way this country tends to operate.

Therefore, i'd rather focus on cost, and rather than spending a lot of time analyzing cost, i want to propose a very simple suggestion that i think could mitigate some of that cost, and have other benefits, too. Part of why i'd like to address it this way is that there are many, many factors that go into the ridiculous cost of health care in this country; but, much of what is at the root of it, in my view, is an unnatural and unsustainable view of what is healthy. That's not something i think we can address head on, at this time, in a way that can lead to workable consensus around effective measures to reduce cost. There are practices, however, that i believe might be recognized as absurd by a fair majority. Here's a recent example from my life. Around Christmas of 2007, my little boy, Gabriel, who was 4 at the time, got his thumb mashed in a door. i was working at the time, and my wife decided to take him to the emergency room where they proceded to give him both a local anaesthetic and high powered pain killers and then stitch on his nail -- that everyone knew was going to pop off in a week or so. For this we were charged 1000 USD -- after the insurance paid the bulk of the cost. i guess i've turned into a walking cliche, but when i was 4, the doctor would have wrapped up my mashed thumb, told me a story to make me laugh, told me another story about being brave and explained what was going to happen to my thumbnail and sent me on my way -- probably with a popcycle or lollipop to take my mind off the pain. Cliche or not, i think many people reading this will agree that both the treatment and the cost were absurd.

There are obvious pressures on emergency room and hospital staff that lead them to behaviors that are more fiscally than medicinally motivated. Again, rather than go into a detailed investigation of those pressures, i would like to observe that had we been able to request a house call, i think things would have gone very differently. For one thing, of the two nurses, orderly and doctor that attended this mashed up thumb, only one of them would be likely to make the house call. It would also have been much less likely that a wide array of pain killers and anaesthetics would have fit into a doctor's bag -- and those that did would probably be conserved for the cases that really called for them. Expensive tests and expensive procedures don't travel well. In short, i think a house call would have cost us less, and cost the health care provider less, as well.

And, that's my simple proposal: reinstate the house call. i think we should make it a part of public policy that patients may a make a determination that they would prefer the health care provider come to their home. The key is to put the choice in the hands of the person or family needing care. Despite the potential for litigious nightmares, i believe there are ways to craft sufficient protection for both patient and health care providers, and that's why i want this idea to enter into public debate and why i want my representatives in Congress and the Senate to give it some time.

i think this idea scales well. Think about the possible reduction in carbon footprint. Instead of 20 people driving 20 cars to go to a waiting room (which is itself taking up precious resources), 1 car goes out and -- of necessity -- plans an efficient route to visit 20 homes. Moreover, the doctor goes out into the community and sees how that community lives and what sort of health problems that community has -- in context. It's amazing how standing in someone's home can give you a much clearer idea of who they are and how you can best serve them. i could cite all kinds of supporting evidence, but i would rather appeal to my reader's native common sense. It's much easier to compartmentalize and distance oneself from one's clients when they come to you. It's a different experience altogether when you go to them: enter their homes; see how they live; see the ills they suffer in the places where they are suffering them.

To my mind that's the kind of change that could bring on a qualitative shift in health care. It allows for a more whole view of the people and families that need healing. That's what i think we need, a view that is more whole and more wholesome; but, i think we can only get there in small, specific steps that lead to more or less immediate feedback and positive outcomes. That's what i think is embodied in the house call: a small step to lower cost by bringing the healing home.

Tuesday, July 7, 2009

Scores and comics and views of twittering streams and face brooks



Everybody who might be reading this already knows about Twitter and Facebook. So, they have already been faced with challenges regarding how to organize the deluge of events from the feeds/streams they are following. It turns out that we have lots of successful frameworks for organizing the presentation of temporal information. Two from popular culture are musical scores and comic books. In this post i'll just focus on the use of the musical score as an organizing metaphor.

i'm not sure how many people fully realize this, but a musical score represents synchronously parallel streams. That is, all the musical events corresponding to notes and rests are governed by a global clock. Here we mean global in the sense that every note and rest is in scope of the clock -- they can all "see" the clock. The "tick" of this clock corresponds to the smallest notated/audible subdivision of the beat. i mention this fact in this context because so much of music is decidedly not synchronous, but better thought of as a message-passing form of concurrency. Jazz is an excellent example of this, but so are many of the indigenous African musical forms. One of the most interesting challenges i can contemplate is the design of a system that is as accessible as western musical notation but that affords the expression of message-passing forms of musical composition. Such a device could have profound impact precisely because the artifacts we use to express ourselves shape and form out ways of thinking about what we're doing (and hence what we end up actually doing).

A score is organized into staves or systems. A system is effectively given by 5 actual (and many virtual) lines, one for each pitch class, or note. Time flows left-to-right in a score. Roughly speaking, events are effectively notes and/or rests, marks on the line of some pitch class that indicates the duration of the sounding (or "unsounding") of that pitch class. A system is subdivided into measures or bars. These are marked by vertical lines and in conjunction with the time signature add further organization to time by delimiting the number of beats.

We can use this basic framework as a more generic way to organize events. Here is an outline of one such generalization.

  • The horizontal line normally associated with a pitch class (aka note) is now associated with some semantically relevant concept, for example "home" or "travel".
  • Events get marked on this line depending on their association to the concept. In the example illustrated above the user could have made "groups" of "friends". Then, when a "friend" in the "travel" or "yoga" group posts, their avatar/icon appears on that line with a little flag that provides a visible place to get more information. One might imagine a summary, a mouse-over summary and a link to detail. The location and orientation of the flag can give further information; for example, above the vertical midpoint of the avatar means something about importance or need for response; pointing to the right means something about the future; below the midpoint means strictly informational; pointing to the left means some something about the past.
  • This arrangement could easily be pivoted. For example, each "friend" could correspond to a line for a pitch class. Then the posting marker could be labeled with an icon representing the associated group.
  • Just as in musical notation, staves/systems, can be groups themselves, representing logical and potentially aggregate "voices".
  • The notion of "measure" and "beat" can be used to control how much information is displayed.
If i can carve out the time, i'll flesh out this post and make another regarding how comics can provide a similar organizing metaphor.