Reading Time: 6 minutes

As a lawyer who has recently started to learn to code, I meet the most diverse reactions when people realise this fact. I took part in a JavaScript workshop a few days ago, and my introducing myself as a lawyer created a bigger buzz than the pizza that was served at lunch break. People asked about the reasons for my doing it, and a huge debate started on the topic of whether law and coding are really so very different from one another. Of course, predictably, someone asked the question: “Should all lawyers have to learn to code from now on?” Well, I’m not saying I’ll give you the final answer here, but these conversations inspired me to put my thoughts out into the blogosphere.

How similar are coding and law?

Technically, coding and law aren’t so very different. As a matter of fact, one could say that coding is the law of the computer.

Computers follow rules, which are known as ‘syntax’ in code language. Similarly to the English language, where the word ‘syntax’ is used to describe some of the rules of grammar. For the most part, a code language works similarly to a spoken language: there is an order for the ‘words’ and ‘sentences’ that make up the language, and the fundamental concept is that rules govern the computer. By making an error with the rule, the outcome may not be the  desired one – and you end up with a ‘bug’, aka, a computer error. Most of the time, these errors are actually unpredictable (that is why we see frustrated programmers sitting at their desks trying to figure out why their code isn’t working).

In  law, coding similarly requires you to interpret rules and, in order to apply them, certain conditions must be met. From this, you may already be beginning to see how similar coding is to the legal profession, in a sense: apply the rules as they fit your circumstances, and hope that the outcome is in your favour.

In fact, there is another similarity that I encountered during my very first attempt at coding: it is mostly just logic, as indeed law is. Of course, you need to know the basic rules, but after that, all you really need to do is think logically, and you will most likely end up with the desired results. In this sense coding and legal thinking are not, in fact, so very different.

The benefits of learning to code

Learning to use code, or at least, learning the basics and being literate in a language or two will certainly bring  a number of benefits to anyone in the legal profession.

If nothing else, you may learn various skills that could be helpful in your professional capacity as a lawyer:

  1. An understanding of control flow: breaking down larger tasks into smaller bits of logic.

For example, while learning about if…else… statements and loops. This requires a specific logic and the need to focus on the smaller parts rather than the big picture. Such skills will prove to be extremely useful as automation tools increasingly enter the legal field and become more widely available and more powerful, taking over some of the classic legal tasks, transforming the industry and creating the need for different sets of skills (

see e.g. Neota Logic and Autto). Is learning to code the best or fastest way to gain expertise in the use of these tools? The answer is yes, it can be: learning and experimenting with basic Python will get you there.

  1. The ability to work with and understand data better – including training in the use of AI

A lot of law firms and legal departments are trying to work out how to better use their data for a variety of reasons, such as maximizing their efficiency, both in terms of time and cost, and they are experimenting with training and using AI powered tools. Consequently, that this skill could be extremely useful and a real advantage is a ‘no-brainer’. However, it is not as straightforward as it was in the previous point: learning to code will not immediately get you there in itself, but it is generally a prerequisite for university-level courses on the topic of data analytics and AI.

  1. A better understanding of security risks, leading to better data security practices

Who thinks cybersecurity is not important in the 21st century? If there is anyone who does, they should probably go back to school… The topic is probably more important now than it ever has been; and while you learn to code, you often also learn about servers, encryption, how the internet works, and much more. This, if you use the knowledge well, can lead to better security practices or a higher level of GDPR compliance services as you will better understand the specific vulnerabilities of different actions, for example, connecting to Wi-Fi. However, it is true that law firms have software and policies in place to provide a level of security, as a result this knowledge is not strictly necessary – still, no one can argue that it isn’t actually beneficial.

In addition to all the skills you can gain, knowing how to code is also a huge competitive advantage when trying to find a job, when selling yourselves to clients and when advising digital businesses.

Knowing how code functions, and how the development process is structured, will lead to a better understanding of the processes within software businesses, and that will help you see how their solutions work.

For me, personally, this is the principle reason why I started to learn coding: I want to understand in order to be able to ask my clients perfectly relevant questions, thus providing an even better, customized legal service.

The arguments against lawyers learning to code

It is, however, also true that there is a downside in all lawyers learning to code, since most lawyers may not actually professionally benefit from it. There is a simple explanation for this: coding in a clean, maintainable, re-usable, scalable and bug-free way is hard. There is a reason for it being a career in and of itself. Any attempt to learn to do it part-time, especially while trying to fit that in around a demanding job (which is not rare in the legal industry), is a recipe for failure.

Another argument against it is that it may waste valuable resources: when a lawyer is learning to code and trying to do it part-time, it will mean fewer billable hours and fewer clients – and that will simply  continue to spiral. So it is indeed difficult to make it work, and it won’t be for everyone.

In the end, it all depends on you

Whether you can or want to make it work depends on you. If you are extremely interested in learning how to code, go ahead! It will have benefits to your practice in law, as stated above. Furthermore, learning something new is one of the most fulfilling and uplifting experiences in the world, so why would you let anyone’s opinion stop you?

Whether you have a reason, or you are just simply enthusiastic, and you are able to fit it into your schedule, there is no reason for you not to try.

Will all lawyers need to know how to code in the future?

This big question remains unanswered, and the truth is that I personally believe not all lawyers need to or will learn how to code, at least not in the near future.

Indeed, the breed of lawyer-coder is not so rare anymore, increasing numbers of people cross over from one side to the other (mostly lawyers learning to code and leaving their original profession), not everyone needs the skills, at least not yet. The number of roles in the legal industry where a knowledge of  code is an advantage (if not a prerequisite) is increasing, such as legal engineering, legal innovation/operations, knowledge management and a variety of roles within legal technology companies themselves, but these roles cover only a segment of the legal market and the rest do not need to have an in-depth knowledge.

To sum up, I have to agree with Petra Sterling: While an advanced ability to code may not be necessary for lawyers, at least a proper understanding of the basics is essential.

Contact us!

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

For more information on how to set the preferences for cookies via your browser, refer to the following instructions:

Mozilla Firefox
Internet Explorer