Worse denormilization I ever heard
I was interviewing a guy for a new project with 7+ years experience. To start with I gave him a problem of representing a sales order in C# class. The candidate asked some more details about the Sales Order, so I explained like, I went to a shop and purchased Paste, tooth brush, etc, that means a sale order can have multiple items.
He tried for some time but couldn’t come up the class design. In my mind I already rejected him, to give him a feeling of some success, I asked him to design the table structure for the Sales Order. This is what he come up with.
|Column Name||Data Type|
He explained the design as well. If the user purchase Paste then the Quantity will go to the Paste column and like that. I wanted to see how extend he will go. I told him that my company have 100k products and how you will fit it in the above design. He answered, alter the table and add 100k columns to that table.
I interviewed so many persons in my career and never talked about the details to any one. But this one was the worse interview I ever had and thought of sharing it.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Let me know if you guys have any experience like this.