Americans spend more on legal fees than any other country in the world. In the United States, legal costs — the price of resolving disputes — made up around 2.3 percent of the entire economy, totaling approximately $429 billion just five years ago. 

Source: Institute for Legal Reform (2018), a program of the U.S. Chamber of Commerce

But the high price of justice isnt an abstract economic concept. A recent study found that small businesses pay more than half of the total commercial liability costs in the tort system. On average, someone filing for bankruptcy spends $3,000 in court and legal fees. A standard divorce will cost $12,000. And complicated business disagreements can run into the millions. Legal costs are so far out of reach for many American families that dedicated crowdfunding websites are popping up just to help fund legal expenses. 

In civil cases — disputes between private individuals and corporations — the right to free representation doesn’t exist at all, though consumers have the ability to represent themselves. In reality, only the rich can afford high-priced lawyers — attorneys from top firms can charge $1,500 per hour — which means that those with resources are often able to shape the result in their favor. A study by the U.S. Government Accountability Office, for example, found that people who hired an attorney to help them with disability benefits cases were three times more likely to be successful than people who did not.  

As an engineer, I have always hoped that the law would behave more like society’s operating system. In a perfect world, legal codes should be objective and accessible. By moving the justice system to a software-first approach, we can improve transparency, automate tedious processes, and in some cases, even avoid the need for expensive lawyers altogether. 

In a world where over 80 percent of low-income individuals cannot afford legal assistance, technology can level the playing field and scale existing legal expertise to everyone.

A brief history of lawyerly protectionism

In the 13th century, King Edward I wanted to create a new class of individuals that had the privilege of representing cases in the Royal Courts of England. So he enacted a 1292 statute, the first of its kind, that gave the Lord Chief Justice the responsibility to appoint a certain number of “attorneys and lawyers of the best, and that those chosen only and no other, should practice.” More than 700 years later, such limitations on who can practice law remain. Edward would be proud of California Business and Professions Code 6125 (2020), which punishes non-lawyers with up to one year in county jail if they dare represent someone in a courtroom. 

In contrast to these rules, the internet has created a world where knowledge is free-flowing and accessible. I learned to program using YouTube; there are countless sites that help people borrow and build on existing code. 

The first step in overhauling the legal system is using software to scale the expertise of the limited number of lawyers. The form required to claim asylum status, for instance, poses a simple question: “Are you fluent in English?” When a refugee fills out the form, they may be inclined to say “yes” because they are worried that “no” is a negative answer, or because they are able to hold a basic conversation in English. If an immigrant says that they are fluent, they could be giving up their right to an interpreter in court, something it’s unlikely anyone other than a lawyer would know. In this case, technology provided by the immigration court could warn the refugee about the hidden meaning behind a “yes” answer, automatically localized to their language. By intaking information and explaining questions, software can not only save time in filling out the form itself, but can replicate the “insider expertise” of a lawyer explaining a form an unlimited number of times. That’s just one of the many advantages of software: infinite replicability. 

The form required to claim asylum status poses a simple question: “Are you fluent in English?” Software could not only save time in filling out the form itself, but could replicate the “insider expertise” of a lawyer.

An information problem

In the past decade, with the advent of more accessible software for publishing open source, we’ve seen the laws of entire countries (Germany, for instance) be uploaded online. But in 2021 in the United States, residents of some states are not even able to review a copy of the law without paying a corporation. In Georgia, the full set of official laws costs $1,207.02 because, Georgia’s Code Revision Commission claims, their annotations are copyrighted and owned by the state. When the technologist and public domain advocate Carl Malamud bought a copy and published it online for free, the state sued for copyright violations. (The Supreme Court intervened last year; the case was eventually dropped.) Still, many laws, annotations, and filings remain behind a paywall; it costs 10 cents a page to access PACER, the system that holds federal court records.

The lack of access to information is not just a cost problem. To this day, many veterans who served before 1960 have trouble proving that they did so because a fire swept through the National Personnel Record Center in 1973, destroying 80 percent of the physical records there. At least the expensive PACER system is digital.

So where does software come in? To build any worthwhile piece of software, engineers need to connect with other, often external, applications using APIs. To check the weather on my smartphone, for example, an app ultimately connects to the satellites actually recording the weather. Thus, only when the legal system opens up in this way will it be possible to innovate. I learned this firsthand when tracking Washington, D.C., parking codes. I was pleasantly surprised that D.C. hosts the source of “truth” for their laws on Github; if a law changes, a piece of code (connected to the repo via a web-hook) immediately notifies me. When a resident noticed a confusing typo in 2018, he submitted a pull request to the City Council, which agreed and merged the changes. Another advantage of software when it comes to literal law as code is this ability to publicly publish and update information — a stark contrast to publishing on paper.

