Code exams
Oct. 25th, 2017 11:08 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I recently stepped from one job into another. On Friday I was working for the Berkeley labs, then on Monday I was working for a startup company across the street. From my new office, I can look out the window and see the sunlit hallway in the old building, where I used to take snack breaks. My bicycle commute is exactly the same. Nice!
The old job was being cut due to lack of funding. I was going to spend a while "funemployed" after that, but with a couple weeks to go I changed my mind and hit the job market. During those few days I brushed up my interview skills. This drove me a bit bonkers.
There are a zillion companies now that claim to be able to train you for an interview -- or interview your candidate for you, with multiple-choice quizzes and in-browser code tests. These vary in quality and content, more than you can imagine. The worst of them are crowd-sourced, going for quantity so they can boast "thousands of questions" on their press material. All the questions - multiple choice, fill in the blank, whatever - are weird nit-picky crap. All of them. The ones that aren't are so few that they're within the margin of error in the measurement and don't matter.
I took a quiz on Bootstrap and the first question was:
Are you fucking kidding me? Is that knowledge absolutely essential in sorting out n00bs from rock stars?
Oh wow, yeah, I need to look that up at least twice a day. I should have it memorized.
Answer: Fuck you.
Then there are the sites where you actually write code. They are better, but they have their own problems. Sometimes the answer they expect is very, very specific, and if you don't follow their formatting, or put commands in the same arbitrary order, you lose. Eventually I settled on the Codility website, which didn't suck. I barreled my way through ten of their tests, picking them at random, switching between Python and Javascript. Felt pretty good! Then I hit a problem about calculating "semi-prime" numbers.
There is exactly one way to solve this, and it means implementing a modified version of an algorithm called the “Sieve of Eratosthenes”. Go read about it; I'm sure you've never heard of it.
This problem is dropped in with a bunch of others about sorting arrays, walking trees, and munging lists. Guess how often the Sieve of Eratosthe-butt-ass has come up in thirty years of a very respectable programming career? That’s right. Not once. But you either know it, or you don't. Or you're Nicomachus of Gerasa from the year 60, and you come up with it on the spot.
You know what this is? This is like qualifying a construction worker to operate heavy machinery by testing his skills with the drop-claw game at the pizza parlor.
Anyway, I quit after that. I'd gone far enough. Any interview that would ask me about the Sieve of Erazzo-poof-shart is an interview I'd be happy to flunk.


There are a zillion companies now that claim to be able to train you for an interview -- or interview your candidate for you, with multiple-choice quizzes and in-browser code tests. These vary in quality and content, more than you can imagine. The worst of them are crowd-sourced, going for quantity so they can boast "thousands of questions" on their press material. All the questions - multiple choice, fill in the blank, whatever - are weird nit-picky crap. All of them. The ones that aren't are so few that they're within the margin of error in the measurement and don't matter.
I took a quiz on Bootstrap and the first question was:
"Which of the following classes are generated on a blue button in the UI: btn-blue, button, ui-btn, blue?"
Are you fucking kidding me? Is that knowledge absolutely essential in sorting out n00bs from rock stars?
"Does Javascript's getDay() function return the weekday starting from 0 or from 1? Does the lowest value represent Sunday, or Monday?"
Oh wow, yeah, I need to look that up at least twice a day. I should have it memorized.
"What's the default duration of a jQuery.fadeOut() call?"
Answer: Fuck you.
Then there are the sites where you actually write code. They are better, but they have their own problems. Sometimes the answer they expect is very, very specific, and if you don't follow their formatting, or put commands in the same arbitrary order, you lose. Eventually I settled on the Codility website, which didn't suck. I barreled my way through ten of their tests, picking them at random, switching between Python and Javascript. Felt pretty good! Then I hit a problem about calculating "semi-prime" numbers.
Find the number of semiprime numbers (numbers that are the product of two primes) within the range (P, Q), where 1 ≤ P ≤ Q ≤ 50000. Your program must have a worst-case run time of O(N*log(log(N))+M) or better.
There is exactly one way to solve this, and it means implementing a modified version of an algorithm called the “Sieve of Eratosthenes”. Go read about it; I'm sure you've never heard of it.
This problem is dropped in with a bunch of others about sorting arrays, walking trees, and munging lists. Guess how often the Sieve of Eratosthe-butt-ass has come up in thirty years of a very respectable programming career? That’s right. Not once. But you either know it, or you don't. Or you're Nicomachus of Gerasa from the year 60, and you come up with it on the spot.
You know what this is? This is like qualifying a construction worker to operate heavy machinery by testing his skills with the drop-claw game at the pizza parlor.
Anyway, I quit after that. I'd gone far enough. Any interview that would ask me about the Sieve of Erazzo-poof-shart is an interview I'd be happy to flunk.

no subject
Date: 2017-10-26 06:24 pm (UTC)no subject
Date: 2017-10-26 06:51 pm (UTC)It’s one of the things I liked about Codility. They actually ran your code in a sandbox on their server, instead of just trying to parse it to match a known set of “correct” programs.
no subject
Date: 2017-10-26 08:12 pm (UTC)I agree with the rest. Really, idiots that know only one solution... OTOH, better to detect them early in the process. I just wonder how, e.g. a Chinese guy interviews and Indian guy, and vice versa. Have to pay closer attention next time. Two different kinds of logic. (Europeans too have this problem, different logic.)
no subject
Date: 2017-10-26 11:43 pm (UTC)I'd be interested to know more about these different patterns in logic... Are they based on language differences? Cultural differences?
no subject
Date: 2017-10-27 02:05 am (UTC)See, once I interviewed an Indian, and he asked me, "how do you want me to do this?"
First I could not believe the guy cannot solve this simple problem. Then I figured. He has more than one solution. So he's asking which one I would prefer. That's Indian mentality, Jain logic, navya nyaya logic. The Chinese approach is more or less the opposite. "You must know the only solution that is true". Pretty close to Russian mentality - "I know the truth, everyone else is an idiot." Mo Di, Gongsun Long were almost an exception.
no subject
Date: 2017-11-09 03:40 am (UTC)no subject
Date: 2017-11-09 06:10 am (UTC)no subject
Date: 2017-11-09 09:03 am (UTC)no subject
Date: 2017-11-09 03:39 pm (UTC)