Five reasons how lawyers and aspiring lawyers could benefit from learning how to code

Five reasons how lawyers and aspiring lawyers could benefit from learning how to code

There has recently been a lot of debate regarding the introduction of coding and computer science to the legal field. Many have suggested that lawyers should learn to code, whereas many suggest that it is in fact not necessary. Rather than assessing whether they ‘should’ learn to code, in this article, I demonstrate five reasons why I believe that lawyers and law students can benefit from coding. I am not suggesting that “learning to code” necessarily implies advanced software development knowledge, but rather the understanding of how programs are written, what languages exist and how a computer code behaves.

1. Investments in the UK legaltech market keep growing every year.

Although much of the law of the United Kingdom is deeply entrenched in history, with case law still in force reaching back as far as to the 13th century, the UK is interestingly also the legal technology hub of Europe, and arguably among the top three in the world. As demonstrated in an earlier article, the UK legaltech sector has received in 2018 and 2019 double the amount from previous years from external investors. Despite these numbers inevitably shrinking at the moment due to the Covid-19 crisis, it is more than likely that the numbers will grow in the future.

How is this related to coding? In a general sense, it highlights that the demand for technology within the legal sector is growing, and lawyers, who have the best understanding of the sector (contrary to software developers), are naturally more aware of the issues they deal with within the course of their career. This is where an understanding of how programming languages work, and what the terms such as blockchain, AI, deep learning, structured data, or natural language processing mean and entail, would drastically increase the emergence of ideas that might solve such issues. Consequently, law firms, aware of what is achievable with coding, would not put the heavy burden on the internal or external developers to think for them, but rather just execute their ideas.

Source: Dilbert by Scott Adams

2. As Law firms are becoming more client-centric, understanding their ‘digital clients’ is vital.

Out of the 21 unicorns (a start-up company that reaches £1bn in valuation) in the UK, four of them are directly focused on AI (making it the second biggest cohort within the group after fintech startups); BenevolentAI, Darktrace, Babylon Health and Graphcore all focus on either the improvement of AI technologies as a whole (Graphcore) or attempt to provide solutions for various sectors through the use of it. Interestingly, BenevolentAI is also considered the fastest UK unicorn to reach £1bn in valuation.

For this reason, and due to the fact that many companies show growing dependence on Artificial Intelligence (i.e. within the banking sector), understanding what technologies does the rather general term of ‘AI’ refer to might be essential. This goes far beyond the knowledge that AI refers to some kind of machine learning, where computers somehow learn things. Understanding how AI and other technologies such as Blockchain work and what can be accomplished with them would only strengthen the lawyer-client relationship.

Moreover, if we look at Intelectual Property law (IP), for example, it would be a lot easier for lawyers to help clients work through infringement and licensing issues if they understand how all the different bits of copyrightable matter (including code) fit and work together.

“What I am sure of, is that lawyers increasingly need to understand the advances in technology and business model innovations that are altering the way in which the industry operates.”

Emma Walton-Moore, a Knowledge & Innovation Manager at Slaughter and May. (source)

“The more lawyers can engage with technology, the better for them and the better for their clients. Whether you can code or not, there are definitely advantages to being able to engage with technology and to speak on a somewhat technical plane – it opens up enormous opportunities for collaboration with technologists in a world where every discipline, including law, is becoming increasingly integrated into the digital space.”

Julia Salasky, a lawyer and a founder of the law tech startup CrowdJustice (taken from this article)
Getty: Royalty Free

3. Practicing law and coding require many shared qualities

People often think that coding requires Einstein-like intelligence and deep understanding of maths, however, neither is actually true. Although the use of basic maths is always useful, we are unlikely to require advanced university-level knowledge. Although certain tasks, i.e. deep learning, require more advanced math knowledge that may be beyond our abilities, we can always simply use a ‘library’, which is a pre-written code which we can import and implement into our code, including all the necessary functions we might not be able to personally think of. An example could be the SpaCy library, which can be used for natural language processing machine learning to teach our computer how to read legal texts. We may simply import it into our code without worrying about the complicated functions that happen in the background (although such understanding is vital when developing fully functional software products).

However, what is required are the following three skills, which lawyers or law students are most likely already familiar with:

  • A) Problem-solving and logic

Steve Jobs once made the following analogy between law and coding (0:44):

Everybody in this country should learn […] a computer language because it teaches you how to think. It is like going to the law school because it teaches you how to think in a certain way.

Rather than referring to just ‘thinking’, I would agree that both coding and studying law require a strong degree of problem-solving abilities. Similarly to the Issue, Rule, Application, and Conclusion (IRAC) problem-question methodology, coding requires a similar approach. We are aware of the issues, i.e. D’s potential liability for an offence, but first, we need to find the relevant authorities and apply them where fit. In coding, we are aware of the issues or tasks we aim to solve, but to do that we need to follow and apply the relevant syntax rules in order for our code to function well.

Another similarity could be found for example in contract drafting, which requires lawyers to foresee potential issues by incorporating solutions to the contracts (i.e. termination clauses, arbitration clauses) while ensuring that all information is correct (i.e. time frames). Coding requires the exact same foreseeability and attention to detail. When creating a program which includes the ability of users to register and login, we need to consider potential issues that might arise, i.e. when users attempt to create an account with a username that already exists, we need to prepare our code for situations like these.

  • B) Both use a very formal and strict language

Much like the strict legal language (or ‘legalese’), all programming languages have pre-defined technical and syntactical rules which need to be followed. Law students and lawyers have to use specific terms to build their way to the solution they have in mind while being as accurate as possible; they cannot afford to apply irrelevant authorities or incorrect terms. When coding, we also need to use the correct pre-defined functions so that our code runs as intended (i.e. considering whether we should use the ‘while loop’ or ‘do-while loop’ as illustrated below).

