My boss let me conduct interviews for a JavaScript "developer" position. I came up with some super simple questions, and my boss okayed them. They were: 1. Write the numbers 6 and 7 in binary and add them together. 2. FizzBuzz without modulus 3. Classic two eggs, 100 stories.
5/6 of the people I interviewed got all of them wrong. Why are JavaScript programmers so stupid?
Unless you are very heavy serverside you wont get people to write binary
Fizzbuzz withouth modulo i like that will take it
Ian Jones
Y divide by x, round down to nearest whole, find the difference between x*whole and Y
If they can't even think of that they should consider ending their careers
John Morales
You don't even need to round. You just need a vague idea of how integers work.
LET mod0(a,b) ::= (a == 0) || b*(a\b) == b
fizzbuzz: for(x, 1, 100) => { mod0(x, 15) => { out "fizzbuzz", continue } mod0(x, 5) => { out "fizz", continue } mod0(x, 3) => { out "buzz", continue } out x } [\code]
Samuel Perry
So I just looked up fizzbuzz for the first time.
It seems too easy, even without modulo. What am I missing?:
j=1 For i from 1 to 100 { If j==3 Print i, fizz j=1 Elif k==5 Print i, buzz k=1 Else Print i i +=1 j +=1 }
Tyler Barnes
Oops i forgot the fizzbuzz part.
Whatever, change the conditionals to include the 3 and 5 part.
Is this strategy not allowed?
Nicholas Jackson
>1. Write the numbers 6 and 7 in binary and add them together. Dumb question with no connection to job. >2. FizzBuzz without modulus >without modulus Literally who cares if they know bitwise AND? >3. Classic two eggs, 100 stories. Meme "brain teaser" with no relation to job.
Jayden Adams
I might be able to do these if I knew what the fuck you were talking about. You're selecting your candidates more on the basis of exposure to arbitrary terms, than actual ability. I strongly urge you to reconsider your questions, or at least the wording of them.
Isaac Foster
>Dumb question with no connection to job >being too dumb to write a total of 8 1's on the paper
Jason Jones
but it literally helps weed out the fakes see
Cameron Martin
They're never going to be using binary in any way. Better question would be some Json shit, or http stuff.
Jace Young
>3. Classic two eggs, 100 stories. This requires too much math.
Dominic Rogers
>1. Write the numbers 6 and 7 in binary and add them together. That's pretty irrelevant to the job >2. FizzBuzz without modulus oh no they can't write fizzbuzz in a dumber abnormal fashion off the top of their heads, what idiots.
Lincoln Lee
Wouldn't it be better to ask something related to the job? You are supposed to find a javascript dev. Especially number 1 is useless. Might as well asked them what country Casablanca is in or in what year the battle of Waterloo happened.
Jack Campbell
>Applying for a janitor job >Application has words on it >Toss out application because reading is pretty irrelevant to the job
Jack Russell
How much time was given to solve them?
Josiah Ortiz
32 femtosecond
David Ramirez
if i were your boss i would have fired you on the spot. asking shit not related to programming for a programming position? getting them to program in a retarded way instead of the most efficient way? gtfo
how fucking dark is your skin, pajeet?
Juan Adams
If you don't know how to write binary you are too dumb to work for anyone
James Allen
What a stupid fucking article its wrong.
Chase King
To anyone objecting to fizzbuzz Its a standard test to see if candidate is even a programmer Had a math/cs grad come to me last week, couldnt write the fizzbuzz for the life of her Another guy wrote it in caps lock
Cooper Torres
>This article is contributed byRachit. kek
Benjamin Perry
No it isn't.
Brody King
>Another guy wrote it in caps lock F77?
Evan Cox
Nope, es6
Hunter Bennett
Couldn't answer fizzbuzz? WTH man? I fuckin fizzbuzz all day, every day. #fizzbuzz-lyfe WTF, how can anyone go through a day without needing to write fizzbuzz at least once.
+ 0111 0110
0013
Binary math, that also happens all the fuckin time. I actually need to parse the 1s and 0s from strings first. lol.. Do you even know the charset bro?
Alexander Morgan
>Interviewing candidate for javascript dev >Hand him my signalling lamp >ask him to signal "Hello World"
Lincoln Perry
> 0111 + 0110 > 0013
Its actually 0221
Jackson Reyes
>5/6 of the people I interviewed got all of them wrong. Why are JavaScript programmers so stupid? It is not just Javascript programmers. 99.5% of people applying for programming jobs do not know how to program.
Leo Howard
>implying most of Sup Forums could get the egg problem without knowing answer ahead of time
Alexander Gomez
i've been programming since 1996
i have only had to do binary math for masking option bits
i have only needed to fizzbuzz once, in perl, and it was trivial as shit print ( ((($_ % 3) ? "" : "Fizz") . (($_ % 5) ? "" : "Buzz")) || $_, "\n") for (1..100
Looked up your 200 eggs puzzle. Is this a programming job or a calculus job?
I think you're making all of this up and read a meme about tough interview questions and decided to shit post. If not, you are a terribly hiring manager.
Ethan Thomas
Just saw you said without modulo. Ok, a bit tougher, but why?
Not OP, but probably to stop people from learning the code without understanding it the slightest.
Jonathan Bennett
that's so embarrassing for her gross
if you have to ask when it would be useful you're an idiot
Easton Evans
The questions are actually decent if you want to judge if a person has any clue about programming beyond being a codemonkey.
1. Is good for basic computer literacy 2. Is good for the basic types of JS 3. Is a good check whether the person can think logically
Ethan Wilson
>0013 kek
Lincoln Richardson
:SSSSSS disgusting
Isaac Nguyen
it is easy, meant to filter out the trash
Grayson Nguyen
this guy knows his stuff
William Wood
I don't think that would work. Besides the fizzbuzz part you forgot, which is the whole point of the exercise and what makes it nontrivial. You also forgot to reset the values of i and j.
Connor Perry
ZIMBABWE!
Henry Long
We called it lightbulbs
>Write the numbers 6 and 7 in binary and add them together. switch this out for calculating fibonacci, and if they go recursion, ask for what's wrong with that and implement iterative. You will rarely need bitwise operators for JavaScript.
Fail. reimplementing modulus is still using modulus. You didn't understand the point of the exercise.
>Just saw you said without modulo. Ok, a bit tougher, but why? Because generally people who get fizzbuzz right either have read about it before, or just understand modulo can check for divisibility. Removing this functionality requires people who know the problem to rethink the problem, and you can see how they approach problems with caveats (often needed in large existing software where the solution would be simple, but the existing framework requires you to think of something other than copying and pasting from SO)
William Lee
>Is this a programming job or a calculus job? It's just a binary search. Let's say your colleague wrote a code that straight up checks every value in an already sorted array to get an index for insertion. You point this out, and he says "it just werks bruh". Wouldn't you want to hit it with something heavy?
Carson Cooper
>t's just a binary search. No. Binary search results in a worst case of 50 trials. You should be able to get under 20 in the interview. 14 is optimal and you have to be pretty clever (or heard it before) to come up with that in a stressful interview.
Oliver Rodriguez
>number that ends in 5 is dividable by 3 >number with a cross sum of 3 is dividable by 3
wasnt that hard without using modulus. throw in a few ifs and you’re done.
Sure, you tested their general programming "thinking" but you never tested if they are good at javascript at all.
Just being honest here.
Sebastian Robinson
you'd be surprised how many people do not understand different number bases.
Logan Sullivan
Why ask them about JavaScript closures, "this", the prototype chain, differences between strict mode and not, etc, when people cannot count on their figures to 3 or 5, then put that logic into a program? It's just a waste of your time and it's so much easier to weed out people
Ayden Harris
It's a good thing you have never and will never work in a programming capacity.
James Taylor
this is the worst insult i have ever suffered on Sup Forums. Take that back.
Ethan Gray
>check divisibility without checking divisibility
Samuel Kelly
>It's just a binary search
Wyatt Robinson
This is dumb , you assume everyone even knows what this shit is
The fuck is fizzbuzz? What the hell is 2 eggs? How can you expect me to write anything without telling me shit about them?
I'm going to write a program called fizzbuzz, it writes NIGGER every time a user inputs any keystroke up to 10 times then it installs a fork bomb into the start up processes
I'm going to give you a raw egg on a plate for you to eat
Am I hired?
Matthew Adams
I'll take it back and admit to being a faggot if you post code user :^)
for (int i = 1, fizz = 1, buzz = 1; i < n; i++, fizz++, buzz++) { if (fizz == 3) { std::cout
Carter Martin
>my ignorance is your problem If you have been on Sup Forums for more than 2 hours, you would know what fizzbuzz is.
Jackson Bennett
>google 'top 100 interview questions for programmers' >position probably lists technologies they work with, not requiring >surprised only brainlets showing up for brainlet job ad >somehow shocking
Patrician interview questions coming through >What OS/editor do you prefer? >Last programming/CS/IT book you read? >Which tech blogs/writers do you follow? >Strong opinions on some technologies? >Previous work or side project you are proud of?
Hire the interesting and nice people, evaluate performance on the job
Sebastian Green
>Hire nice people who may or may not be able to do the job >Evaluate skills after hiring Brilliant.
Gavin Ramirez
>implying OP didn't explain the problems and just shouted "CLASSIC FIZZ EGGS BINARY JS GO" Come on man. Regardless it is the interviewee's job to ask question when given ambiguous or not well defined problems. If you don't understand the problem you get bonus points for asking clarifying questions rather than just going to the whiteboard and writing whatever you are guessing they meant
Carter Moore
"web designer" brainlet BTFO I guess women and computers just don't mix
Jace Hill
>tfw can't write fizzbuzz
I don't even know a single programming language anymore I've forgotten python and I'm trash at java and barely have a handle on C
Why is it so hard? People in my classes are able to come up with solutions and stuff to problems and I literally can't progress from a blank page.
It's not fair, I feel like someone failed me
Jose Bell
>Hire people who may or may not be able to do the job
All hiring procedures have this flaw.
>I literally can't progress from a blank page.
Write a program that prints out the numbers 1 to 100 and then go from there.
If you can't do that, then you need to relearn the extreme basics of an intro to programming class.
Jordan Murphy
I've never even done this before and i'm pretty sure i did it on my first try in the shittiest scripting language in the world, lua. for i=1,100 do if i % 3 == 0 and i % 5 == 0 then print("fizzbuzz") elseif i % 3 == 0 then print("fizz") elseif i % 5 == 0 then print("buzz") end end
Tyler Wright
interviews are a waste of resources on all parts. Interviews are like dates, you have your mind made up in the first 5 mins no amount of fizzbuzzing can change it.
Liam Bailey
>2. FizzBuzz without modulus
Alexander Bennett
>not using openresty for all your webdev needs
lua is life
Zachary Edwards
I feel like my issue is I'm able to do these intro to x languages classes and do exercise and pass tests. But once the class is over and next semester comes all that knowledge is gone. All my peers work on little projects or independently learn languages to do some task but in reality in my life I have 0 use for programming and I just never practice the skill.
I do great in my non programming CS classes and I have no idea what else I'd do or major in but every time it's time to program my skin crawls and I start looking around the room like a lost dog for some acquaintance who I can try to convince we're somewhat partners and I just copy their code when they don't look.
I'm scum and it's all I'll ever be
Josiah Powell
You are not printing the numbers.
Isaiah Brooks
It's supposed to print the numbers? add else print(i)
before the first "end"
Andrew Gutierrez
You forgot an = you brainlet You failed the .js interview
Aaron Barnes
what could one possibly accomplish with lua?
Juan Cooper
>BRAAAAP
William Roberts
>What OS/editor do you prefer? Whatever gets the job done the best
>Last programming/CS/IT book you read? Some shit in college? We have this thing called the internet now. If you include "web books"/pdgs then the last (and only useful) things I've read would be the c++ working draft, and chapter 5 of eloquent javascript
>Which tech blogs/writers do you follow? hahahaha
>Strong opinions on some technologies? Hungarian notation is shit. Python is shit. Tabs for indentation, spaces for alignment.
>Previous work or side project you are proud of? I wrote an entire stalking suite for okcupid. It used a probabilistic expectiminimax tree where the cost was determined by tree depth to give the least number of network calls needed to determine a set of profiles' hidden answers by process of elimination.
When do I start?
Ryder Perez
I like figuring out how things work and the decisions behind those things and all the reasons and nitty gritty from hardware to why languages are a way to why code like this.
But when it comes to making something that does some function? Nah man. I just can't out 2 and 2 together
Luke Bennett
For loop that increments by 5 3 times, then decrements by 3 5 times, then increments by 15. Have two lists, three[] and five[] and set list[i] to it when it can be assumed to be divisible, then iterate over all numbers. This avoids reimplementing modulus.
thanks for coming, you sound like a bit of an asshole, will get back to you in a week, have a nice day
Kayden Reed
5/6 got all 3 wrong. I was dumbfounded.
I didn't choose this question because I thought it was relevant to the job. I chose it because it was high school math and anyone who couldn't do it should not be applying for programming positions.
I don't expect people to get this one right. I just have it to see how they tackle the problem. If they do get it right, it's because they have most likely seen it before.
We're not interested in hiring programmers that can't figure out how to convert base10 to base2.
As long as they needed. I wouldn't have let the interviews go on for longer than an hour though.
t. mr. idk binary
I didn't check the article before I posted it. Most people know what problem I'm referring to.
Lucas Rodriguez
>Write the numbers 6 and 7 in binary and add them together.
Should be basic knowledge and I'd expect people to pass. But you can be a great developer without touching binaries ever, especially for JavaScript.
>FizzBuzz without modulus
Easy, there are many way to do it: 1) Make your own mod-function. 2) Use counters (if (b = 5) then b = 0 and "do buzz"). 3) Use boolean arrays and walk through in steps of 3 and 5 ("wheeling" method).
>Classic two eggs, 100 stories.
I'm pretty good with brain teasers, but this is one of the hardest I've seen. I got it down to 16 before I got annoyed and stopped solving it.
It's hard because it involves multiple steps: - figuring out that it's NOT about the lower bound (counter intuitive at the beginning) - figuring out you have one egg for dividing the big numbers and one for small scale counting - figuring out you should use variable step-width - figuring out you can use the step-width as offset for the first step - figuring out you should reduce steps to shrink the upper even further - choosing the correct reduction of step-width
So either you manage to find the correct formula or you have to do a lot of calculations with trial and error. Both is hard under stress.
>Summary
I'd probably solve it if I had to, but I don't think it's an easy test overall. Also consider those rules of thumb:
1) Most people are fucking nervous when you start to test them. But this has nothing to do with their programming skills. So the first "test" should be there to build up confidence. Give them something they should pass with grace unless they are brainlets. Make the questions harder overtime.
2) Brain teasers and open questions are good. They are good because it's not about the right answer, but about how they tackle problems.
3) Wisdom questions are problematic. Kinda OK if really related to the language they are using, but you can forget things. So I suggest using a couple of questions, start easy then dig deeper.
Luke Price
Yeah, I kinda am, but would I say any of that in an interview? No. I'd be on my best behavior and put up my best facade. You'd think I'm a nice guy, After a year I'd lose the nice guy routine and state my opinions unapologetically.
I know guys like that, and is exactly why "interesting and nice" and their opinions is not a good metric for hiring.
Henry Scott
>I'm going to write a program called fizzbuzz, it writes NIGGER every time a user inputs any keystroke up to 10 times then it installs a fork bomb into the start up processes Made me kek
Alexander Morris
>1. Write the numbers 6 and 7 in binary and add them together. Are you asking them to do that by hand or in Javascript? If the latter then you are a retard.
Angel Young
>everyone is gamergate >everyone is negative >everyone is blocked
Grayson Rodriguez
The worst are "magic" answers that you just have to know. There isn't a logical progression to them, but just some trick.
>It a potentially infinite linked list, determine if there is a cycle using O(1) space and O(n) time (n being the number of nodes up to the cycle) >In an unsorted list of n-1 numbers from 1 to n, find the missing number in O(1) space and O(n) time
Ethan Hall
>"girls who code"
Aaron Rivera
to be fair to women the person who wrote that tweet is a man
Parker Price
>keep 2 pointers, advancing the first one node at a time and the second 2 nodes at a time >sum the values and subtract from the expected sum Are you sure you aren't just a brainlet?
Eli Peterson
>everyone is always gamergater >if gamergater is zero, all tweets are negative >if negative is also zero, nobody is blocked. >if negative is non-zero, everyone is blocked. >if gamergater is non-zero, everyone is blocked, but not all tweets are necessarily negative
Caleb Long
Show the class your steps. You obviously knew the answers beforehand (or googled it), because there are no steps in deriving those answers. You just have to know the tortoise and hare pointers, and know the sum of all numbers between 1 and n is n(n-1)/2.