End to End Testing

I come from the software development industry. I’ve often commented about how laws are like software written for people and the judge is like the main processor.

At any rate, one of the ways to validate that any time we make changes to the code of an application won’t break an existing feature, we write test cases, so if you break the tests, you have to fix the new code before you deploy it.

Bills, and laws and everything should have a similar approach. start with the bill of rights, make a test case of “US citizen is arrested by government employee for distributing fliers on university campus should not be punished” this test scenario is run thru every one of the amendments and they all return, “not punished” or whatever a better phrase would be for this. Now you have a test case that when you start adding other laws or bills or what ever, it can be certain that any new law won’t infringe on the rights of a person.

obviously there will be a lot more complexity and there will need to be a lot of converting the english language documents into parseable syntax a computer can understand. But once there is a way to validate new laws don’t supercede or decrease the effectiveness of another law/bill then any new law being proposed must also create its own test cases.

We can also take existing court cases heard by the supreme court and use those as a starting set of test scenarios.

I hope this makes sense and definitely needs some better language around it, but that’s the heart of the matter. better software thru testing.

2 Likes

Bravo man, bravo :clap:

Sad part is though that even in software, most developers don’t do this properly

So much code I’ve worked on doesn’t have proper E2E tests :rofl:

If even developers at a company like Google can’t figure this out, though, I don’t know that we could at a national scale :sweat_smile:

we do these things, not because they are easy, but because they are hard… that and any tests are better than no tests at all.

it would get better with each iteration. it should be open source so that any one can audit and create tests.

heck, it could be its own cottage industry at some point as well, of companies who create and maintain their own tests. I don’t know. but the point is that it would be beneficial.

2 Likes

I don’t agree that any tests is better than no tests at all :sweat_smile:

If you look at bloated bureaucracies, for example: they are meant to be “tests”, like getting a permit when you build a house

But when said tests fall apart, they end up being red tape that don’t actually prevent problems

At the same time, good tests (fully-automated that actually catch problems, i.e. good E2E tests), as you said, truly produce better “software”

But that’s the only way they have the desired outcome

Ah my fellow software nerds :smiley: Love you guys :grin:

The principles are sound (40 years in device and software design and test tell me so) but we need a practical method.

I’m not seeing how to apply this to bills and laws. Someone give me an example with a simple law to help me understand what you see and how this would work? Something specific, not theoretical, so I can see it work.