Law Is Code

♫ There’s a Law, there’s an Arm, there’s a Hand
There’s a Law, there’s an Arm, there’s a Hand… ♫

Words, music and lyrics by Leonard Cohen.

law is code

Lawrence Lessig wrote a very famous book called Code is Law (now in version 2 simply called Code v2). In these books, Lawrence (and here I am guilty of oversimplification but at least I can claim that this is Lawrence’s own oversimplification from his web site describing the books):

More than any other social space, cyberspace would be controlled or not depending upon the architecture, or “code,” of that space. And that meant regulators, and those seeking to protect cyberspace from at least some forms of regulation, needed to focus not just upon the work of legislators, but also the work of technologists.

I have been thinking of Lawrence’s ideas in a slightly different and I have to admit, less lofty context. It has to do with the fact that legislators, when they consider regulations and laws, need to focus not just on the law but also on how that legislation will be implemented into code. In other words, Law is Code.

Bill Gates once famously said:

The first rule of any technology used in a business is that automation applied to an efficient operation will magnify the efficiency. The second is that automation applied to an inefficient operation will magnify the inefficiency.

Passing laws that enable existing ‘things and processes’ – such as efiling, billing etc to be done electronically may only end up magnifying the inefficiency of the existing analogue process if thought isn’t put in as to how that law will be implemented as Code.

Take billing for example. We are quite accustomed to receiving a paper bill and paying that bill by mailing a paper cheque. Now consider if you allow bills to be paid electronically – the paper bill comes to your door and instead of writing a cheque, you pay the bill by transferring funds online. So far, so good.

Now ..what if you allow a vendor (in this case a lawyer) to bill electronically? Well, most lawyers will simply email out a PDF version of a paper bill. You haven’t really improved the underlying process. What if you went the next step and allowed a vendor to issue bills in true electronic form that can be read directly by a purchaser’s accounting system (machine readable)? Now that is an improvement that utilizes the efficiency of the technology and truly changes the workflow.

Problem is – that most laws require lawyers to sign invoices. How do you sign a truly electronic invoice? You could apply a digital signature – but most accounting systems are not set up to either apply – or read – such signatures. What happens, at least in BC, is that the lawyer sends out a signed letter stating that they are submitting the electronic invoice (and keeping a signed copy of the pre-bill indicating that they approved the bill in human-readable form before it was sent).

In this case I submit what is required is a change in the law that reflects that legal billing may be capable of being implemented as Code in a truly electronic process.

A second example is filing documents in the Land Title Office. Now today, virtually all basic land registrations in BC can be done electronically (and in fact in most cases must be done so). The requisite electronic documents are prepared using various applications, typically cloud-based. They are submitted into the Land Title Office using digital signatures (in BC at least).

The problem is..the forms have not yet caught up with the fact that lawyers and law offices are automating (ie applying digital workflows) to the land title filing process. For example, if the information to be inserted into a particular form field is too long, then it has to be placed into a Schedule. The e-forms have been set up as if someone human is filling them in and determining if the text is too long. Problem is that law firms with large practices would like to set up the document assembly process so that the text is inserted into the forms without the need for the paralegal to stop the process if necessary and then complete the schedule as required when the text exceeds the form field length. In this case, the law which allows for e-filing (indeed, requires it) needs corresponding Code that fully implements the electronic filing process.

Law makers of all stripes now need to think in terms of systems and consult with technologists in terms of not only formulating the law but in considering how the law will be implemented. Where there is a law, that law should be given a hand by technologists in terms of how it will be coded so that it comes to terms with the (increasingly) digital world in which we all work.


  1. This note makes good points, though I would be inclined to say that they are specific examples of the kind of thinking that has to go into any regulations that implement a statute.

    I am not sure that I follow the first example, however. BC’s Electronic Transactions Act says – in the model of the Uniform Electronic Commerce Act – that where the law requires a signature, an electronic signature satisfies that requirement. It does not say what kind of electronic signature. Thus a lawyer wanting to sign an electronic invoice can use anything at all that is intended to be a signature – no special design or technology required. It could be the lawyer’s name with ‘(signed)’ before or after or under it. So what’s the problem?

    The second example is a better one, and does require good coding – though probably not the informatics version of rocket science. Does it require the land titles office and the lawyers’ offices to have the same technology, or to resolve the problem the same way? Maybe that’s the subject of a regulation.

  2. John

    Thanks for the comments.

    Regarding the first example, the problem is that the software that does the e-billing renders a bill that is only machine readable. The invoice itself is machine code – application to application. There is no provision for a lawyer to add his/her name with ‘(signed)’ to it as that is an analogue process that doesn’t have an equivalent in this EDI (Electronic Data Interchange) process.

    For readers not familiar with EDI, Wikipedia defines it as follows:

    In 1996, the National Institute of Standards and Technology defined electronic data interchange as “the computer-to-computer interchange of strictly formatted messages that represent documents other than monetary instruments. EDI implies a sequence of messages between two parties, either of whom may serve as originator or recipient. The formatted data representing the documents may be transmitted from originator to recipient via telecommunications or physically transported on electronic storage media.”

    It distinguishes mere electronic communication or data exchange, specifying that “in EDI, the usual processing of received messages is by computer only. Human intervention in the processing of a received message is typically intended only for error conditions, for quality review, and for special situations. For example, the transmission of binary or textual data is not EDI as defined here unless the data are treated as one or more data elements of an EDI message and are not normally intended for human interpretation as part of online data processing.”

    In a true EDI interchange, laws that require ‘signing’ – even using your example of electronic signing – are problematic.

  3. Interesting. Recall, though, that a letterhead has been held to constitute a signature sufficient to satisfy the Statute of Frauds (in the US). Headers in emails have been held to be signatures f0r thatpurpose (in Singapore). One could argue by analogy (do lawyers know any other way?) that the part of the EDI message that identifies the sender shows the source and the intention to authenticate, which is often taken as the intent required to support a signature.

    If it were my bill, and for any serious amount, I would certainly not go down without a fight. (On the other hand, how much would it cost me to generate a paper invoice, compared to setting a precedent so I could save a few bucks with an electronic version?)

    EDI arrangements frequently depended on a ‘trading partner agreement’, setting out various practical arrangements. Such an agreement between a lawyer and a client could include a provision that the electronic invoice would be deemed to be signed by the authentication information in the invoice.