Hacker News new | past | comments | ask | show | jobs | submit login
Law for Computer Scientists (2020) (pubpub.org)
107 points by jruohonen 9 months ago | hide | past | favorite | 53 comments



When I was studying CS, I had to take some courses outside of CS and I took law. It was pretty fascinating and I even thought once or twice of switching.

I now have the very nerdy perspective that law is the operating system our socially run on. Laws are small snippets of code similar to a predicate in Prolog. We apply them once the conditions are fulfilled.


When you include common-law and look at the broader cycle, I'd argue the legal system is more like a JIT optimization rather than source code: We formalize and streamline lots of existing implicit social rules and shared expectations, things that exist-before and can operate-without any formal legal text... Just not as well.

In other words, the relationship is more like recipes versus cooking. People cooked foods first-- possibly many many times--and then formalized them later with documentation and rules to help make an outcome transferable or fast.

However, it would be a mistake to think that just because recipes are ubiquitous, they are a prerequisite for the process.


thou nobody ever got put in jail because he defied the recipe


King Henry III disagrees [0], but arguably that's both.

[0] https://en.wikipedia.org/wiki/Assize_of_Bread_and_Ale


Lawyer here and even though I know just a little about programming, I also always think that laws, contracts etc are like code running on society. Only when people fight over it and go to court, you run it on a "computer" but we only can test it beforehand running on human imagination. I'm very excited about chatgpt and it's capabilities to finally have a test environment for clauses where we can ask of ambiguity of terms, cases we haven't considered in the law/agreement and contradictions within the document. If we could have an ide for lawyers, that would be great too.


Laws are less like program code than they are like declarative constraints. And society has to solve for how to operate within those constraints. That's what makes making good law so difficult; it's like prompt-engineering a model and only getting results back, for good or ill, years or decades later. And when you do make a mistake (which is often) it can take that long to fix it!


Program code can be declarative constraints. As said elsewhere in this thread, Prolog is an example of such a system.


Yeah except a jury votes on it and it's all up in the air whether all the predicates are actually enforced. Even the "predicates" themselves are open to interpretation and enforcement of a verdict is also sketchy. It's not even close to CS or an OS, more akin to the output of an LLM.

Which makes sense if you think about it.


The law can turn out to be different from what everyone thought. A higher court can reverse it. Even in the highest court, stating the definitive law, justices often dissent.

So the idea that the law actually exists, and we just have to find it, doesn't seem correct. Given that judges were usually barristers before, it's more like: one barrister confidently argues that the law has always been X, the opposing barrister confidently argies it's always been Y, the former-barrister confidently argues that it has always been Z - and that one always wins.


Btw, not all jurisdictions even care about precedence. So courts can't reverse anything.

(Though in practice precedence seems to have about equal value in common law and civil law jurisdictions. In common law, the court just has to nitpick enough to find a difference between the current case and the precedent, to argue why the latter should not apply. In civil law, courts routinely defer to precedence as a matter of convention and habit.)


Law is basically man made math. You have laws which can be seen as axioms and lawyers essentially use the existing axioms to prove to a judge a certain conclusion


Hehe, I felt this slightly a few times in the recent years.

Economy is also a large scale self adjusting optimizer, logistical neural network ?


> I now have the very nerdy perspective that law is the operating system our socially run on. Laws are small snippets of code similar to a predicate in Prolog. We apply them once the conditions are fulfilled.

That's a very government centric point of view.

Compare https://slatestarcodex.com/2017/03/16/book-review-seeing-lik...

See also the exokernel papers like https://pdos.csail.mit.edu/6.828/2008/readings/engler95exoke... or via https://en.wikipedia.org/wiki/Exokernel

Traditional operating systems try to help programs securely share resources, but also want to provide abstractions away from the raw hardware. An exokernel approach limits itself to just the secure multiplexing, and delegates abstractions to another mechanism much better suited for the task: user space libraries.

To close out the tangent: I wonder how you would bring this metaphor back to laws? I guess it would have something to do with Subsidiarity? https://en.wikipedia.org/wiki/Subsidiarity


This is "law" from an European (EU) perspective. The foundations differ in English and US law. I've always thought it would be interesting to compare them in the same way computer scientists compare the design choices in different operating systems. At the top level the same outcomes are desirable, but the lower levels and choices of abstractions are different.


The book covers both. I think you were too hasty to get this criticism posted to HN that you made an assumption about the book by its cover. The author is in the UK and this was published by Oxford, which are common law jurisdictions.

For example, I turned to a random part about copyright:

