Hacker News new | ask | show | jobs
by comprev 1608 days ago
I experienced this recently in a surprise 'shared screen' coding exercise the interviewers threw in at the last minute.

I couldn't even remember how to write a for loop in bash, something so familiar it would be like asking me to recite the alphabet. Utterly humiliating yet comical experience looking back.

3 comments

At this point I'm convinced "candidate froze up" is the cause of most of the cases behind the "LOL 2/3 of our candidates can't even write a for loop" stories. I think it's really common.
Allow me to pile on here for perspective, in hopes there might be people who hire people on here who can take this into account...

A few years ago I was hiring for a non-coding role with a company that pops up here on HN periodically. The interview was entirely leetcode. I completely blew it because I was so flummoxed that this was how they were interviewing for the role. I tried asking some non-code related questions about the role and company and was shut down from even being able to ask - it was clear their expectation was that the interview process was a one-way street.

It wasn't the straw that broke the camel's back, but it was a chain of things that led me to finally conclude it was time to move on in my career. That is, jumping through these kinds of interviews might have been something I'd do at 20-something, but at 40-something I've got other options and am not willing to put up with it. The hiring process in the software industry is completely broken in how it assesses talent.

YES! If it seems shocking that so many experienced developers can't even do fizzbuzz, that's because it's BS; interviews just suck.
My crowning glory for the interview-stupids was relatively early in my career going in for a PHP interview, which was the language I was by far the most familiar with at the time and had written many thousands of lines in, and not being able to come up with the "->" syntax for method invocation & property access when I was up at the whiteboard. I used a dot-style instead, and realized only after I left that I'd totally fucked it up (writing some OO code on the whiteboard was just about the first thing they asked me to do, and the interview was really short after that...) I'm pretty sure I also mis-named some built in functions. I'm bad at retaining language-specific details and have since started reviewing a relevant language syntax minutes before an interview, which won't stick by the next day but usually does for a couple hours so I don't do anything too embarrassing. Not being able to put together two non-syntax-erroring lines in a language I wrote a few hundred useful lines of the day before, without a reference, is otherwise the norm for me. This has mattered zero times—except in interviews.
Do you want me to write fizzbuzz in proper syntax in some language I have on my resume and 'can do' but don't actually do every day without the help of an IDE? Forget it.

Can I write pseudo code that doesn't compile, is an amalgamation of various languages and probably understandable by anyone that can code even though there's probably no language w/ that syntax out there but it get the idea across perfectly? Sure!

    foreach (number in numbersYouWantMeToFizzBuzz) {
        if(number MOD 15 eq 0) print fizzbuzz
        else if(number MOD 3 eq 0) print fizz
        else if(number MOD 5 eq 0) print buzz
        else print number
    }
Don't have the {}? Who cares, you might be a python guy. Don't have the indentation? Meh you pass but my next question will be about formatting and what you think about applying a standard code style (and fail PRs automatically if it doesn't etc). You used % because your language uses that for MOD? Sure.
If it makes you feel any better, I can never remember BASH syntax. I have a gist where I keep all the common junk like for loops and array manipulation. Never had that problem in other languages as I can generally remember after 3 or 4 repetitions but my brain just can't grasp BASH syntax.
BASH is the most unforgiving syntax on earth, I would never even try and memorize that stuff.
The correct way to write more than 5 lines of bash is to delete the file and write it in python. You will thank yourself when you have to modify it later.
BASH and Regular expression syntax are two things that mysteriously expire from my memory after two weeks. It’s almost comical.
For some reason, I just can't remember things for life.

Despite being fairly experienced and having a rather solid grasp of Python/Go/JS/etc I still have to look up basic things like file modes (with bash syntax being especially notorious for being forgettable to me).

What I'm good at, however, is keeping references in my head, i.e. I know precisely what to Google to get the exact answer that I want. This way I compensate for my bad memory.

And for the record, I'm in my 20s. Sometimes I worry if it's going to take a toll on my career in the long run but so far it hasn't been much of a problem (apart from being a source of insecurities).

Your post reminds me of a joke punchline which was something along the lines of "an engineer doesn't actually have to remember very much, they only need to know how to efficiently find the information when required"

It's true for people working in technology due to the rapid pace of progress. As soon as we learn something it's out of date!