Question 3 of 8Owner.java · lines 45, 48
Owner loads its pets eagerly, and Pet does the same with its visits.
What queries run when you list a page of 20 owners — and how would you fix it?
Paste a GitHub repo and get interviewed on the code you wrote.
RepoViva finds the lines behind each topic, asks about them, and grades what you say.
@Entity
@Table(name = "owners")
public class Owner extends Person {
@Column(name = "address")
private String address;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "owner_id")
@OrderBy("name")
private List<Pet> pets = new ArrayList<>();
public List<Pet> getPets() {
return this.pets;
}
Question 3 of 8Owner.java · lines 45, 48
Owner loads its pets eagerly, and Pet does the same with its visits.
What queries run when you list a page of 20 owners — and how would you fix it?
Your answer
One query for the owners, then one per owner for their pets — 21 in total. I'd switch it to lazy loading.
Good Spotted the N+1 and counted it right.
Missing Each pet's visits add more queries, and lazy loading alone just moves the N+1 — a fetch join fixes it.
From a GitHub link to a scored interview in four steps. Nothing to install, and nothing to set up.
RepoViva maps your stack and finds the files behind each part of it. Those files are what your questions are built from.
Choose a length and, if you like, the topics to focus on. Each topic starts with your code, then follows up on why you built it that way.
Each question shows the files it's about. Answer the way you would in the room, and grading happens while you keep going.
Seven skills, scored separately. Topics under 75 become weak areas, and one click starts practice on exactly those.
Generic interview prep asks about textbook topics. RepoViva asks about the decisions in your repo.
Every question points at the files it came from, so you practice explaining what you actually built.
Knowing the facts and explaining the tradeoffs are different skills. You see each one on its own, so a strong score can't hide a weak one.
Not just numbers. The report says what you explained well and what to strengthen next, skill by skill.
One click turns your weak areas into a new interview on exactly those topics, so every round is about what you still need.
Source files are read to write the questions, never stored. Remove a project and everything tied to it goes with it.
Your submitted answers are saved. Close the tab and come back anytime to continue with the next question.
Every interview ends with what you explained well, what to strengthen, and what to practice next.
Weak areas
Persistence58
gaps in tradeoff reasoning, scaling & failure
Testing66
gaps in depth
Skills
Question 5 · Persistence
Visit only links to a pet. How would you show an owner's full visit history, and what would it cost?
Good Joined owners to pets to visits, and named the join correctly.
Missing An index on pet_id, and paging once the history grows.
Students, new grads, and bootcamp grads preparing for internship and entry-level interviews, or anyone about to be asked "walk me through this project".
Java and JavaScript/TypeScript, including React. Repos with other languages still work, but questions about those parts are more general.
Not yet — public GitHub repositories only.
RepoViva reads your repo from GitHub at a fixed commit and sends relevant excerpts to Google's Gemini to write and grade questions. It doesn't keep your source files — only the detected technologies, the names of the files used as evidence, and your questions, answers, and scores. Removing a project deletes all of it.
Analyzing a repo and preparing an interview each usually take under a minute. The interview itself is as long as you choose: short, standard, or long.