

Ask HN: Do all CS graduates know how to program a for loop? - tokenadult

The current thread about getting a job without a CS degree reminds me to ask this question. The other day, I related in a Hacker News comment a story I heard this summer about a phone screen for hiring a programmer. A reply I received here on Hacker News indicated that the HN participant replying thought that the story was incredible. The story was believable to me, so I thought I should get a reality check here. The hiring supervisor who told me this story is the lead programmer for a company that uses Web back-end programming to serve up online, adaptive lessons. He has a position open for a new programmer as the company's business grows. He has advertised in the expected places like Stack Overflow and Joel on Software. During the year 2012, the company has received many resumes. Applicants who have computer science degrees, and especially the many applicants who have master's degrees and who otherwise look all right, are invited to do a phone screen in preparation for an in-person interview. During the phone screen, the applicants log into an application that allows them to type on their own PC to write code that can be seen by the hiring supervisor. The test the hiring supervisor uses is "Write a program using a for loop to print the integers from 1 to 100." Applicants are permitted to use any language they please, and the supervisor said he would even consider correct pseudocode a successful answer. He has not yet had ANY applicant, not even one, submit a flawless working program to do that. Not one. He was eager to interview an applicant who got the test MOSTLY correct, after seeing many applicants fail to do it at all.<p>Have you ever hired with a simple screening process like this? Are there indeed a lot of CS graduates who could not "Write a program using a for loop to print the integers from 1 to 100"?
======
bartonfink
Just to be clear, token - does the supervisor have anything up his sleeve with
"flawless?" The story that it took years, for example, to produce a "flawless"
binary search isn't as stupefying when you consider that many of the flaws
dealt with things like integer overflow and floating point precision. If this
guy wants this to work on a 4-bit microcontroller, for example, getting to 100
is going to be significantly trickier than what many would consider a
straightforward problem.

~~~
tokenadult
Thank you for asking the clarifying question. The hiring supervisor is just
looking for a straightforward implementation of the problem specification. He
showed me the C code that is the example in his mind of a correct C program.
He was presenting this problem over dinner at a summer mathematics program

<http://www.epsiloncamp.org/>

where some counselors for the program, and even some STUDENTS who were of
elementary school age were able to provide solutions he deemed correct. (He
accepted as correct one student's Python program, noting that he doesn't know
the details of Python, and I think the student's Python program would actually
only print from 1 to 99, because of how Python indexes. But that would still
be considered very well done in the hiring screen.) One of the counselors
reproduced his model C code on the spot, taking less than three minutes to
write it down with pencil and paper.

AFTER EDIT: Responding to the second-submitted top-level comment,

<http://news.ycombinator.com/item?id=4603819>

 _How could it be that one place is asking for that and turning him down with
a working solution while another place is so desperate they just require a
for-loop?_

I think what is going on in the story I heard being contrary to the stories
you hear is that there are several echelons of jobs, and several echelons of
computer science departments. The young hacker I know best had a work-sample
test for an in-person interview in which the problem specification was, "Write
code to implement a four-function calculator." He didn't have any problem with
that, and thought the problem was easy. He also has NOT completed a degree in
computer science, although he was pursuing one before he entered full-time
employment at a different startup with a different hiring process. He is not
afraid of work-sample tests, not at all. But he would (currently) be screened
out of contention by requirements to possess a degree, which he does not yet
have.

Some other workplaces, perhaps places to get a steady job (and, crucially,
visa status to remain in the United States), may get a lot of applicants who
have actual earned CS degrees, but who have never acquired much independent
coding ability. This is an empirical question, and the question I am trying to
get a reality check on here. If you asked the EASY question asked by the
hiring supervisor who told me his story to every CS grad who approaches you
for a job, from any college and of any current visa status, are you sure that
all without exception could pass that rather relaxed coding test?

------
helen842000
I tend to agree. I didn't actually learn much about development until I did it
in my own time a few years after my CS degree. My University had distinct
coding courses for Software Programming & Development instead.

I think a lot of hiring managers presume CS degree = proficient coder and
that's certainly not the case.

Unless languages, projects & specific mention of coding is included on a
resume then coding ability could easily be zero.

------
27182818284
I don't think so.

This is anecdotal, obviously, but the talk of fizzbuzz and for-loop is all
myth to myself and friends. I'm very skeptical of all of the for-loop or
fizzbuzz programming exercises. Additionally the recent CS graduate I knew had
to do things like implement
<http://en.wikipedia.org/wiki/Levenshtein_distance> and such which makes me
doubt the validity of these more. How could it be that one place is asking for
that and turning him down with a working solution while another place is so
desperate they just require a for-loop? Something doesn't feel correct.

