We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Be on the Team

One of the best tactics for a technical interview is to reframe the situation in your mind.

Rather than thinking of it as an exam, think of it as a collaboration. Generally, you're not being left high and dry by your interviewer, you're able to ask clarifying questions and suggest solutions rather than provide them. Let me show you some examples.

Bad Example

Interviewer: "Write a function that accepts a string and returns the string reversed."

You: "Ok"

You: writes function

You: "Here you go"

Good Example

Interviewer: "Write a function that accepts a string and returns the string reversed."

You: "Got it, how concerned about memory are we? Should I try to reverse the string in place, or should I create a new string?"

Interviewer: "Let's say we're not concerned about memory, we just want a solution that works."

You: writes signature of function

You: "Ok, so we just want a single string in and a single string out... like this, right?"

Interviewer: "Yep!"

You, while writing the rest of the function: "Ok, so I'll just create a new string, loop through the input string backwards, and add each character to the new string.
This should handle cases of empty strings automatically."

Key Differences

The second example is better for many reasons:

  1. You're asking clarifying questions as you go, which does two things:
    • It shows that you'll ask clarifying questions on the job, which is a very good trait. You'd be surprised how many developers spend days or weeks building the wrong thing because they misunderstood the requirements.
    • You'll get answers in real time, which means you're more likely to build the correct solution.
  2. You're communicating your thought process:
    • Your interviewer can (and often will) actually help you if you start going down the wrong path.
    • It shows your interviewer how you think, which provides more signal about your abilities.
    • It shows that you're able to think through edge cases, something you'll need to do on the job.
    • It shows that you're a great communicator, which is critical to being a good developer.
    • It breaks up the awkward silence which, frankly, no one is super comfortable with.
  3. You're using words like "we" and "us" instead of "you" and "me":
    • This subliminally signals to the interviewer that you're already part of the team.
    • It's friendly and collaborative language, which just makes you more likable and lightens the mood.