Thread: Is this really true ?

  1. #1
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657

    Is this really true ?

    I was reading Coding Horror: Why Can't Programmers.. Program?
    And paragraphs similar to the following startled me quite a bit.
    So I set out to develop questions that can identify this kind of developer and came up with a class of questions I call "FizzBuzz Questions" named after a game children often play (or are made to play) in schools in the UK. An example of a Fizz-Buzz question is the following:
    Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
    Most good programmers should be able to write out on paper a program which does this in a under a couple of minutes. Want to know something scary? The majority of comp sci graduates can't. I've also seen self-proclaimed senior programmers take more than 10-15 minutes to write a solution.
    .
    ......
    A surprisingly large fraction of applicants, even those with masters' degrees and PhDs in computer science, fail during interviews when asked to carry out basic programming tasks. For example, I've personally interviewed graduates who can't answer "Write a loop that counts from 1 to 10" or "What's the number after F in hexadecimal?" Less trivially, I've interviewed many candidates who can't use recursion to solve a real problem. These are basic skills; anyone who lacks them probably hasn't done much programming.
    I mean... I've looked at the curriculum for most of the graduate level Computer Courses .... they seem quite 'advanced' and well rounded.
    Why would someone successfully passing those have trouble with such trivial problems?
    Last edited by manasij7479; 11-14-2011 at 07:30 AM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Well, I recall an anecdote related in A Degree in Brick Science:
    By far the worst was a woman who worked at the Software Engineering Institute. She was a brand-new hire from CMU, one of the top-rated computer science schools in the country, or perhaps the world. She had written

    Code:
    printf("The value is %d," value);
    and the compiler was giving her a syntax error. I spotted it (can you? Go take a look...) in seconds.

    So I said to her, "you transposed the comma and quote mark" and walked away. A few minutes later as I passed back she told me it still wouldn't compile. So I saw the same error, and said "You have to put the comma outside the quote mark". She looked at me, and in perfect sincerity said "But the comma always goes inside the quote mark!". I started to explain to her that no, it was a parameter separator and had to go outside the quote mark, and she interrupted me to insist the code was syntactically correct. Everyone knows the comma belongs inside the quote mark! Why, her English teachers had downgraded her text when she put the comma outside the quote mark!
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    probably because they copy/pasted code they found on the web, or on a forum such as this one, to complete their assignments, without actually understanding what they were doing. to be a good programmer, you have to really love it and devote yourself to it. I suspect that many people study computer science in university because they see the potential for making money, but they don't really care about the science and the art of programming.

  4. #4
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by Elkvis View Post
    probably because they copy/pasted code they found on the web, or on a forum such as this one, to complete their assignments, without actually understanding what they were doing
    I'd think that it'd take more problem-solving skill to cheat your way out of school than to solve these really simple problems !

    If any of you are currently in the academia, do you think this sort of problems exist in that region too ?

  5. #5
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I didn't go to school for CS, but it always sounds a little like doing a degree in music to me: the post secondary educational system has to recognize completion of secondary (aka. "high" or grade) school curriculum as qualifying a student to enroll in college or university.

    But as those of us who took music in high school know, completing grade 12 or 13 music probably indicates that you can read music and play an instrument, but not at a particularly high level, and says almost nothing about your knowledge of musical genres, history, etc. I'm pretty sure (via friends) that this leads to a situation in music departments at your average university whereby you have a mix of people who did complete high school music, but did nothing more, and people who may (or may not, if they can qualify another way) have done the same thing, but also took lessons outside of public school since they were eight, and/or grew up in a family of musicians and played with them since childhood, and/or played in bands, etc.

    This kind of compounds, because I think a lot of high school music teachers are actually people who did nothing more than finish high school (with music), then went to university and struggled a lot but graduated. So now they have an B.F.A., but they may or may not have actually done much playing outside of that. Obviously, they won't make a living as a professional artist...so they become, lol, high school music teachers.

    In Canada, an even more clear cut example of this is French, which is required everywhere in public school. However, all you need to qualify as a French teacher is a B.A. in French. You might think that a B.A. in French would indicate a high degree of fluency, but how much? Because you went to a university in Saskatchewan for 4 years, so that you could then teach French in your home town, where nobody speaks the language (outside of school) anyway? The net result is most Canadians have taken 5-10 years of public school education in French, but for a fact, most of us cannot speak or understand it at all. Sounds crazy, n'est pas? It is. A friend of my sisters, who just started out as a public school French teacher and got a job at an immersion school (where many of the students come from French speaking families) admitted that in fact, some of her grade six students clearly speak better French than she does -- but she is the the teacher with the B.A.

    So,
    1) AFAICT, "Computer Science" is actually not programming, altho programming may be involved. So a CS degree I guess may or may not indicate any proficiency. When I was in university in the mid 1990's, I had a couple of (fairly close) friends doing CS who were very smart people who did well, but they were very math and philosophy oriented (last I heard, one of them was a Professor at a US school in some neat-o multidisciplinary department of Linguistics, Math, and Neuroscience) and I don't recall then referring to programming at all; since I hung out with them a lot for most of our 4-5 years, I'm actually sure they did very little of it. I *think* that has changed substantially in the past decade, ie, that established CS departments have placed more and more significance on what was previously considered just an "applied art". But the academy (for good reasons IMO) cannot just turn itself inside out every quarter so...what it means to be a CS grad seems very ambiguous to me, programming wise.

    2) Assuming #1 is valid, and the analogy to music, I think today you will get all kinds of whizz kids wanting to do CS because they started programming when they were 12, and (as is obvious here on cprogramming.com) also all kinds of people who have essentially never done any programming at all.

    Even with music, I don't think you can study at a post-secondary level without being able to demonstrate a minimum level of proficiency actually playing an instrument. But I am sure you can start a CS degree without ever having written a line of code. In fact, I bet in theory you could qualify without ever having used a computer!

    Starting from nothing, and taking into account how much other stuff is involved in getting a degree, I don't believe it is possible to guarantee that your graduates are going to be experienced programmers. Of course, some of them will be. On the other hand, as I guess those Coding Horror stories relate, some of them will be essentially incompetent. Again, "Computer Science" is not synonymous with "programming".

    But this is all probably good for you, manasij7479 -- it should not be so hard for you to finish near the front of the pack in practical terms.
    Last edited by MK27; 11-14-2011 at 08:45 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  6. #6
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    seniors tend to take longer than juniors to write the same algorithm simply because they tend to get sidetracked by things like properly structuring code, beautifying their work, error handling, logging, etc. etc.. All of which are required for a stable, maintainable, solution but irrelevant to the actual core functionality.

    So I'm not surprised that more experienced people take longer than beginners at writing that code, they go about it like a production problem rather than a plaything.

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by jwenting
    seniors tend to take longer than juniors to write the same algorithm simply because they tend to get sidetracked by things like properly structuring code, beautifying their work, error handling, logging, etc. etc.. All of which are required for a stable, maintainable, solution but irrelevant to the actual core functionality.
    Take a look at the sample FizzBuzz question. If a candidate gets side tracked by those things such that he/she takes more than 15 minutes to come up with a solution, then that candidate probably chronically over-architects/over-designs the software he/she designs/implements. I probably would not want a senior on my team who has such a habit.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    The whole idea of "designing" fizzbuzz is stupid. I wouldn't want someone getting all elegant on me when I want to see them use a loop.

    At least I'm not responsible for hiring anyone, though.

  9. #9
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    Quote Originally Posted by laserlight View Post
    Take a look at the sample FizzBuzz question. If a candidate gets side tracked by those things such that he/she takes more than 15 minutes to come up with a solution, then that candidate probably chronically over-architects/over-designs the software he/she designs/implements. I probably would not want a senior on my team who has such a habit.
    the sample question doesn't state what the requirements are re. performance, security, etc., only what the end result should be.

    If someone's incapable of explaining in 10-15 minutes how to go about implementing the basic algorithm then yes, you don't want him.
    If he assumes the need for a modicum of the things professionally written software should have which causes him to require more than 15 minutes to type in a working solution, I don't blame him.

    caveat: I've failed a job interview several times for implementing such things correctly without all such niceties as logging and error handling, despite the requirements handed never mentioning the need for that...

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by manasij7479 View Post
    I'd think that it'd take more problem-solving skill to cheat your way out of school than to solve these really simple problems !

    If any of you are currently in the academia, do you think this sort of problems exist in that region too ?
    These problems exist world wide... people mistake "getting high marks" for "understanding the course material" and they are not the same thing.

    I could probably go back to university right now and get a degree in something simply by pulling answers to assignments off the web... but will I have actually learned anything? (except how to cheat)

    This world has changed, rather a lot, in some very crucial areas...

    When I was in school in the 60s and 70s we studied from books, handed in typed or handwritten assignments, there was no web and we were more than happy to do the work. The goal was to *learn*... high marks were a benefitial side effect of that process.

    Talk to the average student now, only 40 years later, and the only thing they really care about are their final grades. Learning has become a side effect of the grades they get. With the internet any darned fool can score a mid-range grade just by re-editing someone else's homework or mechanically translating an essay from a foreign language... they know it and they use it because it's no longer about knowing the subject matter, it's a competition to get high grades.

    You can find strong parallels to this in sports... When I played baseball, my father never asked me how many runs I scored. He would ask it I had fun playing on the team. Now my grandkids are playing baseball and the only thing their fathers are asking is "How many runs did you score"... often berating them if they don't.

    We no longer value the journey... only the score card matters... and we do that at our own peril.


    Second to this is the continual pressure teachers come under to produce high scoring graduate classes. Do they teach more carefully or make extra time to help their students? Nope, they simplify the curriculum so that more people can score a higher grade. Totally results oriented.

    When I was still working, I watched as the "quality" (read: "skill level") of potential technicians went from people we could employ with little or no specific training outside our own product lines to people we would have to teach even the most fundimental skills, such as using a volt meter and soldering. All were selected from a pool of Technical College grads... Yes, educational standards have slipped that much!


    We will pay for this, and rather soon I expect. As more and more incompetence gets into the workplace the calamities these people cause will get bigger and bigger. The recent outages at Sony and RIM are warnings of things to come. Both were essentially the result of underskilled and undermotivated people getting themselves into positions where their lack of in-depth knowledge caused nasty problems... Just wait till the bank computers start failing or some major control system goes awry because of incompetent maintenance.

    Just wait till we discover that nobody knows how to (or wants to) fix things anymore... We are already in a situation where 90% of the functioning aparatus in the world is understood by only 1 or 2 percent of the population and that will only get worse over time.

    That old StarTrek episode where they need to steal a brain to run the machines may just turn out to be a warning...

  11. #11
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by jwenting View Post
    If someone's incapable of explaining in 10-15 minutes how to go about implementing the basic algorithm then yes, you don't want him.
    If he assumes the need for a modicum of the things professionally written software should have which causes him to require more than 15 minutes to type in a working solution, I don't blame him.
    Around here, we use a special kind of placeholder for that stuff in examples instead of actually writing it:

    Code:
    #include "Starship.h"
    Starship.h presumably includes all the enterprise code.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  12. #12
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by jwenting View Post
    the sample question doesn't state what the requirements are re. performance, security, etc., only what the end result should be.

    If someone's incapable of explaining in 10-15 minutes how to go about implementing the basic algorithm then yes, you don't want him.
    If he assumes the need for a modicum of the things professionally written software should have which causes him to require more than 15 minutes to type in a working solution, I don't blame him.

    caveat: I've failed a job interview several times for implementing such things correctly without all such niceties as logging and error handling, despite the requirements handed never mentioning the need for that...
    A couple of years back I saw a story on a website about a hiring competition. The employer was looking for a "cut to the chase" kind of guy to do troubleshooting work in one of their major departments. They asked only 3 questions... (Play fair here, do the quiz yourself before scrolling down to the answers...)
    We are looking for someone with keen logical skills who can "cut to the chase" when fixing problems.

    1) How do you put an elephant in your refrigerator?
    2) How do you put a giraffe in your refrigerator?
    3) How do you put an elephant and a giraffe in your refrigerator?
    (Answers below... but no cheating.)


























    1) How do you put an elephant in your refrigerator?
    A: You open the door put in the elephant and close the door.

    2) How do you put a giraffe in your refrigerator?
    A: You open the door, take out the elephant, put in the giraffe and close the door.

    3) How to you put an elephant and a giraffe in your refrigerator?
    A: You open the door, put in the elephant and close the door.


    Of something like 1500 applicants only 1 person got it right and he got the job.
    If I recall correctly most of the answers ranged from "You can't refrigerators aren't big enough" to complex designs for high capacity refrigerated rooms all the way to one idiot who described how to butcher an elephant... All but 1 missed three crucial facts... 1) The size of the refrigerator is not specified, 2) the size of the animals is not specified and 3) nobody actually said the refrigerator had to work.
    Last edited by CommonTater; 11-15-2011 at 11:23 AM.

  13. #13
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by CommonTater View Post
    1) How do you put an elephant in your refrigerator?
    A: You open the door put in the elephant and close the door.

    2) How do you put a giraffe in your refrigerator?
    A: You open the door, take out the elephant, put in the giraffe and close the door.

    3) How to you put an elephant and a giraffe in your refrigerator?
    A: You open the door, put in the giraffe and close the door.
    That's a neat idea. However I feel the need to object. It's flawed for at least 2 reasons, it was never specified that the refrigerator has a "door" (and considering the lack of mentioned size is valid, I imagine this point would be, too), and more importantly, it also never specified that these actions occur in a sequence.
    So, the correct answers should be along the lines of:
    1) Place it in the refrigerator.
    2) Place it in the refrigerator.
    3) Place them both in the refrigerator.

  14. #14
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    The employer was looking for a "cut to the chase" kind of guy to do troubleshooting work in one of their major departments.
    That sounds about as legitimate as the "Google Questions".

    I do like those kinds of questions for a "readiness" test though. Take the elephant question for example, a person who says "Put the elephant in the refrigerator." is clearly unsuitable to code for embedded systems.

    Soma

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by CommonTater
    A couple of years back I saw a story on a website about a hiring competition. The employer was looking for a "cut to the chase" kind of guy to do troubleshooting work in one of their major departments. They asked only 3 questions...
    I have heard this story in different forms. It could well just be a "think out of the box" quiz turned into urban legend of a hiring competition. In any case, this reminds me of Joel Spolsky's The Guerrilla Guide to Interviewing (version 3.0) where he recommends:
    Finally, avoid brain teaser questions like the one where you have to arrange 6 equal length sticks to make exactly 4 identical perfect triangles. Or anything involving pirates, marbles, and secret codes. Most of these are “Aha!” questions—the kind of question where either you know the answer or you don’t. With these questions knowing the answer just means you heard that brain teaser before. So as an interviewer, you don’t get any information about “smart/get things done” by figuring out if they happen to make a particular mental leap.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. x = x < y < 2; WHY IS THIS ALWAYS TRUE!?
    By sh4k3 in forum C Programming
    Replies: 5
    Last Post: 06-08-2007, 01:00 AM
  2. Is this true about Dev-C++?
    By RealityFusion in forum Tech Board
    Replies: 7
    Last Post: 08-22-2003, 03:40 PM
  3. Is it true that...
    By Shadow12345 in forum C# Programming
    Replies: 4
    Last Post: 09-15-2002, 11:52 PM
  4. is it true
    By Klinerr1 in forum C++ Programming
    Replies: 3
    Last Post: 07-16-2002, 02:21 AM