"In the continental European tradition, the focus has been on the author and the work. This understanding of ‘authors’ law’ built on the Age of Romanticism of the eighteenth and nineteenth centuries, where the singularity of creative im- agination of an individual author took precedence over the mundane business interests of a publisher. The idea was that ‘authors’ law’ is part of ‘natural law’ rather than being ‘posited’ by a legislator (positive law). The ‘authors’ right’, in that line of thinking, is constituted by the original act of creation of the author and should not be tied to formalities (such as registration), while the ‘work’ that is created belongs to the ‘author’s domain’. This is a matter of per- sonality rights (droit moral or moral right), rather than a matter of ownership (as Locke would have it).

In the common law that inspired the United Kingdom and the United States, the focus was not on the author and their work, but on the original and the copy. This was less a matter of personality and romantic imagination than a matter of pragmatism. Copyright was simply a choice made by a legislator (positive law), rather than a natural right inherent in the author’s act of cre- ation. This led to the requirement of registration and an emphasis on copy- right as an economic, not a moral right. Here, copyright law is about the domain of the ‘work’ rather than the domain of the ‘author’, and such work is considered original in the sense of not being copied, rather than original in the sense of being creative or novel"


What does that have to do with actual US copyright jurisprudence?


It's really hard to compare them. Just like it's hard to compare one country to another. So many factors.


The common way people think about common law versus civil law is this:

-common law depends more on courts to make and refine legal decisions -civil law relies more on regulators.

In civil law countries it's more common for the statutes (governing text) to be longer and go into great detail. In common law countries you see some extremely short laws - like the Sherman act in US Antitrust law is like 2 sentences long.

That's the common understanding. These days though both EU and US are converging a bit in their approach.


I do take your point, but the Sherman anti trust act is roughly a page to two pages long[0]

Only wanted to provide an accurate take, your overall point I agree with though

[0]: https://www.govinfo.gov/content/pkg/COMPS-3055/pdf/COMPS-305...


Thanks for the fact check. I'm writing on my phone so I can't do this justice, but the operative wording of the Sherman Act (or its followup the Clayton Act) is something like: "unfair restraint on trade is unlawful," or something like that. That's the one to two sentences I'm referring to. My point is that it's extremely limited phrasing. In the 100 years it has been in place there have been thousands or court decisions explaining what it means - and refining and defining what that sentence means in the US legal system.

If the act itself is only 2 pages that is a marvel, though. Usually they spend at least ten explaining why they are passing a law and who they are.


I wonder if this explains the propensity for lawsuits in the US. It's basically our regulation and enforcement mechanism.


Exactly. Yes. That's the idea.

The US legal system relies more on "ex post" legal enforcement - meaning, if you break the law then you get busted and you personally pay the victim. Europe is a more "ex ante" system - they rely on regulators to strictly define what the law should look like exactly and actually requires industry to do very specific things to comply with it. If someone gets hurt the system compensates them from a fund. The person who hurt them doesn't necessarily pay.

That's the theoretical underpinning and difference in our systems. But like I said the systems have a bit of both these days. Eu is flirting with more class actions, and US has more regulatory scrutiny in certain sectors, like California privacy laws for example being very detailed.


UK doesn't seem to have quite as much suing as the US? And they also have a common law system.

In contrast, German military procurement is famous for its endless lawsuits.


One different with UK is they use the 'English Rule' of fee-shifting. In English civil lawsuits, the losing party has to pay the attorneys fees of the other party.

In the US, there's basically no downside of suing someone if you can keep your own costs down.


That makes sense, thanks!


I'm not sure why you feel the need to double-quote that. At any rate, the book seems to cover UK law, and in fact is published at Oxford?


I'm not sure why you're attracting downvotes for correctly stating that the way law works in the UK is very different than the way it works in continental Europe. The UK is a common law country, like the US, while many EU nations use civil law systems.

The basic mechanisms of UK law are more similar to US law than to French law. The actual laws on the books are probably the other way around, though.


Does anyone know of any similar works that instead focus on a common law background (US/UK/others) vs civil law (EU/most of the world), that I am understanding this book focuses on?

This is a topic I am very interested in, but since I am from the US I would prefer to start with law as practiced here.

Edit: only skimmed and it seems this book may be both EU and UK focused. Seems to be funded by the EU European Research Council but published by Oxford?


> Seems to be funded by the EU European Research Council but published by Oxford?

Up until recently, the UK was part of the EU and researchers across the EU received grant funding from EU ERC for various research projects. Then something happened, I'm not quite sure what.


What are some of your basic questions about the legal system? Happy to take a shot at answering.


Try also, "The Legal Singularity" by two law professors from the University of Toronto

https://www.amazon.com/Legal-Singularity-Artificial-Intellig...


I'm a lawyer that works in tech. Anybody got questions for me?

I fine these primers almost always focus too much on technicalities and don't make the takeaways sufficiently obvious.


Why not write a blog then to fill in that gap?


