Elegance

March 29th, 2006

After spending a lot of time designing software, you get a sense of where your data and functionality lie within a system. Hopefully, you’ve encapsulated the right data in the right classes or its time to start refactoring! You know when you’ve got it right, because there is a balance between the size of the class, its openness and its flexibility.

I call this elegance, and I think its a property that extends to people systems as well as software systems.

One of the central ideas in software design is the principle of least privilege, which says that you only allow code as much authority and resources as are necessary to complete its task. Even Microsoft knows this (although some might say they learned a little late). This happens at the operating system level (though user permissions, inter-process protection, hardware abstraction) to keep processes from interfering with eachother. This happens at the object level, too: class interfaces exist to encapsulate data and functionality, this time its to protect objects from becoming corrupted from improper use.

When you have too much privilege over data or functionality (a large class, the root user, etc…) the principle is broken, and the system is prone to instability or attack. When too much responsibility rests with one component this exacerbates the smallest problem with its implementation (i.e: a bug in important code is much worse than one elsewhere). On the other hand, when there is too little privilege, the system becomes brittle and inflexible, difficult to extend. When the balance is right you have flexibility, robustness and elegance. Elegant code is almost always concise code, which means less wasted resources.

I think the same applies (with slightly different terms of reference, of course) to systems of people, i.e: government. Apparently, John Locke wrote about the principle of least authority over three hundred years ago, and informed the writers of the American constitution (and I just thought he was a character in a TV show ;-) ). And I think the same conclusions apply.

When a single person or small group of people have too much authority over people or money or services, they become a liability for abuse or attack (like ID fraud). Of course, its possible to have such a system run smoothly, but people, like code, have flaws (bugs). And flaws in important people (or people in important systems) are more damaging than flaws elsewhere. This is inefficient because the government invests a lot of time and effort into maintaining its own power (by spying on the citizenry, for example). To go to the opposite extreme, too little authority in the government would prevent it from safeguarding our rights, collapsing into randomness, possibly anarchy. Then “government” would have to be carried out inefficiently at the individual or local level (vigilantes).

To carry the analogy to its logical conclusion: for elegant, efficient government the balance of privilege / authority has to be right. Everyone must have the authority and resource to do their job, but no more. Unfortunately, as I blogged earlier, I think we’re already off-balance.

Forgive me for looking at this in terms of software, but, as the saying goes, when you have a hammer, every problem starts to look like a nail. And maybe thats the problem – our PM has a legislature, so every problem starts to need a new law.

Entry Filed under: Politics, Tech

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

March 2006
M T W T F S S
« Feb   Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Most Recent Posts