Law & Technology Column

Code is Beautiful

In this Preface to the Law & Technology column by The Leaflet, Justice (Retd.) Gautam Patel reflects on what binds law and codes, whether law itself is code, and why archaic courtroom practices have long lagged behind the rapid technological change.

Justice Gautam S. Patel (Retd.)

THERE ARE FOUR-LETTER WORDS and there are four-letter words; and despite the common proclivity to deploy the more commonly associated ones to inevitable frustrations with both law and technology, there is still one word, common to both fields, that exemplifies the best of each: ‘Code’. Consider this: programmers write code; lines and lines of it. And the law frequently uses the phrase ‘a complete code in itself’. What does this mean, and why should it concern us?

For a subject as vast as ‘technology and the law’, it is easy—and facile—to fall into the trap of thinking only about computers, the internet and yes, that 800 tonne monster in the room, ‘artificial intelligence’. But ‘technology’ has implications that are far more profound.

Consider the parallels. At its heart, law when codified—that word again—is nothing but a set of instructions: dos, don’ts, consequences, instructions, and directions. All law has always been like this, throughout recorded human history. Every sacred text has this from the Bible to the Qur’an and the Bhagavad Gita. What are the Ten Commandments if not a set of directions and commands? Humankind has been coding for millennia. Our earliest codes followed patterns and rhythms that are still in use today in both law and technology. There are defined structures, now so familiar we barely pay them any heed. The purposes are actually identical: orderliness, predictability of outcomes, certainty—at least in theory.

Legal code regulates society and societal structures while programming code controls how computers and networks function. Both have very similar structural typologies. At the most basic level, for instance, programmers know of if-then-else-end command lines: if x happens, then perform y, else do z. There are many such: while/wend loops say that while a particular statement exists, the program should loop through another set of instructions. This is not very different from the codification we see in law; it is only expressed differently. The Income Tax Act, for instance, is a very good example of a highly complex set of what are essentially binary instructions and consequences. Most fiscal statutes are like this. Codification, wherever it exists, strives for the clarity of a binary result – yes/no, zero/one.

For a subject as vast as ‘technology and the law’, it is easy—and facile—to fall into the trap of thinking only about computers, the internet and yes, that 800 tonne monster in the room, ‘artificial intelligence’.

How I saw technology change the world of law

I had my first brush with coding long before I began studying law. Just out of school, my father, a structural engineer and urban planner who had taught himself coding for a BEST route study using the mammoth computing machines at Tata Institute of Fundamental Research, the kind that had punch cards, allowed me and some of my friends to play around with a computing device his office had just bought. It had a long table with a small monitor at one end, and by today’s standards, was utterly rudimentary. Using early coding software (BASIC), we experimented with writing code for random number generators and other equally useless things. Later, he bought a small computer called a Sinclair from England. 

When I joined law school and started interning with a solicitor, back in the 1980s, there was neither hide nor hair of anything remotely resembling a computer. Part of our work was to assemble stacks of papers with carbon paper interleaves for the near-manic typist. Perched on a high stool with a massive typewriter before him, this redoubtable gent hammered out page after page, his left hand swiping at the carriage return, deftly rolling new stacks for each page. “One plus four,” or, if you wanted to be mean, “one plus eight,” just to ensure that the eighth respondent got a carbon copy with print that looked like tiny goat droppings, and one couldn’t tell an ‘e’ from an ‘o’. Sometimes, just for fun, we cyclostyled

And then BPL, now an all but forgotten corporation, came out with a device called a Micromate. It had a massive eight-inch screen (measured diagonally) and, wonder of wonders, it had something called a word processor: Wordstar, it was called. And there was, to match it, a noisy little dot matrix printer that spewed out fanfold sheets. Our steno was in panic mode at first, but then quickly got the hang of it. He took a while to adjust to the fact that words wrapped automatically to the next line; at the end of each, he would lift his left hand and swipe—as he was used to doing with his trusty typewriter. The printer changed to something called an IBM ‘daisy wheel’ which gave us smarter looking print outs.

The arrival of computers in law was an early inflexion point. Most students and interns will think of this as some bizarre period that belongs in the Jurassic era and I dare say there are many today who have never even seen a typewriter or any of those gizmos we had then. Laptops, iPads, tablets, smart phones—all those were well into the future. We had to use the Superman type telephone booths in the High Court law library (or go back and forth many times a day), and we had no soft copies, internet or even pen drives. The computers we began to get had floppy disks.

Still, it was a certain type of progress.

Computers and peripherals got more sophisticated in a relatively short time, but they were still hideously expensive. When I started my law practice, I had to take out a loan to get a Deskjet printer, and the computer monitors were the size of ice boxes.

The cut-and-paste facility allowed a much faster output, but it also reduced the intellectual engagement with the case; and, sure enough, speed of turnover soon began to eclipse quality.

And then, the internet changed everything

And this is where law and technology diverged. While the law followed its achingly glacial pace of change, technology was racing well ahead. Many law offices and practitioners acquired computers, but for the most part, these were being used for word processing, just glorified typewriters. Not even a fraction of their capabilities was being explored. The networked systems that we know today were to come much later. Even worse, few realized a fundamental potential of computing and technology in law: of automating routine and repetitive tasks. I remember that in those early days many of us juniors were routinely briefed to draft plaints in ‘bank suits’. This was well before the days of dedicated tribunals. The plaints all followed a defined structure and pattern, and the factual variations only needed to be plugged in. Using early software, I was able to write code that quite literally issued a series of prompts for the factual aspects and then generated a perfectly serviceable standard-form plaint.

