You may use an AI coding assistant in the machine-coding round. What do you still write yourself, and what do you ask it for?
Write the domain model, the interfaces and the code enforcing each invariant yourself, because the grader scores them and a mid-round change tests them. Hand the assistant bounded boilerplate such as records, an in-memory repository, a driver and test scaffolding, and review every line it returns.
Answer
Short answer
Own the design and delegate the typing. In a machine coding round with an AI coding assistant allowed, you still write the domain model, the interfaces and the code that enforces each business invariant, because that is what the grader scores and what a mid-round requirement change will test. Ask the assistant for bounded boilerplate: data classes, an in-memory repository, a command-line driver, parsing and test scaffolding. Then review every line it returns as if a colleague had sent it, and keep enough time for tests and the extension the interviewer will ask for.
Was this answer helpful?
Likely follow-ups
- The interviewer adds recurring bookings at minute seventy. Which of your files change, and which generated ones do you not touch?
- The assistant's repository class compiles but silently returns an empty list for unknown rooms. Is that a bug, and how did you find it?
- Would you show the interviewer your prompts? What would they learn from them?
- What do you do if the assistant keeps rewriting your interface when asked for an implementation?
Related questions
- Design a parking lot system — you have 90 minutes, working code at the end.hardAlso on machine-coding and object-oriented-design6 min
- Build a shared-expense tracker. Three people split a bill of ten pounds evenly - write the classes, and tell me where the missing penny goes.mediumAlso on machine-coding and invariants6 min
- Write a game where two players take turns and either of them can win. What do you model, and where does the win check belong?mediumAlso on machine-coding and object-oriented-design6 min
- Build an in-memory key-value store with per-key TTL, plus a snapshot operation that gives a consistent copy while writes keep coming in.hardAlso on machine-coding6 min