Re:Do We Worship Complexity?
by bena on Tuesday October 16, 2018 @03:40PM
(#18232506)
Don't over-complicate the reason. ;)
It's quite possible he was trying to test something else and the answer you gave didn't give him a meaningful answer to that question.
So while your solution may have been fine, it's not something you're going to run into in production code. But that hierarchy+command pattern is probably used in a more appropriate situation. And he wanted to see if you could deal with the pattern itself.
Of course, I could be wrong. He could just be enamored with the overly complex solution because it's more "clever".
It's quite possible he was trying to test something else and the answer you gave didn't give him a meaningful answer to that question.
So while your solution may have been fine, it's not something you're going to run into in production code. But that hierarchy+command pattern is probably used in a more appropriate situation. And he wanted to see if you could deal with the pattern itself.
Of course, I could be wrong. He could just be enamored with the overly complex solution because it's more "clever".
Interviews are weird.