Brandon's Blog

9/7/2014

Football and Code

Programming has elements similar to writing the rulebook for a sport.

Consider the penalty “Roughing the Passer.”  If an Average Joe wrote the rulebook, he would probably have called that penalty “Roughing the Quarterback.”  In fact, the Average Joe who asked for the penalty probably justified it by saying, “We need to protect the quarterback after they throw a pass.”

If they had written the penalty and its corresponding rule that way, wide receivers throwing a pass on a trick play would not have been similarly protected, nor would other players receiving a direct snap.

The “bug report” would have come in: “Why does it matter who’s throwing the pass?  We want to protect the passer!”

The “programmer” responds, “You said quarterback, not passer!”

I’m generally opposed to Pareto 8020’s, and programming is more 982, anyway.  98% of the effort to handle the 2% cases that nobody even thinks to specify because they “practically never happen.”