Somebody asked me this at lunch. I had gotten a pizza with olives, and was picking off the olives. I figured that would make a cute good interview question. So consider it a pop-quiz: why would somebody order a pizza with olives and then pick off the olives?
The simple answer is "because I don't like olives". That answers the question that was asked, but doesn't really provide any new information to the asker.
The question that was asked was not really the question they wanted answered. The real question would be "Why would you get a pizza with olives if you don't want olives?".
This is a good "theory meets reality" question. In theory, you order a pizza with only the toppings you want. In reality, our cafeteria has finite pizza selections and does not offer custom mix + match toppings. Astute observers noticed there were other toppings on my pizza (bbq chicken, specifically). So I ordered a (bbq chicken + olive pizza), and then picked off the olives.
So I picked the pizza from a finite set of options which I would be able to transform (via picking off toppings) to something good, and then proceeded to execute that transformation.
This has some takeaways that can all be applied to software development.
- Olives are evil.
- Sometimes there's a good reason for something that appears to be silly.
- Sometimes the question people ask isn't really the question they want answered.