Interviewing a junior dev.
> Make this function return false.
> junior: deleted all code in function replaces it with return false;

Literally no words.........

  • 112
    Passes tests according to specifications given!
  • 70
    Well, I'd just added "return false" as the first statement. Less keystrokes.
  • 34
    What was he supposed to do? Figure out what the function does through its name and modify the code? Or, a lot easier, add a "return false" at the end?
  • 14
    Im favoriting this one!
  • 6
    @YouAreAPIRate probably he should have inverted the logic in a smart way.
  • 5
  • 8
    Salute to that man
  • 8
    @Scrumbag why? its adding unnessesary dead code?
  • 95
    "literally no words"

    You're hired.

    Time efficient, followed instructions perfectly, delivered requested result in working format, cleaned up all unnecessary code. I fail to see the problem here.
  • 20
    Yeah unfortantly he did not get the job. The function was a even or odd number even = true odd = false all he had to do was pass a odd number in. Very basic.

    He didn't get the job due to his fuck-you personality but this is something ill remeber for awhile.
  • 8
    @Alpham0use too bad about his attitude but wished workplaces hired him for his creativity -- he technically wasn't wrong 😂
  • 5
    What kind of job needs someone to just return false? Did you interview him for a coffee maker position?
  • 11
    @Djanjo Once in my previous office, I took up the job of an office boy for a day. I would go to tables to pickup other people's used coffee cups, and pass comments on their code, asking them to extract that variable/method or rename it or write a test for it. Freaked people out.
  • 7
    "Make the function return false" kinda implies that it should always return false, so joke's on you 🤺
  • 13
    @Alpham0use Using odd numbers as a parameter would actually be a wrong solution according to your specs. There's a difference between "make this function (always) return false" and "what parameters do you need to give to that function in order for it to return false"
  • 1
    What a madman haha 😂
  • 1
    return undefined == null;
  • 2
    I would have done the same thing
  • 3
    Test Driven Development achieved!
  • 2
    did he say "hold my beer"?
  • 0
    I'm going to be honest, I would've done the same just for the laughs, then CTRL + Z and do it right ;)
Add Comment