Interview Question too Hard?
Hey everyone,
Long time lurker, first time poster. I'm a team lead with 8+ YoE and was conducting a few interviews yesterday for a Junior Developer role (mainly Python development). The role is meant to be a stepping stone for someone trying to get their foot in the door; I'm planning on spending a large amount of time with them to really ensure they succeed. Because of this, minor knowledge gaps aren't an issue...
I asked this question assuming it would be a pretty easy one that they could use to demonstrate their Python fundamentals, but all of my candidates bombed it, which makes me wonder if I'm asking too hard of a question.
Imagine you are designing a simple contact management system. Write two Python classes:
1. Contact, which holds information about an individual contact (name, phone number, and email).
• It should include a constructor (__init__) that initializes these attributes.
• It should have a method (e.g., update_phone) to change the phone number.
2. ContactBook, which stores multiple Contact objects.
• It should include a constructor that initializes an empty list of contacts.
• It should allow adding a new contact, but not allow duplicate contacts
• It should allow removing a contact by name.
• It should allow searching for a contact by name and returning the matching Contact (or None if not found).
After 3 people bombing this I'm starting to second guess myself. Am I crazy or should this absolutely be tenable for a beginner?
Thanks!
Edit: Tried to use a throwaway, forgot about karma requirements.