Been thinking about it, but our industry is a service industry and we prefer to get paid to offer our expertise. If I go out on my own and find myself lacking clients, I might.


I hear you, but at the same time, you're addressing a community where we do a lot of free work. The world wouldn't run without the open source unpaid software that we build. I can't critique you for this choice, as it is quite reasonable. But I can say that such publication can help others (potentially a reward in itself) and can help drive customers to you, who recognize that more nuance is necessary than what can ever be expressed in a blog aimed at non-experts.



Fair enough. Thanks. But... When I offer to do this here no one takes me up on it! So maybe the world doesn't need my blog.


Maybe it is the phrasing. I think it might help if you followed a format like

Lawyer in tech here. I find these types of articles often disappointing because the focus on technicalities rather than the real takeaways. For example, the article points out <x> but the take away is <y> <insert explanation> <repeat 0-2 more times>. If anyone has additional questions I'd be happy to answer

I think this would generate more engagement. Personally, I have so little knowledge in this space I don't even know what a good question to ask is. I suspect that this is quite common but that it's unlikely to be admitted. You know how us CS people are, we spend a weekend hacking on something and declare domain expertise lol.


Great point. Thank you.


thanks for this post, I always feel a bit overwhelmed when it comes to licensing and other legal aspects of software development


I like your illustrations.


What about the opposite? Computer Science for lawyers?


Plenty of that; much more than the other way around, in fact, I assert. In any case, a highly recommended monograph easily grasped also by computer scientists and their students. The only major limitation is that the book is eurocentric, but that is probably unavoidable already due to length limitations.

EDIT: Get the whole copy (not everything seems to be on the website) from here:

https://www.cohubicol.com/assets/uploads/law_for_computer_sc...


The typical lawyer knows more about computers and programming, than a typical programmer knows about the law.

I think this is the case for most fields with respect to programming.


I am not so sure. Many of my day job colleagues struggle to use Excel, let alone code anything. By contrast there seem to be a lot of programmers who have a basic understanding of the law, at least as it applies to them.


I'm not sure about that. But I would say:

The typical programmer thinks they know far more about the law, than a typical lawyer thinks they know about programming.


What type of law and what type of programming? Everyone has to be aware of computers these days, but that doesn't make them know anything about programming. Meanwhile, in between traffic laws, financial laws (taxes, particularly), employment law, invention patent laws, maybe real estate/permitting laws, a programmer and any person in society needs to have some knowledge of the law to exist more than a lawyer needs to know about programming.


Generally, what the average programmer "knows" about the law is the equivalent to what the average lawyer "knows" about programming: the superficial, easy stuff that you can pick up without any actual training or effort.


Virtually every grown-up will interact with the law multiple times per day, especially traffic laws. Half the population has not written a single computer program in their life.


Virtually every grown-up will use a computer multiple times per day, even all day.

That is the same level of interaction as your example.


I didn't argue about "using a computer", only about "programming".

I agree that "using a computer" is an experience most people will have a similar exposure to as they have to legal matters.

"Programming" is more analogous to writing litigation documents or contracts, where formal errors tend to have very bad consequences.


What, exactly, are you basing this assumption on?


That doesn't match my experience.

But more importantly, there are areas of the law that require fairly comprehensive understanding of computer systems, both on the development, infrastructure and applications such as data science to properly understand. (Not understanding the tech makes it impossible to fully understand the law).

For instance, if an average lawyer tasked with ensuring that a company is in compliance with GDPR, and come across terminology such as "Data Protection by Design & Default" with further references to "Pseudonymization" and "Anonymization", will they even know how to start a review of the present situation in an organization for these topics?

My experience is that there is often a significant gap between where the understanding of the legal team ends and where the development and data science teams take responsibility that isn't covered by anyone.

The main problem is that legal coverage of data protection topics (such as [1]) often do not prescribe very specific specifications for how to be compliant. Instead, it requires people to use good judgement. Someone with a background in law will be used to this, but will usually not understand the technology well enough to have developed the kind of intuition needed to do so.

And when they sit down with a team of typical engineers, communication can get really difficult. The engineers tend to want very specific instructions on what to do, and many will not react well if confronted with the relatively loose (for an engineer) legal language.

Some will just ignore the parts they don't understand, while others will go to the other extreme and propose draconian measures that will at best be extremely costly. The latter group tends to be ignored by management.

In the end, many compliance initiatives end up with a lot of forms that serve as little more than window dressing, but where the hard bits that nobody really understand end up ignored.

To really achieve compliance, an organization will need people who are (in the same person) able to read legal texts with a lawyer's ability to interpret combined with the ability think like a black hat hacker trying to penetrate, a paranoid operations person terrified of data loss or a shady data scientist that keeps taking all sorts of shortcuts.

Few organizations have such lawyers available.

[1] https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-re...




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: