Law & Coding: variables vs defined terms
You don’t have to be a genius to code! Likewise, maths mastery isn’t needed, except for more technical or specialist areas like machine learning. Even in more mathematical domains such as machine learning, the software industry continues to provide abstracted frameworks with which to work above the maths.
Further, coding and law have a lot more in common than coders and lawyers might otherwise appreciate. Joining the dots between these two domains is increasingly common, although misunderstood in equal measure.
(For more on whether lawyers should code, see our article on that subject!)
In what will hopefully become a series of posts, we’ll try to explain the similarities and differences between coding and legal drafting concepts. Hopefully, these articles will help lawyers and anyone coding in the legaltech domain understand each other better.
Let’s start simple:
- variables — a programming concept; and
- defined terms -a legal drafting concept!
Before we begin
Python
Although variables are a concept common to coding languages, the exact syntax necessary to create and manipulate a variable varies from language to language. For these purposes, we will use the programming language:
Python is easy to pick up and understand despite it being a massively popular language used in everything from websites to complex machine learning algorithms.
If you want to know more about python and how to use it, check out this beginner’s guide or this excellent 101 guide.
For the purposes of these posts concerning similarities between law and coding, it’s not strictly necessary to read those guides (or others) as the examples will be super simple for now!
If and as this series progresses, the series might warrant spending an hour or two familiarising yourself with Python in more detail. When that happens we will make it known!
Variables = Defined Terms
and vice versa
To begin with, we will consider variables (coding) and defined terms (contract drafting). There’s a lot of interesting overlap, but also some worthwhile distinctions.
What is a variable?
In a computer program, a variable is a container used to store information that we want to reference and / or manipulate throughout a computer program.
Good coding principles dictate the use of descriptive label names so the meaning can be understood more easily by the programmer or another programmer reviewing the code.
Here’s an example variable:
container = 1
Subsequent references to container
will reference the designated value, in this case: 1
What is a defined term?
In a legal contract, a defined term serves the same purpose as a variable: it stores information we want to reference and / or manipulate in a legal contract.
Here’s an example:
“Loan Agreement” means the £100 loan agreement dated 28 February 2017 between Big Bank and Joe Bloggs.”
Defined terms are usually grouped together in an alphabetical list and located at the start of a contract under the clause heading, “Defined Terms’ or “Definitions”.
Sometimes for documents governed by laws other than England & Wales (e.g. contracts governed by the law of a particular State in the USA), the defined terms might be listed in a schedule at the end of the document.
Finally, it’s also common to define defined terms in line. We will describe these distinctions in greater detail below.
Creating Variables + Defined Terms
Declarations vs. Definitions
How do you create a variable?
Creating a variable is easy. To create a variable you
- decide upon the label name; and
- assign it the desired value you wish to store in that variable (remember to think of variables as containers for now).
In coding speak, this is known as declaring a variable. For instance:
name = "Derren Brown"
The above:
- creates a variable label entitled
name
; and - assigns to that label the value of
"Derren Brown"
, which is a string data type (a string of individual characters, i.e. A-l-i-s-t-a-i-r), using the=
symbol.
In other words, the computer program now remembers that (without any further code) any reference to name
references the stored value, "Derren Brown"
.
How do you create a defined term?
Creating a defined term in a contract is equally easy, although deciding on the actual words can be tricky given the imprecise nature of natural language versus the precise nature of programming syntax.
There’s no specified format for creating a defined term in a contract, but most commonly the format is the following:
“[Label]” means [something].
The square brackets mean you containerise the words therein. For instance, using this format we can store the value of a contract’s termination date (i.e. the date the contract terminates) as follows:
“Termination Date” means 28 February 2017.
Without any further drafting, any cross-reference to Termination Date throughout the contract now points to the stored value: 28 February 2017.
Referencing Variables + Defined Terms
call vs. Cross reference
How do you reference a variable?
Variables can be referenced throughout a program. Often a variable is referenced because it forms an ingredient for a method or function (i.e. a piece of code that uses the variable to complete a computational process).
For instance: print(name)
. This passes the name
variable to python's inbuilt print
function. Doing so tells the computer to print to the screen (i.e. display) the current value of name
, which is of course "Derren Brown"
(i.e. because we assigned that value to the name variable above!).
Here’s what that looks like in real life:
name = "Derren Brown"
print(name)
This causes the computer to return the following:
>> Derren Brown
When referencing variables it is crucial to maintain the correct spelling and capitalisation. For example, the following code would be incorrect:
print(Name)
The program would raise an error (i.e. display an error message to the screen) like so:
>> NameError: name 'Name' is not defined
Why? Well, it’s because the variable isn’t Name
with a capital "N", rather it's name
with a lower case 'n'. The computer doesn't know about a variable called Name
so it can't run the print
function on it. This is an example of the literality of computers and code.
How do you reference a defined term?
Defined terms can be referenced anywhere in the body of a contract, whether that is a recital (a series of provisions at the start of a contract usually describing the brief context or historical background to the document’s inception, e.g. a process of prior contracts amending the original contract), a schedule or a clause.
For instance:
“The confidentiality agreement shall cease to be effective on the Termination Date.”
To use the defined term you simply include the capitalised term by reference as above. Like variables, you must use the correct spelling and capitalisation. For instance, the following would be incorrect:
“The confidentiality agreement shall cease to be effective on the termination date.”
It’s incorrect because the lower case “termination date” introduces ambiguity. In other words, someone reading the contract might start to question whether the reference is to the “Termination Date”, which is a certain date specified in the corresponding defined term, or whether it intends to refer to something else, e.g. a termination date in general.
A crucial difference vs. variables is that, unlike a program, a contract won’t raise an error regarding the above unless you use a Word plugin, of which several exist today, e.g. ContractCompanion and Define (explored in more detail below).
Manipulating Variables + Defined Terms
it’s all about doing
How do you manipulate a variable?
A program can manipulate a variable to update the assigned value. For example: name = "Penn Jillette"
. This updates the value of name
by assigning it the new value of "Penn Jillette"
.
Doing so overwrites the previous value. As a result (after the above step), if we were to then use print(name)
the returned value would now be "Penn Jillette"
and not "Derren Brown"
. Like so:
name = "Derren Brown"
name = "Penn Jillette"
print(name)>> Penn Jillette
How do you manipulate a defined term?
Contracts sometimes update the value of a defined term. For instance:
Upon Party A’s receipt of an Extension Notice, the Termination Date shall mean the date falling 10 days after the date Party A receives the Extension Notice.
In the above, the original “Termination Date” is modified for a particular purpose, i.e. to extend the Termination Date in specific circumstances permitted under the contract pursuant to a prescribed process. If activated, i.e. upon Party A’s receipt of an Extension Notice (also a separately defined term) the Termination Date becomes the date falling 10 days after the date Party A receives that notice.
Where law and coding meet: defined terms software
trainee lawyer rocket fuel
Finally, the intersection of variables and defined terms aren’t merely theoretical. In fact, there is even software aimed at interoperating these two domains to improve legal work.
Two excellent and somewhat overlapping tools include:
- Contract Companion; and
- Define.
Let’s briefly explain both below.
1. Contract Companion
Contract Companion by Litera is a tool useful to all legal workers. That said, its focus is on typo spotting regarding cross-references and defined terms. As such it naturally fits better with paralegal, secretarial and junior legal resources. This is for a simple reason: these tasks are typically undertaken by the aforementioned individuals given they are the most cost-effective resources within any legal team.
Typo Terminator
To do so, Contract Companion processes Word documents (i.e. contract drafts) in a few seconds to identify and allow easier manual (note: not automated) correction of hard-to-see errors such as:
- unclosed brackets, e.g. “A, B and C (the “Parties” .”
- defined but unused defined terms
- capitalised but undefined defined terms
- clause / list numbering issues
- inconsistent phrase usage
- incorrect cross-references
- inconsistent dates, addresses, company names, monetary values, credit card numbers, and more
Why is this cool?
Before such tools these tasks were accomplished by either:
- printing a document and manually proofreading it, which naturally entails lots of back and forth page turning to check and double-check all the referencing by hand; or
- ctrl + f searching within Microsoft Word, which is equally suboptimal in time and efficiency.
Given the high number of document changes in any given negotiation, this process is repeated many times, exacerbating its inefficiency absent of software tools such as Contract Companion.
An example screenshot of the interface is shown below:
2. Define
Define’s mission is to make the reading, understanding, and drafting of documents simple. Unlike Contract Companion, Define is more focused on aiding understanding vs. typo spotting, albeit Define also offers features in service of the latter need.
To do so Define processes a Microsoft Word document in a matter of seconds, essentially building links between every capitalised term and the corresponding place within the document where such term is defined, whether defined terms are defined in a list or “in line”.
To the non-lawyers reading this, we mean the distinction between:
Listed Defined Terms
“Facilities” means Facility A and Facility B.
“Facility A” means £100,000,000.
“Facility B” means £250,000,000.
In-line Defined Terms
Information regarding the Transaction (the “Confidential Information”) shall be kept confidential until the date falling 2 years after the date of this Agreement.
The result is an ability to simply click any capitalised term (i.e. a cross-referenced defined term) anywhere in the document and have a pop-up menu in Word appear that presents the corresponding defined term alongside the clause.
The corresponding defined term can be edited alongside the clause and vice versa.
Nested Defined Terms
Even better is the ability to drill down to defined terms within defined terms, e.g. the below, which nests two further defined terms, i.e. “Facility A” and “Facility B”:
“Facilities” means Facility A and Facility B;
The benefit of all this is that the reviewer can read a clause and understand the intra-clause defined terms in context and vice versa without having to navigate away from the focus of their review, i.e. a particular clause.
Why is this cool?
Without such functionality, the reviewer must either print the document and page turn back and forth between clause and defined terms (and between further defined terms) or replicate the equivalent behaviour in Word by scrolling or ctrl + F searches, neither of which are great and both cause the reviewer to lose context and slow review.
If this still doesn’t make sense (quite possibly to non-lawyers less familiar with this pain point) the best thing is to see Define in action:
https://www.youtube.com/watch?v=2n_IuvoigPo
A simpe but illustrative crossover
In short there are a lot of similarities between the concepts of variables in coding and defined terms in contract drafting!
There are of course many differences, however, we don’t want to get too bogged down and detract from the purpose of these articles, which is to help understand how key concepts are more similar than they might otherwise appear!
Finally, thanks to clever people joining the dots between the world of software and contracts it is now possible to automate some of the previously mind-numbing checking of defined terms and cross-referencing typos (and semantic concerns) via tools such as Contract Companion and Define.
Originally published at lawtomated.