

Government Programs? - coecoventures

At present the US Code of Federal Regulations is perhaps the buggiest code ever written. The CFR has yet do deal with issues of legacy code and has probably never been refactored. Ever. There are numerous conflicts within the code that lead to the legal equivalent of a SigAbrt, without the benefit of an error log. The return values also vary wildly and, in many instances, are in direct conflict with the intended results of the various classes and methods within the code base.<p>If you, as a coder, were handed the CFR to debug and refactor, how would you do it? Also, could you create unit tests to verify the algorithms are producing the desired return values within the framework of that much legacy code?
======
mchannon
Unfortunately the CFR (like most sausage) is the result of compromise, and
what people often fail to take into account is that the code won't compile on
purpose.

In our case the compiler itself is a living, breathing entity that gets fed
not by every successful completion but by every error that comes up. The
system favors its own flaws. Certain people like loopholes and legal delays.

Worse yet, the boundary conditions are changing. We want the program we call
government to do different things as the decades go by. A government
regulation that compiles today may not compile in 20 years because of
technological or social changes.

In the end, we have judges and politicians to do the refactoring. As
untrustworthy as those can be, they beat any other system I've heard of, even
a computocracy.

