Code Smell of the Day: Type Keys
Note: On the back of some feedback I’ve created a follow-up of this post where I refine the thesis. I’ve left this post as-is for the sake of comparison
Note: On the back of some feedback I’ve created a follow-up of this post where I refine the thesis. I’ve left this post as-is for the sake of comparison
Say we have a function which creates a user, and handles some specific setup depending on whether that user is an admin or a customer: