> writing the laws becomes a bigger problem than writing the code itself.

Of course because at its limit programming is basically defining desired behaviour under all circumstances and logical conditions.