7 ms·
Could you provide an example of your definition of a simple program and the resources they had to write it?
by SethMurphy 12y ago
Could you provide an example of your definition of a simple program and the resources they had to write it?
- atmosx 12y agoHm, I'd like to know the answer to that question too.
- nolok 12y agoNot parent, but I've sat though way too many interviews where the candidate failed the "FizzBuzz" test, either through super convoluted code that barely works or with complete failure to produce the expected results. And that is while sitting at a desktop computer, full internet access and no one eyeing behind them.
- wmkn 12y agoSo you are saying that many people failed to type "FizzBuzz code" in Google? I do not really buy that.
- nmjohn 12y agoHow many interviews have you conducted? If the answer is more than 0, I feel you have gotten lucky in the candidates you interview or are far more selective on who you actually interview. If the answer is 0, then you would be incredibly surprised. It isn't quite as simple as this dialog is making it sound, but essentially, yes, a not-insignificant number of candidates cannot solve problems with a fizzbuzz level of difficulty. It is something that surprised the hell out of me as well. From what I have seen, there are many people with CS degrees who have written virtually no code outside of class and never have come up with an original program on their own. It is incredibly clear that programming is just not something they are passionate about.
- wmkn 12y agoI have done about a dozen or so interviews. I can totally imagine some people not being able to do a simple fizz buzz from scratch. But when they have full internet access and no one is watching them. "Solving" fizz buzz is then as simple as performing a search and copying the results. I'll probably get down voted because it seems people on HN are incredibly attached to the FizzBuzz story. Possibly I am totally wrong and I am too positive about the skills of people with a CS degree. But it seems the crazier the anecdote (full internet access, coding at home, etc.) the more eager people are to believe it.
- MichaelCrawford 12y agoSome people don't even know how to do Google searches. This suggests a productive interview question: ask your candidate a question that they could not possibly answer on their own, then provide them with an internet-connected box, and see whether it even occurs to them to use web search. It's not just programmers; I devoted twenty years to asking medical professionals why I have a constant, raging, unquenchable thirst. That's a symptom of the very worst kind of diabetes, so of course they'd order a fasting blood sugar test. "No doctor, it could not possibly be diabetes. If I had diabetes, I would have been dead twenty years ago." When the tests came back normal, the doctor would lose all interest in talking to me, then refuse to investigate further. Just a few years ago an emergency room resident who I never personally met, but was a member of one of the other websites I frequent, diagnosed it as Psychogenic Polydipsia - "Thirst of the Mind" - which is an uncommon side effect of the medicine I take for my schizoaffective disorder.
- nolok 12y agoI'm the parent who said the story (although parent I answered to was also using fizzbuzz it seems, which shows just how real it is) . And I totally understand what you mean, in that before I ran interviews I would probably never have believed it myself. Truth is, I think a lot of people in this field are not "bad" or "stupid", they simply don't care. That's what struck me the first couple of times, not that they failed fizzbuzz or to understand how simple of a problem it's supposed to be, but that they don't even copy it. At first you think it's a couple of bad apples, then you think you're really bad at choosing interviewee, then you get that no matter what, almost half of the people you see shouldn't even be working in that field. Frankly, it might not be politically correct to say that but running interviews had to be one of the best thing of my career for my self esteem.
- MichaelCrawford 12y agoCaltech didn't offer any programming language courses at all when I majored in Physics there in the early eighties. One was expected to learn any required languages completely on one's own. I have only taken one CS class in my entire life, Caltech's CS 10, which is commonly taken by first year CS majors; I took it my second year. I found it quite puzzling that the CS majors were often stymied by the final project, which required us to write a full-featured GUI vector graphic editor. That was a tough project but I aced it. Many of the CS majors would go totally out of their minds trying to get their editors to work, but were unable to. When I entered the workforce after dropping out of school, I was quite concerned that the folks with CS degrees would eat my lunch, so I worked very, very hard to perfect my craft. However it was not long at all that I found that recent CS grads often knew very little about writing the kind of code that was required of coders in private industry. Consider that an algorithms class would teach all the common ways of sorting - quicksort, mergesort and so on. One is then expected to write a program that sorts an array of integers using quicksort, a second program that sorts the same array using mergesort, a third that uses insertion sort. None of these programs are very large. They're easy to debug. You're not expected to handle edge cases, like what would happen if someone unplugged the network cable while your program was running. In the kind of code that's sold for retail sale, or for eCommerce websites or what have you, you wouldn't be expected to implement quicksort, someone else would already have done that so you'd call a library function like the standard C library's qsort(). However what your code WOULD have to do, is handle all that nastiness like unplugged network cables. It's not that Computer Science schools could not teach that stuff. It's that they don't. Also, it's quite uncommon for CS students to collaborate on large projects. While I do know of it being done, it's uncommon. It would be very helpful, were CS students - at least occasionally - required to collaborate. Finally, many of the technologies which are of crucial importance to private industry, are of very, very little interest to CS professors. I learned all about what most refer to as "Game Physics" in my upper-division physics studies, but I can't imagine a CS instructor wanting to teach her class about how to do, say, ad syndication.
- wallflower 12y ago> It's not that Computer Science schools could not teach that stuff. It's that they don't. Yes, this is the classic Academics v. Industry gap you see everywhere. Teachers in an accredited program that leads to certification spend most of their time studying theory on psychology, child development, learning, and (now more than often) special education. When they get to the point where they actually have to go student teach, they have lots of knowledge but lack practical experience. As someone who has tried teaching and knows lots of teachers, classroom management is the foundation for everything that happens in a classroom. In the whole 'teaching more people to code' momentum, the problem is usually that there is some perverse incentive to give the impression that coding is 'easy'. Coding, as most of us know, is by far, 'not easy'. In fact, for many of us, that fractal difficulty is the draw. The whole movement of teaching CS in high schools baffles me because, again, CS does not teach one how to code. I would much rather see AP CS go away and be replaced by something that teaches Scratch and other tools as a stepping stone to teaching youth to think computationally.
- MichaelCrawford 12y agoI am commonly asked to reverse a C string. The first time I did that, I wrote out what I regarded as the obvious solution. The owner of the company pointed out that I had paid attention to performance. That had me puzzled - while I could see that there are lots of really slow ways to reverse C strings, I found it hard to believe that anyone would provide slow solutions to such a simple problem in a job interview. I got an offer the very next day. It was not long after that I discovered that many of that company's other coders were, while not actually clueless, just not very adept. Like they really would be challenged to write a fast C string reverser. At least I got the fizzbuzz test right. I've only been faced with that challenged just once, but three times now I've had to reverse strings.
- userbinator 12y agoI found it hard to believe that anyone would provide slow solutions to such a simple problem in a job interview. These sorts of overly complex solutions usually indicate someone who doesn't actually know how C strings work/how they're stored in memory. Reversing a string is one of the instances where these weaknesses show up. I've seen various people with degrees in CS who claim to have worked with lots of C do this problem, and it's almost amusing the volume and variety of code they can produce for such a simple problem. What should only involve two array indices or pointers in a loop can turn into something containing numerous malloc()s (often with no free()s), copious copying and moving of data around, recursion (this one isn't so bad), and I've even seen sprintf() make an appearance. However, none of this compares to one individual whose quite memorable solution involved creating a temporary file, writing the string into it, then executing an external command to reverse that file, and reading it back in. His reasoning was "because I don't want to reinvent the wheel." (Related article about std::string in C++: https://news.ycombinator.com/item?id=8704318 https://news.ycombinator.com/item?id=8704318)
- MichaelCrawford 12y agoFor C++ std::string, I might well code up an iterator adapter. :-D A while back I mentioned this on Kuro5hin. "K5" members are reknowned for being total jackasses. Some kuron told me that the correct solution was to call the C standard library function that reverses strings - "strrev()" or some such. His point was that one should never implement code from scratch, if one could use a library call. I pointed out that I was required to implement strrev() myself. My interviewer wasn't asking me to call a library function. This set off a flame war that lasted for hours. This compleat gentleman flatly refused to accept that there was any other correct solution than to call a library routine, despite that it was quite clear to me, when I interviewed, that I was not permited to.
- MichaelCrawford 12y agoI've interviewed at Google a few times. They don't ask the fizzbuzz test. Actually I was totally stymied. I regard it as poor form to post the questions I've been asked online. However I could describe them reasonably by saying that I was asked to design algorithms that would efficiently perform some computational task, with a very large input set, given a distributed system with a specific number of computers, disk drives and ethernet cards. By the time one is actually called in for an onsite at google, one has been through at least two, maybe three phone interviews. During one such interview, I was asked by Google's engineer what actually happened after the user clicked a certain button in a popular GUI program. I went on for twenty solid minutes - "Well there's a system call, which is typically implemented by calling some manner of illegal instruction, so there's a trap into the exception handling mechanism. The registers are saved on the stack, the CPU sets a flag to indicate that it is in supervisor mode, then a table is consulted to find the address of the function that actually implements the system call..." and then I went on about what happens in the kernel. Someone who didn't know how computers actually worked might say "When you click that button, the program saves your document."
- MichaelCrawford 12y agoQuite a serious problem I myself have - at least I'm willing to admit to it - is that when presented with any coding task at all, I start looking for ways to optimize it. That's lost me more than a few jobs. It's not that I can't write fizzbuzz. It's that I won't write anything at all because I'm trying to figure out a faster way to implement it than the obvious way. Here's a little exercise for you: give your candidates what you call the "fizzbuzz test", but instead of 2 and 3, use, say, 4 and 7. I bet quite a few candidates will write out the code for 2 and 3, because that's what they memorized before the interview, without understanding what the code actually does. Source code for fizzbuzz is all over the series of tubes these days, you see.
- MichaelCrawford 12y agoA couple of times I've had written tests, where I was given a pencil and paper, then left alone while I wrote out my answers. That worked really well both for me and for the interviewer. But I can only recall just two interviews that were conducted that way. In one of the tests, I was given the source to a C++ program and was asked to debug it. Note that I did not have a computer, only a hardcopy of the program source. That same test also gave me a hex dump of a network packet; I was required to reverse-engineer as much of the network protocol as I could. Another interviewer gave me a hardcopy that explained the assembly code of a hypothetical microprocessor - not one that actually existed, so I could not draw on previous knowledge of any specific processors. I was also supplied with the source of a program that was written in that same mythical CPU's assembler, with my requirement being to write down what it's output was. This last was actually quite difficult - I required several hours to come up with the program's output. I don't know whether I got the output correct, but I did get the job.
- ryanackley 12y agoIt was FizzBuzz.