Standardization and automation were at once a boon and a curse. The cut-and-paste facility allowed a much faster output, but it also reduced the intellectual engagement with the case; and, sure enough, speed of turnover soon began to eclipse quality, sometimes with utterly disastrous consequences. This problem exacerbated in the years that followed, and new systems had to be designed to prevent such errors; not always successfully. I remember, as a judge, once being handed an affidavit that was affirmed—but still in track mode with comments like ‘[check with client]’.

Courts have remained frozen in a decades old time warp

The internet – and I mean the commercial and widescale proliferation of it, allowing linking of systems across geographical boundaries and, in time, offsite data storage – changed everything, and profoundly so. A part of this was the sheer speed at which data could be moved around from distant locations without needing intervening media (physical storage devices). 

It changed the face of the practice of law. For the first time, real-time collaborations on documents across time zones and boundaries became possible. People could even meet and speak online. Law firms and practitioners were quick to adapt and start deploying tools.

Courts, however, remained frozen in a decades old time warp. It was not until the second major seismic shift, the inflexion point of Covid, that courts found that there was, in fact, a viable alternative to physical appearances. For a time, it seemed, the Indian judiciary had grabbed the opportunity this crisis somewhat perversely afforded to embark on a process not just of transformation, but whole reinvention: digitized documents, the use in courts of tablets and smart devices that could hold huge amounts of data, the unimaginable expansion of access to courts from the remotest parts of the country. During Covid, as people migrated, lawyers called in from the remotest locations: one from Gujarat, motorcycling to Bhuj to take instructions, another from a distant part of Andhra, each asking me for no more than a couple of days—an incredibly short time by previous standards, when they would each have had to seek months.

Plan B, it seemed, was a whole lot better than the musty, dusty, creaky Plan A.

Till it wasn’t.

We have paid no heed at all to the essence of technology or to the fundamentals of code and have, instead, slapped on the gloss to very little effect. 

A head on collision 

With the wonders of the internet came its darker side, and the judiciary was always a soft target. Not just hacks into systems (a whole court website being hijacked), but things more sinister: clandestine recording of online court proceedings, the public dissemination of selective clips of virtual hearings, distorting implications and meanings, and more. I have always been opposed to ‘live-streaming’ of court proceedings (more on that another time perhaps), as opposed to virtual access—too often these are conflated even by those who know better. 

Live streaming boils down to law as entertainment. There is no cogent argument that marries it to ‘access to justice’, which virtual hearings do achieve. But even there, the portcullises of the Indian judiciary’s fortresses came slamming down as court after court began needlessly compromising on the essence of virtual hearings: lawyers admitted only when the matter is called, admission to the hearing in the hand of some clerk of the court, subpar infrastructure and more. Where we should have built a robust uniform easily accessible system, we now have divergent systems and disparate practices. There is simply no logic to restricting online access like this; courts cannot, generally, restrict physical access (nor should they) so there is no reason for this opacity and complexity in online systems. Nothing impedes access to justice as much as unwarranted judicial paranoia; again, more on this some other time perhaps.

And then, of course, there is AI, the dimly understood, much maligned technological beast that, we fear, will hijack the functions of lawyers and judges and render them all redundant. Not so, as future columns here will I hope show. 

What we have seen here is a head-on collision between archaic practices in the courtroom and massive technological advancements unlike anything any of us who’ve been around in law since the 1980s or earlier could ever have imagined. And it is an absolute train wreck. We have paid no heed at all to the essence of technology or to the fundamentals of code and have, instead, slapped on the gloss to very little effect. 

There are many areas where a blind application of technology runs up against vitally important legal protection. One of the most obvious is the matter of privacy. Court after court has had difficulty in masking, anonymizing and protecting hyper-sensitive personally identifiable data. This is particularly critical in criminal matters involving assaults on women and children, POSH cases, and matrimonial matters. In the days of paper and analog, records could be sealed and ordered not to be unsealed without an order of a court. Any unsealing order proceeded cautiously, restricting access. This has become a nightmare in the digital world. 

In one case that came before a Division Bench of which I was a member, a young man in his late teens, asked that we find a way to mask or restrict access to the digital records of his parents’ matrimonial dispute—one that had gone on from the time he was about four years old. He was, he said, subjected to vicious gossip, taunting and opprobrium stemming from the allegations his parents had made against each other—all matters of a digital record, easily accessible and widely disseminated. In another case, a juvenile once in conflict with the law asked for his records to be sealed; he could not, he said, pass a single background check when he applied for a job. Does the new Digital Personal Data Protection Act apply to the judicial system? How would it work?

Aadhaar—and biometrics generally—that are linked to government subsidies, pensions, and assured payments are another source of worry. Recent reports from the field suggest that several lakhs of people spread across at least five states have had their bank accounts blocked and their monthly pay-ins rendered inaccessible because there is an apparent mismatch between records making mandatory KYC confirmations impossible. The problem is exacerbated when these persons, often the poorest among us, have no access to a rectification help centre nearby. Travelling long distances to sort this out means, immediately, a loss of earning. Where is the law’s protection when the very technology meant to assure fairness, equality and a right to livelihood is so badly mangled?

The list of issues is very long indeed. We could talk about how AI is trampling personal rights and privacy, the difficulty in shielding children, pure commercial losses due to digital invasions and more. To be sure, there are many plus points, the access to extensive data about the judiciary being perhaps the foremost of these, but these must be set against not only inherent perils but also the manipulation of technology to affect fundamental rights (internet shutdowns and free speech for instance).

These and other issues will, no doubt, receive deeper analysis in the time ahead at this dedicated space at The Leaflet.