How do you answer behavioural questions as a software engineer?
You answer with a story, and the story has four parts. The situation, the task, the action and the result.
def answer_structure(situation, task, action, result):
return {
"situation": situation,
"task": task,
"action": action,
"result": result,
}
And here is what each part means in plain words.
the part what you are saying
------------- -------------------------------------------------
the situation the background, and why the problem mattered
the task what you personally had to do
the action what you did, and why you did it that way
the result what happened, with a number if you have one
And the part that most people get wrong is the action. It has to be about you and not about the team. "We migrated the database" is much weaker than "I wrote the migration script that ran in batches, so that the site stayed up during the move."
And the part that most people forget is the result. Every story needs a number or a clear outcome, otherwise the interviewer has nothing to judge. "The page got faster" is weak. "The page went from four seconds to one and a half seconds" is strong.
the weak result the strong result
-------------------------- -----------------------------------------
the team did well the release went out on time and the
error rate went down by half
I learned a lot I now write the migration tests first,
and that caught two bugs last month
And there are two more things that are worth knowing about. You should say that you were part of a team when you really were, and you should not pretend to have done something you did not do. An interviewer can tell, and the question is about how you think, not about who did what.
And there is a fourth thing that makes a story much stronger. You say what you would do differently. That shows that you are still thinking about it and that you have learned something, and it turns a story about the past into a story about your judgement.
So the rule to remember is this. A story about you, with a number in it, and one thing you would do differently.
The last question in this topic is about failure and disagreement.