US Constitution: A great example of poor requirements

Developing software requires a software developer to know what he should be developing. This is usually communicated to the developer using a specification that describes a desired feature. The specification will contain many requirements of the software. The requirements may be explicitly stated in the document or may need to be inferred from reading the specification.

Writing good requirements is not as easy as one might think.
For example, let's say a software system is being developed that will manage recipes. After the first meeting to discuss the software specification, the following requirements are identified :
  1. The software shall have a simple user interface to enter recipes.
  2. The software shall make it easy to find recipes.
  3. The software shall not support optical character recognition for converting scanned recipes to text.
These requirements may seem simple enough but let's examine each one to see if the software developer will be able to develop the software to meet the stated requirement.

The software shall have a simple user interface to enter recipes. This seems fairly straight forward, right? Users aren't going to use the software if it is not easy to type in the recipes. So is there anything wrong with this requirement? Well...yes. Who determines if the user interface is "simple"? How will the developer know that he has developed a simple user interface? This requirement is ambiguous since there could be many opinions on what constitutes a simple user interface. It is also not verifiable. When the software gets delivered to the test group how is the test group going to verify that this requirement has been fulfilled?

How should this requirement be fixed? The specification should describe how recipes are entered. Simplicity is designed into the system by describing a simple user interface. Once the user interface is specified then maybe the following requirement is identified: The software shall contain a text box for entering a recipe where up to 2000 characters can be entered. This is a requirement that can be tested and verified.

The software shall make it easy to find recipes. Again, this requirement is ambiguous and unverifiable. Once the actual user operations are specified then the following specific requirement may be identified: The software shall have a single text box where the user can enter text where all existing recipes will be searched to see if they contain the matching text. This requirement is verifiable and can be tested.

The software shall not support optical character recognition for converting scanned recipes to text. It was decided that optical character recognition (OCR) would not be supported in the first release of the software. This requirement was written as a result of that discussion. How is the test group going to test this requirement? Specifically, how is QA going to test that a feature does not exist in the software? Also, there are an infinite number of things the software will not do. For instance, the software will not solve world hunger, it will not make people breakfast, etc.. This illustrates another characteristic of a good requirement: it should state positively what the software is required to do.

In summary, requirements should at least have the following characteristics:
  1. Unambiguous - Almost anyone reading the requirement should agree to what the requirement means.
  2. Verifiable - Someone should be able to verify that the software actually fulfills the stated requirement.
  3. Stated in the positive - Requirements should always specify what the software should do - not what it shouldn't do.
Knowing the characteristics of good requirements, let's examine a few areas of the US Constitution to see how well it specifies the behavior of the US government. The two most cited clauses will be examined - the welfare clause and the commerce clause.

The first article under Section 8 - Powers of Congress:
The Congress shall have Power To lay and collect Taxes, Duties, Imposts and Excises, to pay the Debts and provide for the common Defence and general Welfare of the United States; but all Duties, Imposts and Excises shall be uniform throughout the United States;
How does one measure the "...general Welfare of the United States"? How would that requirement be verified? This fails as a valid requirement due to its ambiguity. This requirement is also unverifiable - how do you determine that government action is improving the "general welfare" of the citizens? The only way the government can accomplish anything is through taxation which is the process of stealing money from some identified group of people and giving the money to another group of people. The people paying taxes would probably agree that their "general welfare" has been diminished by this action. This makes it impossible for the government to improve the "general welfare" of all citizens.

The third article under Section 8:
To regulate Commerce with foreign Nations, and among the several States, and with the Indian Tribes;
Again - what does it mean to "regulate Commerce"? Could most citizens draw the same conclusion regarding what the government is allowed to do under this provision? I don't think so. Roscoe Filburn grew wheat on his own farm to feed to his own chickens. During the Great Depression, the US government had imposed limits on how much wheat farmers could produce in an effort to maintain elevated crop prices. Mr. Filburn had exceeded the quota but was not selling any of the "excess" wheat on the market - he was using all of it to feed his own livestock. The US Supreme Court ruled that the US government had the power, under the commerce clause, to limit Mr. Filburn's wheat output. How many people would interpret the commerce clause in this manner?

These two clauses - the general welfare clause and the commerce clause - along with the "necessary and proper" clause can be used (and have been used) to justify almost any action by the federal government. The limits of these clauses have yet to be found. I would argue that there are no limits due to the indeterminate nature of these clauses.

The Bill of Rights are the first 10 amendments to the US Constitution. They are frequently cited as a way to limit the power of the federal government. The first two amendments read:
1st Amendment: Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.

2nd Amendment: A well regulated Militia being necessary to the security of a free State, the right of the people to keep and bear arms shall not be infringed.
Notice how these amendments specify what the government is NOT allowed to do. In our recipe example above it was realized that there are an infinite number of things the software will not do. We cannot possible specify them all. The same goes for requirements for the government. The Bill of Rights attempts to limit the government by specifying things the government is not allowed to do. Again, there are infinite number of items that could be specified detailing what the government should not be allowed to do. The Bill of Rights were an expansion of government power - not a restriction. The Bill of Rights are very explicit in exactly stating a few restrictions on government. To truly restrict government power, the Bill of Rights would have explicitly stated, very clearly, only the permissible actions of government.

I'm still not advocating for a constitutional government. Even if the constitution had clear, verifiable, positively stated requirements, history has shown the government would be violating those requirements before the ink was even dry.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.