Contracts and computer programs are surprisingly similar. If you accept this, it follows that the way contracts and computer programs are written could become surprisingly similar too.

This means that coding best practices now are a leading indicator of contract drafting best practices in the future. If you are a lawyer, you can find clues in the way your job will look in ten years by looking at how code is written now.


I. Contracts are like code

A contract is made up of clauses, which act as a set of instructions for the parties to execute. A computer program is made up of code, which acts as a set of instructions for the computer to execute.

Both share some similar fundamental attributes. Here are some examples.

Variables

let theCompany = "ACME Company Limited"

The code above is declaring a variable. Even if you aren’t familiar with the syntax being used, you might still be able to make a guess at what it is doing.

Here’s a translation:

Javacsript: let theCompany = "ACME Company Limited"

English: "The Company" means "ACME Company Limited"

Declaring and assigning variables in code is like defining terms ****in legal agreements. The word let indicates that a variable theCompany is being declared, and the = sign indicates that the text "ACME Company Limited" is being assigned to the variable theCompany. In other words, we are defining **the term ** theCompany to mean "ACME Company Limited".

Why would you assign a variable in code? The same reason you would define a term in a contract. Variables are concise and readable. Imagine how tedious it would be to type out the name of the parties in full every time instead of referring simply to the "Vendor" and "Purchaser". Not only would this be annoying, you'd increase the chances of making a mistake, or a party making an error in interpretation.

In programming, there's a concept called DRY — Don't Repeat Yourself. It means you should avoid repeating unnecessary bits of identical code by using abstractions like variables. The opposite of DRY is WET — "write every time" or "write everything twice" or the weirdly aggressive "waste everyone's time". Defined terms are DRY, and you don't want to be WET.

Operative clauses

An operative clause is a clause that requires something to be done or not done. Operative clauses are often condition precedents that must be fulfilled to trigger the obligations of the contract. In a sale and purchase agreement, for example, the obligation to transfer the property being sold usually only arises when the purchase price has been paid.