Many people jump straight into solving the problem. Take time to ask clarifying questions β some people intentionally underspecify as a way to catch you out.
The BIG reason you want to clarify: demonstrating clear communication skills. Every employer wants this πββοΈ
2. EXAMPLES
To confirm understanding, come up with examples. Write some sample inputs, and then the expected outputs.
This doubles as TDD β as you write your solution, you should constantly rerun it against what you've agreed upon.
To look for edge cases, think like a QA πββοΈ
3. APPROACH
Engineering is the art of breaking big problems down into smaller problems. Separate your problem into stages and explain this thought process **out loud**.
Even if you don't end with a working solution, you can get credit for the right approach πββοΈ
4. TAKE THE HINT
Believe it or not, interviewers want you to succeed! Everyone wants find a good hire ASAP.
When they give you a hint, they're trying to help. Ignoring hints is a big red flag β they want to guide you back on track.
Take the hint πββοΈ
5. PSEUDOCODE
Write out steps before implementing details.
Most people pseudocode like South Park's Underpants Gnomes:
1: Collect Underpants
2: ???
3: Profit
Go deeper - plan out the argument and return profile of major functions, how you will store and mutate state πββοΈ
6. DATA STRUCTURES
Pick the wrong data structure, and spend the rest of the interview compensating for it in your algorithm with spaghetti code.
Pick the right data structure, and you simplify the problem to its essential complexity.
Data Structures > Algorithms πββοΈ
7. LAMPSHADING
Make it work, make it right, then make it fast β in that order.
Most interviews are ~45mins long - let go of your inner perfectionist.
People understand that this is a stressful setting - lampshade weaknesses and carry on πββοΈ
"I think Iβve been in the top 5% of my
age cohort all my life in understanding the power of incentives, and all my life Iβve underestimated it."
2. Denial
"If you turn on the television, youβll find the mothers of the most obvious criminals that man could ever diagnose, and they all think their sons are innocent. The reality is too painful to bear, so you just distort it until itβs bearable."
Question from a reader: "I've just been hired to take over frontend for a really complex application. Feeling very overwhelmed right now trying to understand the codebase. I'm really stressed out since nobody else on the team does frontend."
What would you do? My thoughts π
First off - it sucks that your company put you in this position. Ideally you would have a mentor/buddy to guide you through onboarding.
But things often aren't ideal in real life. Shit happens. We grow most when we deal with shit happening. Someday you'll look back and laugh.
Second - it's OK to feel stressed. I would too. Anyone would. It's not you, it's them. Don't freak out, but make sure your bosses know the situation they put you in. Set the expectation that your productivity will be low while you ramp up, and document what isn't documented.