While I'm on the subject of applying software metaphors to legal code, here is a short article I recently wrote on the principle of least authority.
I go into issues of executive versus legislative power in the U.S. in more depth in Origins of the Non-Delegation Doctrine, with extensive commentary on this subject from both Federalists and Anti-Federalists. (As you may recall, the Federalists were the primary movers behind the original Constitution, and the anti-Federalists were the primary movers behind the Bill of Rights. The Constitution was ratified by most states conditional to a Bill of Rights, which was later pushed through Congress by anti-Federalists and compromising Federalists such as James Madison).
The paper also discusses further how protection of liberties was the prime motivation for the mechanisms such as checks and balances in the Constitution. As Locke said:
"[w]e agree to surrender some of our natural rights so that government can function to preserve the remainder. Absolute arbitrary power, or governing without settled standing laws, can neither of them consist with the ends of society and government, which men would not quit the freedom of the state of nature for, nor tie themselves up under, were it not to preserve their lives, liberties, and fortunes; and by stated rules of right and property to secure their peace and quiet."
 John Locke, The Second Treatise On Government XI:137 (1691).