Moreover, according to the 2.12 §1 of the C++ programming language’s International Standard (which sounds surprisingly law-like), the semicolon (‘;’) is a so-called ‘punctuator’ which symbolises the termination of a sentence in the C/C++ programming language family. This lets the computer know that it has reached the end of a certain command (or a line). Similarly in law, we need to follow strict rules when referring to cases and statutes to not confuse the reader. We all must have made the mistake of mistakenly putting the case citation year inside round brackets instead of square brackets at least once.

  • C) Ability to research

Coding, much like law, is about the ability to find resources and answers to questions with the difference that most of the coding-related research can easily be done online. Much of your coding experience will revolve around asking yourself “why does this not work?” and “why is there an error?”, but luckily for us, pages such as are made just for that. You can ask any sort of coding or computer related question and chances are someone will respond within just a few minutes. Good questions and answers get ‘upvoted’ so that more people can see them (as in the image below). Additionally, you will be sometimes be required to refer to either youtube videos (which contain a surprisingly large number of coding resources) or official documentation by the developers of the programming languages in question.

Not all questions on stackoverflow are related to coding … (source)

4. Programming languages are becoming more simple and writing an useful piece of code can take just a few hours.

Some languages have a very complicated syntax, which inevitably leads to the increased time spent on writing the code. Languages such as Python, however, have easily understandable syntax with human-readable words. As an example, the two bits of code below are supposed to output, somewhere within our program, the same value “Hello, Lawyer!”.


print("Hello, Lawyer!")


#include <iostream>
using namespace std;
int main()
    cout << "Hello, Lawyer!";
    return 0; 

This shows that languages such as Python are more friendly towards those who have no experience with the syntax of programming languages. It is, however, important to note that the more complex a language usually is, the larger control we have over what it aims to achieve. This is not as important when we first dig into coding but definitely has to be considered when a serious piece of software is being developed. Different languages fit different purposes.

That being said, I often call Python the ‘lawyers’ Swiss knife’, as it is suited for a range of simple automation tasks, document classification and curation, or workflow management projects. With the large availability of Python resources and libraries (and the hundreds of thousands of Python-related questions on, creating a project for one’s personal or office needs is not as daunting as such an idea might seem.

As said above, lawyers and law students who most likely have some degree of problem-solving related skills will find the logic behind Python (and other programming languages) quite simple.

Some examples of the things you could do with Python:

  • • Curating, organising and summarizing legal documents with the use of Natural Language Processing libraries.
  • • Automatically structuring data and information for easier access in the future.
  • • Automatically organizing emails depending on their content and subjects.
  • • Creating automatic backups of the documents we work on.
  • • Sending summaries of the newest law-related articles from a website of our choice to your email every morning.

Additionally, languages like SQL, which are used to create and manage databases and navigate within them, also seem like a great choice for lawyers (SQL will be covered later on in the coding courses on TCL).

5. Firms care about their lawyers knowing how to code.

In recent years, more firms have launched in-house initiatives to teach coding to their lawyers. Slaughter & May, for example, has launched an ‘Innovation training programme’, aiming to equip some of the firm’s associates coding-related knowledge. Similarly, Clifford Chance has launched ‘Tech Academy’ to help its lawyers get to grips with coding and technologies such as blockchain and AI. Moreover, firms like Allen & Overy, Clifford Chance or Ashurst have launched so-called ‘lawtech training contracts’ aimed at those with a dual interest in both law and technology. As far as I am aware, firms like Herbert Smith Freehills also ask about the applicants coding abilities within their regular vacation scheme applications.

This further shows that law firms do indeed care more about their lawyers knowing about technology and coding, and I believe that knowing how to code to an extent, whether on a beginner or advanced level, will always be viewed by law firms as ‘attractive’.


To conclude, I think it is obvious that coding can be beneficial for lawyers for multiple reasons. The fact that the legaltech market in the UK is rapidly growing and that firms are willing to incorporate initiatives teaching their lawyers to code shows that firms started putting more emphasis on ‘coding’ and ‘technology’ related knowledge. Coding is also in many aspects no different from university law essays and exams, as they often require shared skills and qualities. I am also convinced that the higher the number of lawyers who know to code, the higher the contribution to the internal development within their firm; if you know how to code, you are more aware of what can be done.

4 thoughts on “Five reasons how lawyers and aspiring lawyers could benefit from learning how to code

  1. Reply
    Isham Souffi
    June 24, 2020 at 10:46 am

    As someone who has practiced programming for a few years, I am so glad that people are starting to understand the importance it and learning to think like a programmer. These are the sort of skills that differentiate you from other candidates. Thank you for having created this resource!

  2. Reply
    June 24, 2020 at 4:42 pm

    I recently started learning basic coding via the Py app on iOS. I’d definitely recommend it to anyone interested as I was surprised at how simple it was. I didn’t realise how usefulit may be to my future career in law but had decided to give it a go as a new challenge during this pandemic

    1. Reply
      Adam K. H.
      June 26, 2020 at 11:06 am

      I agree! The Py app is such a wonderful app for the fundamentals of Python. It is a great complement to coding on your computer.

  3. Reply
    June 26, 2020 at 9:43 am

    The three practices of law, coding and photography share great similarities: Framing a problem (or motive), decide what to show, apply formal rules to make your message understood.

    As a late law student, being able to use logic and a formal language has certainly given me a great advantage in my studies – as has creative writing.

Leave a Reply

Your email address will not be published. Required fields are marked *