In practice, lawmakers have little time to review thousands of pages of laws before they are voted on; they only had a few hours to review the first COVID relief bill, for example, which numbered 5,593 pages. If all laws could be discussed and changed with a pull request, it could allow the public to assist officials in discovering loopholes and special interests. Such modern “legal repositories” might level the playing field by allowing the public to review laws before they are voted on, rather than restricting them to a select group of individuals. 

Technology building blocks for a new system 

These examples of software applied to legal code would have immediate and far-reaching incremental benefits. But they also represent the building blocks to automate legal decisions, skipping the courtroom entirely. 

In fact, undisputed legal cases lend themselves well to this type of automation. Credit card companies are already using automated decisions to resolve disputes between cardholders and merchants. When a Visa cardholder disputes a transaction that has already been refunded, the system will automatically close the case. The same tools could work well in small claims court.

To give one example, around a quarter of security deposits go unreturned. Worse still, many landlords do not provide a reason for withholding the money — former tenants often don’t have the resources (or time) to take them to court. Converting state security laws to digital code could have an enormous benefit. In this case, any tenant could fill out an online form that sends the landlord an email, asking him or her to provide the reason for withholding the security deposit. Separately, the landlord could connect to financial APIs to prove that the security deposit was refunded. If the landlord didn’t respond, the court’s decision would be coded to automatically issue a judgement in favor of the tenant. If they did respond, it would go to an online judge. This hypothetical process poses an ideal resolution: no judges, lawyers or physical courtrooms would be involved for an uncontested case. The decision would be recorded on a public ledger. And a major source of disputes in the court system (“security deposit ghosting”) would be resolved. 

Over time, such automatic decisions can be extended to the vast array of uncontested disputes that involve jumping through bureaucratic hoops to accomplish something. Divorces, planning applications, traffic appeals, and myriad other processes have the potential to be automated. 

Of course, introducing technology into any system has the potential to worsen or stall progress if not done properly. Filing taxes is a great example. It is unfortunate that the IRS has not introduced an online system for calculating taxes online, such as the system in place in the United Kingdom. (Perhaps America’s lack of progress in creating such a system can be partially explained by the more than $5 million that online tax preparation companies spend each year in lobbying.) As a result, the technology solution has to be sufficiently spread around to ensure that no single institution has the power to entrench its interests. One way to accomplish this would be making the codified justice system open source at a state level, so that individual cities and court systems can adapt it according to their needs.

Technical debt is an even bigger issue. Today’s cutting-edge technology may get stuck in the systems of the future. New York’s online unemployment benefits application, created in the 1960s, was unable to handle the pressure of a 20 percent unemployment rate during the COVID pandemic. The Ohio unemployment website was reportedly only able to handle three people at a time. And the federal government only discontinued the use of floppy disks in 2016, decades after their use was already declining and even obsolete. 

There are many solutions that have been proposed to address these issues — from requiring lawyers and lawmakers to be proficient in technology through certifications, testing, and more to enacting government initiatives to improve software development and procurement — but the fact remains that we are woefully behind in digitizing what, in many ways, is already a form of code. 

* * *

Ultimately, it is unlikely that district courts will fully give up their authority to APIs. But a software-first approach doesn’t have to be all or nothing. For the first time, the ability to use Zoom for court hearings became mandatory in many jurisdictions last year. The permission to use e-signatures on dozens of IRS forms, at least temporarily, has saved countless hours of time. And lawyers are switching from paper filing cabinets to the cloud in greater numbers than ever

While tech is unlikely to completely overtake the justice system, automating minor or uncontested cases could free up the (indisputably backlogged) existing system to actually do what it does best — and focus on the parts only humans, not machines, can do.

The introduction of software into any industry is frequently met with fear-mongering from lawmakers who don’t understand its benefits. But the legal system — as well as the countless people and businesses of all sizes affected by its shortcomings — needs us to double down. By embracing software and dismantling information silos, we can reshape the legal process into a more scalable, transparent, and equitable system — a system that truly works for all, as opposed to an outdated relic that is too often opaque, costly, or discriminatory.