← Back to context

Comment by kstrauser

3 years ago

I think what I'd rather see is a standardize test suite format for laws that spells out the intentions.

Once I lived in a state that proposed a very simple anti-child porn law with good intent, but it was too simple. It read sort of like "anyone sending explicit pictures of minors from a cell phone will be guilty of conveying child porn". It was written in the proper legal jargon, but wasn't a whole lot more detailed than that. I called the sponsor of the bill and asked if that meant if my hypothetical daughter sent a naked picture of herself to her boyfriend, then wouldn't she be a felon under his new law? He had an "oh, crap, that's not what I meant!" reaction and ended up withdrawing the bill so it could be re-written. (Aside: I felt pretty good about that. Props to the legislator for being quick to understand and respond appropriately!)

Imagine if that were handled like program code, with a test like:

* This law does not apply to minors sending pictures of themselves.

That would do a few big things:

It would make legislators be clear about what they mean. "Oh, we'd never use this online child safety law to ban pro-trans content from the Internet!" "Great! Let's add that as a test case then." I confess that this is a deal breaker: politicians don't like being pinned down like that.

It would probably make it easier to write laws that reflect those intentions. "Hey, that law as written would apply to a 15 year old sexting her boyfriend! The code doesn't pass the tests."

Future courts could use that to evaluate a law's intent. "The wording says it applies to 15 year olds sending selfies, but the tests are explicit that it wasn't meant to. Not guilty."

I'm sure this couldn't happen for a hundred reasons, but I can dream.

I think for something like this to be effective, you need the actual intent encoded correctly (so this use case wouldn’t have been solved), and lawmakers acting in good faith (i.e., not drafting legislation that’s intentionally vague such that it can cast a wide net and force people to use the courts to dispute things).

  • You don't need those voting for the bill to act in good faith if you have as part of the system of passing bills that the opposition gets to write the (adversarial part of the) test suite. Then either that forces any loopholes (or other undesirable effects) to be: updated as explicitly intended (with bad publicity and potential for reversion upon a change of government); or taken into account and the bill updated to reflect that, or left in the test case for case law to cite as intended.

    Either way you really want intent to be encoded somehow.

  • Intent could be derived by parliament debates minutes.

    • Yeah, uhh, having seen some of the hearings in recent state legislatures regarding abortion, that’s some flawed thinking. Lawmakers are intentionally vague throughout the entire process sometimes.

99% of the work is in coming up with the edge cases, and in law the most common thing to do with edge cases is call them out explicitly. I imagine the legislator went back and added a clause to the law that specified "it shall not be considered a violation of this section for a minor to send photos of themselves".

Laws don't need to be computer-executable, they're about intent and the interpretation thereof, so the test suite itself is really part of the law and may as well just be embedded in it.

I partly like this idea in theory, but believe it is literally 100% impossible to come up with a better "test suite" than "the actual court system?"

  • The courts have to evaluate what they think the law's drafters meant: Yeah, it says this, but it's obvious the legislators didn't mean for it to be read that way. It'd be nice if there were footnotes that expounded on what the authors were trying to accomplish to help courts interpret the laws.

    • At least in the US, it's not the drafters' intent that matters, but the intent of the legislators who voted on it. (Legislators actually have lawmaking power. Drafters are usually unelected staff or even lobbyists.)

      When a statute is ambiguous, courts do sometimes look at the congressional record (eg floor debates) to determine intent.

      1 reply →

  • I don't want me or my male family members to be labelled sex-offenders whilst you "test" the "court system" to see if the laws work as intended. All because some overzealous prosecutor wanted to be "tough" on "toxic masculinity".

    • Oh, I mean, Black man here -- I 100% agree with you that there are serious and deep problems with how things are done now; I just have very little faith that any hypothetical nerd testing like we're talking about here will do much better.

  • If it was 'literally 100% impossible', you wouldn't need to believe it, you'd know it to be so.

    As for test suites and courts - the two are complementary so there's need to compare them to one another.

  • Yeah, there’s no way that a modern computer could outdo the logical accuracy and processing power of our 300 year old legal system. Court rooms and arguing and paperwork, much more efficient than silicon.

    • Trying to measure it for "logical accuracy" and using ideas like "processing power" so very deeply demonstrates how little you understand what actually is happening.

      1 reply →

    • Courts and lawyers are efficient at generating large pay checks for lawyers.

      They are horrible at everything else.

law tests would be good, though they probably have to be "evaled" via the same mechanism which would apply them. Meaning, courts :\

I personally would be happy if any country would attach rationale for the law to the law itself. And possibly some KPI to see if it works. So the law could be reevaluated later, to see if it works at all, or maybe counterproductive, or maybe some major actual application of the law is not why it was introduced.

It's great that your congressperson was enlightened enough to pull the bill. Some states (such as Minnesota) apparently actively prosecute children for sexting.

[1] https://www.aclu.org/news/juvenile-justice/minnesota-prosecu...

  • I was pleasantly surprised.

    Minnesota is so bizarrely, irrationally wrong on that one. That poor kid needs an adult to sit her down and explain why sending out nude pics as a minor is a really bad idea, not to label her as a sex offender. Now, if someone (especially an adult) received those pics and shared them, go ahead and charge that person.

Mindblown. I went to law school and now work as a developer but never thought about it. Writing tests for laws should totally be a thing.

  • > Writing tests for laws should totally be a thing.

    It is a thing already. In both the US and Germany it is common for lawmakers and regulators (e.g. the FCC which was here on HN to solicit comments a few days ago) to provide drafts of laws and regulations to interest groups so that these can raise issues they find.