From the rule of law to the rule of code and back