Canonical essay on this sort of technique: https://www.joelonsoftware.com/2005/05/11/making-wrong-code-...