Just did a couple JS tests for jobs ... ughh!

Just did a couple JS tests for jobs ... ughh!
0.0 0

#1

OK, so, my continuing saga to find a job…

I keep looking for a web dev job. Now I’m expanding the search nationally – as long as they pay enough (which most more than do) it would be enough to compensate for the move and the loss in my current job, and a year or two long distance wouldn’t be the end of the world for us – we’ve had to do it before. If it gets us the future we want, it will be worth it.

Anyway, to the issue – employer tests. I’ve commented on a few of my employer tests. Here are two new ones that annoyed me.

OK, the first one was for a freelance site. It was 45 questions on JavaScript. OK. The problem was that they were all “JavaScript ninja” questions. Forgive me, but is 45 questions like:

let a = (('foo'+false)/5)?(typeof{}+7):7**true%4-1
console.log(a)

the best way to evaluate someone’s ability to build web sites? I don’t mind having some questions like that, but it just seemed too much. I mean, at least 4 of the questions involved unusual edge case of the return of the delete operator. Is 10% of a web developer’s job dealing with what the delete operator returns? Again, I wouldn’t mind some questions like this, but why not some practical JS questions? Or different sections of different difficulty?

The kicker? When I got done, it told me my JS rating was “beginner”. Hmmm. How would they know? All they know is that I’m not good at answering JS ninja questions. Then I look down and it says that I am above average. WTF? Are you kidding me? How can I be beginner and “above average”? That’s nuts. How can you even rate someone with a test like that?

OK, from one extreme to the other. This other test asked me no questions about JS but instead was algorithms. Ninety minutes for 3 algorithms. Now, I consider myself pretty good at algorithms, not a ninja, but pretty good. When I go to meetups that do algorithm challenges, I usually do very well compared to my peers, some of whom are CS grads.

But each of the algorithms fall into what I call the “trick algorithm” category. They aren’t straightforward and since the complexity expectations make a brute force solution impossible, you need to figure out the “trick”. The first algorithm was pretty straight forward, just some trig, that was the trick. The next one, I tried to solve with set theory, but that didn’t work so I tried to at least build a quasi brute force solution with some optimization but ran out of time. I should have used a graph with some recursion. The third, ughhh, I think I finally understand what it was asking, but have no idea how to build an algorithm to solve it – I can’t even begin. It was an algorithm to rate another algorithm, both of which were a little off. I knew how to brute force it, but not a clue about an elegant solution.

The kicker? When the score came back, I only got 15% on the first one. Hmmm. How can it pass every test and only get 15%? I know the math was sound. I have to assume that they had a slew of test cases with a bunch of edge cases, but I understood the problem very well so I can’t even imagine what they were. I met the time and space complexity guidelines so it isn’t that. The only thing I can imagine is if they hit it with some data that pushed it to the limits of precision of JS and there was a rounding error.

That’s one of my pet peeves and one of the things that drove me from sites that gamify algorithms – people try to design problems that trick you. And they provide test conditions that don’t accurately represent the range of the problem before slamming you with the real test of unexpected (and sometimes unexplained) limits.

Anyway, just venting. Don’t get me wrong, I think these kinds of problems have a place. It’s just odd to me that some people will put so much weight on them. I’m usually the one defending learning algorithms and things like that. I’m not a “why do I have to learn algorithms?” guy, quite the opposite. But there is a lot more to building web sites than arcane algorithms and obscure JS tricks.


#2

Those kind of tests are stupid and obnoxious and tell me that I don’t want to work for those people.


#3

Yeah, I wouldn’t mind if that was part of the test. I get that they want to be able to tell who is truly the best of the best. And I could understand if it was for a job that explicitly needed those exact skills. But both of these were for freelance sites where you’re never going to run into that kind of stuff.


#4

Those kind of tests are copy pasted from so called “guru”. They just want to hire skilled people with less money.


#5

Not so much related to your problem, but if you haven’t tried it already, I suggest AngelList. In my recent experience, the companies on this site are very responsive. There is an optional coding test that uses some Python-esque pseudocode, and while I found the questions sometimes tricky, it felt like they were actually testing how I could think logically with code.


#6

Yeah, I’ve been hitting AngelList a lot. My theory was that as a startup they wouldn’t be offering much money so I would have better odds. Unfortunately, I think because many of them are still starting out, they don’t have a lot of coders so everyone has to be tops and can do a little bit of everything. I’ve had a few interviews off of that site and that’s the impression I got. Came close on one.


#7

One thing I did figure out though was that whenever possible, do some research and find out what you can about the companies tests. Even if you can’t find the specific problems, you might be able to find the type of problems and find some examples. This probably would have helped me prepare more.


#8

That sounds quite intimidating. I used to do a bunch of python algorithm challenges on hacker rank but it’s not necessarily up my ally…

(('foo'+false)/5)?(typeof{}+7):7**true%4-1
what? lol


#9

Was the answer to:

let a = (('foo'+false)/5)?(typeof{}+7):7**true%4-1
console.log(a)

…2?


#10

Yeah it is…

I just tried out step by step in console to see what’s going on there. One “gotcha” that I didn’t know about is that NaN evaluates as false.

NaN ? true : false //false

#11

if these are the kinds of questions they’ll ask you, i don’t know if i want to keep pursuing this career…


#12

I don’t know. I think there is a subculture of coders for whom it is a dick measuring contest. They’re not all like this, but some of them are.


#13

let a = ((‘foo’+false)/5)?(typeof{}+7):7**true%4-1
console.log(a)

Yes, for the curious…

('foo'+false) evaluates to string, and 'foofalse'/5 evaluates to NaN which is falsy .

Not that it matters, but 'typeof{}' is 'object' and + 7 makes 'object7'

But the condition was falsy so 7**true%4-1 is where it’s at. The order of operation happens to go left to right. So, 7**true - in this case true evaluates as 1 so it is 7**1 or 7. 7%4 is 3 and 3-1 is 2.

No, I didn’t get it right away but had to do some checking.


#14

I do not think this is what you usually see in your standard interview.


#15

You can go your whole career without having to do coding tests that look like this. Like I said, if I was going through the application process and got sent a bunch of these questions, I would just stop applying to that company.


#16

The reality looks like this.
47


#17

A post was split to a new topic: What is the best way to learn algorithms?


#18

those tests you mention are standard cheap tests that have their answers all in that guru website.
here it is a common practice for companies to do that, but next time you run into those just go for it and browse through the Guru website. See if you can get the solutions, and if those make sense to you.
HR most of the time has zero idea of how they should assess a good resource


#19

lol
is it guru99?
I went to an interview and saw on the exam questions written in very small print: brought to you by Guru99 TM
I will reapply to that place and prepare with that website, those guys have zero idea I will outsmart them lol


#21

also, follow Andy Kieffer on twitter about moving to Guadalajara