9 ms·
10 years working in embedded industry, no idea what Pascall's triangle is. I would ask you to explain, you would smirk inside, I will be rejected. I am sure g
by Ryan_Shmotkin 15y ago
10 years working in embedded industry, no idea what Pascall's triangle is.
I would ask you to explain, you would smirk inside, I will be rejected.
I am sure google should have enough data by now to see if there is correlation between knowing this problem and performance of hired programmer. I will be suprized if it has any relation.
- enjo 15y agoMe either..12 years for me.
- kls 15y agoSame here and I have delivers some big stuff, your single test would have filtered me out and I am without a doubt a 10Xer in my field. We assume what we know is common knowledge because we know it. But each of us knows different things and that is what makes us valuable. I have to ask the parent poster if they truly feel that people need to know this http://en.wikipedia.org/wiki/Pascal%27s_triangle http://en.wikipedia.org/wiki/Pascal%27s_triangle to deliver web or mobile solutions? You are highlighting the issue that the article is talking about. Further, a whiteboard is like giving a mechanic a drawing of a car and a hammer and saying fix the head gasket. If creating a row from a Pascal Triangle was a real issue that crossed my desk the first thing I would do is hit Google to find the mathematical formula and explanation of what it does then I would see if there is a standard library and finally I would write it if one does not exist. Your whiteboard does not have search capabilities on it, so how are you expecting someone to show you how they work when you have provided them with any semblance of an environment that they would work in.
- jsnell 15y agoOf course not. It's not a trivia question to see if you happen to know the term. Or a trivia question to see if you happen to remember some particular trick to solve the problem. It's just an arbitrary task that will have you solve an easy problem that you probably have not done before, and write code for it. As such, the interviewer would obviously give the necessary background information. Either up front or when requested.
- YmMot 15y agoI believe you are misunderstanding. Pascal's Triangle is not some obscure and difficult mathematical formula you are expected to have memorized...This is not "construct Pascals Triangle and if you don't know what that is, too bad..." It's a very simple concept and doesn't require the knowledge of anything other than simple arithmetic; any competent programmer should be able to write a program to construct one once the concept is explained to them...it's just a couple of for loops, some printfs, and straightforward logic. That's the whole point the poster was making...really simple programming problems like fizzbuzz etc are useful at quickly weeding out people who lack very basic programming ability. Constructing Pascals Triangle is obviously not a part of normal programming, but the ability to take an algorithm that has been described to you verbally and translate it into code is at the heart of all programming...that's what programming is basically. If you can't do it, you are ipso facto not a real programmer.
- kls 15y agoThen you need to give said competent programmer a computer, a compiler, a debugger and the ability to search for information. You are asking a programmer to show you that they are competent in their daily work, but not giving them any of their tool that they work with to do so. Again it's like asking a frame carpenter to draw a truss and expecting that to somehow represent their daily activity of putting a truss together. If you want to test somebody do it how https://webmynd.com/ https://webmynd.com/ does it and make it a pre requisite of getting to the interview that way developers can do it on their terms using their tools of the trade and opt out before they are stuck in a room in a bad situation. I still contend that you are not gaining much insight and are producing an unnecessary filter that can do you more damage than good. I was on a project once that was cursed, we had a developer have a stroke, I had to have my heart restarted due to SVT from sleep deprivation etc. etc. We literally lost everyone that knew the technology except for me and I was not in good shape, and there was this one guy Tom Marra, he was an artist, but the kid had passion he had never coded in his life, but we where in a really bad situation, once he found out that with source control he could hack the crap out of the code and then just re-pull to fix his mistakes, he set out to teach himself JavaScript, on his own initiative. In less than a month he was contributing code to source control and in 2 months you could not tell his code from a seasoned pro's. The one quality this kid had was passion. You can't identify Tom Marra's by making them solve trivia on a whiteboard.
- 2arrs2ells 15y agoThe interview question isn't supposed to test your knowledge of Pascal's Triangle - it's designed to test your ability to create it programatically. I'm sure cletus or any other interviewer would explain what Pascal's Triangle is to you, and provide a couple rows of example output if you asked. EDIT: Find/replace "Pascal's Triangle" with "FizzBuzz" and reread the comment. You'll get the same insight without getting hung up on seeing a term you didn't know.
- jebblue 15y agoWhat is a FizzBuz and what does it have to do with day to day Software Engineering?
- switz 15y agoFizzBuzz: Write a program that prints the numbers 1 to 100. However, for multiples of 3 print "Fizz" and for multiples of 5 print "Buzz". For multiples of both 3 and 5, print "FizzBuzz".
- harichinnan 15y agoCouldn't resist using my new Haskell skills. show' :: Int -> String show' x |((rem x 3 == 0) && (rem x 5 == 0)) = "FizzBuzz" |rem x 3 == 0 = "Fizz" |rem x 5 == 0 = "Buzz" |otherwise = show x main :: IO () main = putStrLn $ foldl (\acc x -> acc ++"\n" ++ show' x) "" [1..100]
- tikhonj 15y agoA couple of suggestions: functions like rem look better infix: x `rem` 3 this means the same thing but is more readable (I think). Instead of folding, just map putStrLn over the list: mapM_ (putStrLn . show') [1..100] mapM_ is just a version of map for monads that ignores its result (it returns m () instead of m a). You can also use forM_ which is mapM_ with its arguments reversed. Finally, I think this site lets you format code by putting four spaces in front of each line. I hope :) Edit: One other thing. You don't need all those parentheses in the first line. rem x 3 == 0 && rem x 5 == 0 = "FizzBuzz" x `rem` 3 == 0 && x `rem` 5 == 0 = "FizzBuzz" Both versions should work and I think they are easier to read. I could see (rem x 3 == 0) also being clear, but the outermost parentheses do not help at all.
- cadr 15y agoI've asked the Pascall's triangle question, but I always go to great length to explain what it is, as even if someone does know it, they probably haven't thought of it in quite some time.
- kaffeinecoma 15y agoI didn't know what it was either, but I googled it and found a simple explanation on Wikipedia. I'm sure the interviewer would at least give you that basic background information ("Pascal's triangle is a structure in which each number in the triangle is the sum of the two directly above it.") I don't think the point is that you would be expected to know every historical abstract concept, but rather that given the basics of one, you could write code to implement a data structure around it.