^


[post] #javascript #react
Oct. 21, 2024, 8:03 p.m.

Giving My First Technical Interview

The Requirements... simple. I think. Basic For-Loop? Simple Logic? Quick Percentage Calculation? Should be easy? Maybe not.

I have never given a technical interview before.

I didn't need someone with a ton of experience. Just the JavaScript basics, ability to calculate some percentages and fluent enough in React to build some components needed for the project.

I was confounded on what happened. This person was very polite and well spoken. Also they had 2 years experience in the field working with React, TypeScript and JavaScript. I figured, "this should be easy", but oh man, I was unprepared for the events to unfold.

The Requirements VS The Questions

As I mentioned above, I was not looking for some leetcode person or an algo + DSA lord, just someone that could do a for-loop, handle some logic steps and figure out a percentage. And then make a basic React component.

I tried to make the questions as dead simple as I could. Maybe they are harder than I thought? Let me know if I am out of touch (it is very likely). Also, like an open-book exam, I didn't care if they looked up something when getting stuck. I encouraged it because I wanted to see the whole process of them thinking through the problem.

Question 1: FizzBuzz

// Please solve this.
// Using JavaScript, please write a function
// that prints the numbers from 1 to N.
// If the number is divisible by 3, print fizz,
// if the number is divisible by 5, print buzz,
// if the number is divisible by both 3 and 5, print fizzbuzz,
// otherwise it just prints the number.
function fizzBuzz(n) {
  // DO WORK HERE
}
fizzBuzz(100);

I know that even simple questions can trip you if your mind is clouded from feeling the pressure in an interview. But I was surprised to see the struggle on this question. It took about 15 minutes and needed some assistance on the basic logic flow and "regular" for-loop as well as some clarification on the question. But eventually the candidate solved it. I would say they "passed" in that sense but my eyebrows were a raised.

Question 2: Star Rating Calculator

// Please solve this.
// Using JavaScript, please write a function
// that evaluates a given number of "yes" and "no"
// responses (i.e. yes = # of yes, no = # of no)
// that can determine a proper star rating from
// 1.0-5.0, it must always return a value from 1.0-5.0
function ratingCalculator(yes, no) {
  // DO WORK HERE
}
ratingCalculator(80, 20); // Should return 4.0
ratingCalculator(50, 50); // Should return 2.5
ratingCalculator(0, 0); // Should return 1.0

This is when I realised that it likely was not going to work out. Perhaps if my gauge is off regarding this and it is more difficult than I thought but the candidate was unable to solve this without direct help. Even with Googling. I don't want to knock this person because what happened next is why I am making this post.

Question 3: Company List Ratings Component

// How would you approach this?
// Using React, please write a function component
// that would render a simple list of companies with
// the given rating from their yes/no responses
// each item in the list looks like this:
// { name: COMPANY_NAME, yes: 80, no: 20 }
// (i.e. The final result looks something like ::
//  COMPANY_NAME-4.0 stars
//  COMPANY_NAME-4.0 stars
//  COMPANY_NAME-4.0 stars)
export const CompanyRating = ({ companies }) => {
  // IMPLEMENT HERE
}

I was floored. This person was able to build a perfectly working React component that did exactly what was in the comment. I didn't need to clarify anything. They just built it like, easy, no problem. I was like... wait... what just happened?

In fact, it bothered me all day. Like... how did FizzBuzz and a basic ratio calculation fail but this component was knocked out of the park? It made no sense to me. It still makes no sense to me. But it does have me a little scared.

Should we be just considering React it's own language now? I just figured the first 2 questions were an okay judge of basic JavaScript skills, are they not? Am I out of touch?

The Conclusion: What became of this candidate?

I genuinely liked this person. In conversation about non-tech questions, in talking through what they were thinking while coding, except on the second question. But ultimately, while this person does have a future in development and plenty of skills to grow, I could not justify that level of fundamental gap knowledge.

What if we needed some utility functions for calculations? Or to handle some complex string manipulations? This particular person would have really struggled. So we had to part. But I just couldn't wrap my head around it.

Am I crazy?