A Programmer’s Perspective on Politics

Election time always finds me musing on the nature of politics. Of course I must admit that being a computer programmer colors my view of the whole process more than just a little bit.

I mean, I know that the political process in this country is one that has evolved over (literally) hundreds of years – and the common law tradition that we use is even older than that. And while part of me thinks that something so old ought to be inherently trustworthy, the programmer part of me can’t help but think that it’s a little… obsolete?

I mean, it makes sense… if you think about it. Let me explain:

Laws are the “operating system code” of a Society

This is not as far fetched a metaphor as it might seem. After all, what is computer code but the instructions for how a computer should operate – and laws do the same thing for the society (or government). You could say that the Constitution in the United States is our “OS kernel”, and the US Code (which is absolutely enormous, by the way) is the Operating System. Various federal regulations and agencies’ rules make up the applications.

Image courtesty Flikr user umjanedoan
(Image courtesy Flikr user umjanedoan)

When you think of it that way, you can see that our system has more than a little bit of “cruft” in it. In fact, there’s a whole lot of cruft in there – after all, our legal system has evolved over more than 200 years, growing rather organically. If we were looking at a similarly aged computer program that had been expanded, built upon, patched, and repaired in the same way, every sane programmer who looked at it would recoil in horror and demand that the whole thing be thrown away and re-written with maintainability in mind.

Of course whether doing that to our laws and Constitution would be a good thing is somewhat up for debate. Of course, the ones doing the debating are usually legal scholars – one has to wonder what sort of decision would be reached if we put some programmers on the job!

It is Important to Eliminate Ambiguity

There’s a commonly understood legal principle that if a law is so complex that an average person has no hope of understanding it, then the law is a bad law and might even be declared null and void. After all, people can’t obey the law if they can’t understand it!

The same thing goes for (good) code. If you can’t understand it, then it’s not good – no matter how well it might work in practice. With programmers (good ones, anyway) the importance of eliminating ambiguity permeates every aspect of their being – it comes out in the way they communicate, and you can see it quite clearly in their code. If something isn’t inherently understandable, there’s comments nearby to help you. It seems to me to make sense that we hold laws to the same principle.

Ambiguity takes another form as well – computers are very simple-minded, when all’s said and done, and they need their instructions very clear without any wiggle room for misunderstanding – or else you’ll get bugs.

Providing Error Handling / Exception Handling is Important

People make mistakes, and it’s also impossible to consider all possible outcomes. That’s why having a good error-handling strategy is key to designing a robust computer program – and the same applies to a legal system, as well.

Image courtesy Flickr user Jims Junk
(Image courtesy Flickr user Jims Junk)

Right now, error/exception handling is handled by the appeals process, and ultimately the Supreme Court. Issues “bubble up” to the Supreme Court in the same way that unhandled exceptions “bubble up,” eventually triggering an OS exception or being trapped by a debugger.

It goes without saying that having such a system is important (because errors happen), but like in programming, exceptions are computationally expensive and slow down the entire system. Throwing an exception should be a last resort – and when you throw a lot of exceptions, you slow everything down. The same goes for our court system – when there are lots of cases and appeals pending, everything just gets bogged down.

As in programming, having the system to handle errors important, but it’s also equally important to limit the number of errors that “bubble up” to higher levels, and to try to handle errors locally, before they get out of hand and bring down the entire system.

Continuous Upgrades

Some people would say “if it ain’t broke, don’t fix it,” but it’s a fact of life that computers change – hardware gets replaced, and upgrades are pretty much a fact of life. Thus, code must be updated to handle these changes. Likewise, the society on which our laws “run” is constantly evolving as well – and laws need to be “upgraded” to handle these changes.

There are lots of lists of old, weird laws that are still on the books in many states – and at the Federal level, I can only imagine the old, outdated laws that are still lurking in the corner of some ancient statute. As with code, it would be best for everyone if we took the time to go through the old laws (old code) and remove the stuff that isn’t relevant anymore – or at least update it so it reflects current society.

Look at laws related to things like copyright and search & seizure, and how they are being bent, twisted, and pried into “fitting” around things like digital archiving, the Internet, and so forth, and you’ll see why keeping your laws up-to-date is important. I’d almost say that the main part of a politician’s job should be reviewing and updating old laws, rather than always trying to write new ones.

Ease of Use (Usability)

This is less of a programming point and more of a UI-design point, but the two are closely related so I’ll let it slide.

No matter how awesome a program is, it’s useless unless people can figure out how to use it. People shouldn’t need to hire an IT professional every time they want to change their desktop wallpaper or install a new program. And by and large, programs today do try to make it as easy as possible for the user – to the extent of doing extensive usability studies and so forth.

If laws and statutes and regulations are the “programs” of our government, then it’s fair to say that their usability is… pretty crappy. Why else would we need to hire specialists (lawyers, tax specialists, accountants, etc.) to understand the law, or require police to read a simplified version of people’s rights to them when they are arrested?

Take the tax codes as an example. Most people have only the vaguest idea of how it works, and they use some default settings (1040-EZ) to get by, even though there might very well be better options for them. If the user can’t find these options, or can’t understand how to use/apply them, then they might as well not exist!

We need the legal equivalent of the Ribbon UI from Microsoft Office 2007 – or maybe the UI from Apple’s OS X or iPhone – to help people actually USE the laws that have (ostensibly) been created for their benefit.

Wrapping it Up

As I said, maybe it’s just because I’m a programmer that I think about these things in this way – but somehow, I can’t help thinking that having a few programmers in politics – or teaching some politicians to program – might not be as bad a thing as it might sound to some. Being a programmer and a geek does tend to come with a particular world-view, which does of course color the way you see things.

However, when you stop thinking about politics and law and government as being “special” or “sacred,” but instead just think of them as another system in our lives that needs to be managed, you can see that applying what I’ve talked about here – what is basically just common sense – is really in our best interests. I can only hope that eventually more people will see it that way.

(Images courtesy Flickr users umjanedoan and Jims Junk, licensed under a Creative Commons Attribution 2.0 Generic license and a Creative commons Attribution-Noncommercial-No Derivative Works 2.0 Generic license.)

By Keith Survell

Geek, professional programmer, amateur photographer, crazy rabbit guy, only slightly obsessed with cute things.