DEV Community

Cover image for Constitutions: code coverage & testing
Igor Pellegrini
Igor Pellegrini

Posted on

Constitutions: code coverage & testing

Most of the Western societies have been architected in the shape of Democracy.
This was fully intentional; and was based on the consciousness about the Brutal Spaghetti that the human race put in Production during a history full of Failed Projects.

Unluckily computers didn't exist at that time; so the lean minds among those who fought for Liberty came up with a genial idea:

"Friends, let's be Agile! We'll write the rules of our Manifesto for a better society... on paper!" ☝️

And that's how the Constitution came to life ✨📜

Constitution is law. And law is Code.

We tried to apply that code; but we didn't have much experience with the Stack, the timeline was tight, the Domain is quite complex, and *gosh* all those philosophical state machines.
Damn, if we only read that Blue Book parked in the library since years..

So the specifications are pretty good but the risk to make a mess again is high.
We rush to deliver according to the deadline, but the result is practically a Beta.
We end up too busy with Maintenance and we never take care of the missing implementations and of all those filthy bugs.

Decades later it's still like that.

The Constitution was a good Promise(); but we still await.


So what we do?

If Constitution is Code, then we have a whole field of professionals that could help with ensuring that our founding values are Stable.

For example,
what would be the impact of applying unit-testing & code coverage principles in our Govern Implementation?
What about Code Reviews?
How to ensure that also the more Complex Edge Cases are being added methodically and regularly?

The idea of Code Coverage is particularly interesting.
It was the inspiration for this article.

  • How much of our Constitution is still uncovered?
  • What are the Specifications that we never implemented and that are giving regular daily pain to our System?
  • Does anybody ever look at the Backlog?
  • Which are the Important Rules that we misunderstood or dismissed, and that need a major Refactor?

It's unlikely (and dangerous) to implement code that takes philosophical decisions; that'd be the Hard Part.
Then, what else can the Programmer Mindset bring to the table, code excluded?
What are The Good Parts?
Where, when and how can we Reuse them?

Software Developers are pretty good at solving problems, and there are political systems out there that could improve so much, if only this expertise in design & architecture would be shared with the political world, beyond the technical skills, to support the Development of a better & more Democratic Society.

Without Technical Debt. 🧐

Top comments (0)