Codifying by catastrophe