Java
Defending it in a viva
Saying why you used an interface there, out loud, without hedging.
More on this is coming, and asking moves it up the list.
Or sit with someone on it instead of waiting for us to write it.
Java
Saying why you used an interface there, out loud, without hedging.
More on this is coming, and asking moves it up the list.
Or sit with someone on it instead of waiting for us to write it.
Want this written up?
Sign in and tell us. We write the ones people actually ask for, and asking takes one click.
Sign in to askA viva is not a test of your code. It is a test of whether the code is yours.
The examiner has already seen it work. What they are deciding is whether you made the decisions in it, and they find out by asking why, twice.
Whatever they ask, they are asking one thing: can you defend a choice.
"Why a HashMap here?" is not about HashMap. It is whether you considered
anything else. "Why is this an interface?" is not about interfaces. The good
answer always has the same shape: what the alternative was, and what made you
pick this one.
"Because that is what the tutorial used" is an honest answer and it is also the
one that costs you marks. "I used a HashMap because I need lookup by id and I
do not care about order; a TreeMap would have cost me log n for sorting I do
not use" is the same decision, defended.
The data model. Why this table, why this key, why not one big table. If you normalised, why. If you did not, why not.
The one weird bit. Every project has a part where something was worked around. They will find it, and they are not looking for it to be elegant. They are looking for you to know it is there and be able to say what you would do with more time.
Anything you cannot explain. Which, increasingly, is the code an agent wrote while you watched. If your commit history is clean and your explanation is not, that gap is the whole viva.
Rehearse a three-sentence answer for every significant decision in the project. What it does, why this way, what you gave up.
Three sentences, because the failure is almost never saying too little. It is starting to explain, realising halfway that you are not sure, and trailing off. An examiner reads that as not knowing, whether or not you did.
Say so, then say how you would find out.
"I am not sure, I would check what the query planner does with it" is a genuinely good answer. It is honest, it shows method, and it is far stronger than a guess delivered confidently. Examiners have heard a great many confident guesses and they can tell.
The one thing that does real damage is defending something you do not understand. It invites a follow-up you cannot survive, and now the question is not about the code any more.
Read your own code as if someone else wrote it. Genuinely read it, and stop at anything that makes you pause. Every one of those pauses is a question waiting to be asked.
Run it once from a clean checkout. Projects that only work on the author's laptop are found in about ninety seconds, and it is a bad ninety seconds.
Then pick the three decisions you are proudest of and make sure you can say each in three sentences. Those are the ones you want to steer towards, and steering is allowed.
If you built it with an agent, that is fine and increasingly normal. What is not fine is not having read it.
The fix is not to hide it. The fix is to go through it now, line by line, and make every decision in there a decision you can defend. That is the same work as understanding it, which is what the viva is measuring anyway.