First of all, I am doubtful that the premise of this question is true. If MOST people who got their BS in Computer Science are unable to pass coding interviews, then you would assume most people with a BS in Computer Science are unemployed or working at Walmart or something…
That does not seem to be the case.
Without statistics, it’s impossible to know how close to true the premise is, but at the very least, it’s a hyperbole. Interestingly, almost none of the other answers point that out, which would indicate that there is at least a widespread common sentiment that recent CS graduates are having a hard time with their coding interviews.
So in my answer, I will attempt to address the cause of the sentiment — which I conjecture to mainly be misaligned expectations.
I’ll start with what should be obvious. There is very nearly an infinite amount of knowledge in the combined worlds of academic computer science and professional software development, and you’re never going to meet anyone who knows everything.
You would think this would lead to a bit of humbleness in the field. But instead, I see a lot of macho arrogance everywhere. We are a culture of grand shamans that define ourselves by what we know that other people don’t know. And every company wants to believe that they only hire the best shamans — not only that, but the survival of the company depends on having the best shamans, regardless of whether the company is Google or writing some generic CRUD apps.
With that kind of attitude, it’s no surprise that perfectly trained people sometimes fail the shaman interview process.
Let’s say you’re the interviewer. You probably know something I don’t know, since we already established that no one knows everything and there are so many different things one could possibly know. If this comes up during the interview process, you might decide that I’m not a good enough shaman to work for the company. Because obviously, you’re a great shaman since you already work for the company, and what makes you a great shaman is that you know stuff that half of the people you interview don’t know…right?
But let’s flip the table, so now I’m the interviewer. And you see, I also know some stuff that you don’t know. So there’s a good chance you would fail my interview. So if we would both fail each other’s interviews, who is the better shaman?
The point I’m making is that a lot of what decides how well you do in a technical interview is how closely your individual strengths happen to align with the person who interviews you.
Are the strengths of someone who has worked professionally in software development for 20 years going to be very different from someone who just finished a bachelors in CS?
Undoubtedly! It’s a bit like asking if someone who just finished medical school has the same strengths as someone who has been a practicing doctor for 20 years.
The way school generally works is you get tons of concepts crammed in your tiny noggin. Computer Science is no different in that regard. While the university can’t possibly teach everything there is to know about computer science in four years, it tries to teach as many concepts as possible during that time period.
From what I’ve seen, most industry jobs utilize a much smaller concept inventory, on a regular basis. And because it’s a small concept inventory, it’s easy to master, because essentially every day on your job, you’re drilling yourself in those concepts — for years, maybe even decades.
School is different. In school, you have to learn a whole bunch of concepts very quickly, and then cram them in your head for an exam or to complete a big project. As soon as that’s over, you have to learn a whole bunch of new concepts.
The problem with this kind of high flow pressure-cooker education system — and it’s a problem in all academic settings, not just the field of CS — is that while students are forced to learn things quickly, they are prone to forgetting things as quickly as they learn them. It’s quite possible for a student to earn an ‘A’ on an exam, and then forget the material they studied a year later. As new material gets crammed in your head, you tend to forget old material. This seems to be exacerbated by sleep loss, which is very common for people studying CS and other “hard majors” in college. And to make matters worse, CS tends to be taught in a disjointed way, where the concepts being taught seem arbitrary, and the big picture about their importance doesn’t become clear until much later.
So it shouldn’t be surprising that a CS student won’t remember everything they were taught. Some will retain more than others, and some may unfortunately forget an important concept that seems very basic (or they may have never learned it properly in the first place, because the instructor may have incorrectly assumed that the concept was so basic, everyone understood it in 5 minutes).
But while some people might view this as an indictment of the whole education system itself, I prefer to see the glass as half full rather than empty. These are the strengths of a CS graduate:
Unfortunately, neither of these strengths is evaluated by your typical “coding interview”.
If all you’ve been doing for your job is programming in C++ for the last 20 years, and you expect your recent college grad interviewees to automatically be even half as good as you are at programming in C++, prepare to be disappointed.
But you should also prepare to be humbled, because they may have also learned a whole bunch of stuff that you never learned in 20 years.
And the education system isn’t perfect. It’s possible that with all that these busy students had to cram in school, they might have gotten a slight misunderstanding about how pointers work or how objects inherit from each other. Since you’re the C++ shaman, that’s totally unacceptable, right? How dare they not understand such basic concepts. They totally deserve to fail the interview — even though these misunderstandings could probably be corrected with less than a day of training.
Of course, we could change the education system so that instead of trying to teach hundreds of new concepts to the students, they only work with a small chosen inventory of concepts day-in and day-out — like just having them practice writing code in C++ for 4 years, while teaching them nothing else…
But somehow, that doesn’t seem worth it. First of all, even 4 years of nothing but non-stop C++ programming isn’t going to make them the C++ shaman you desire. Second, it’s a complete waste of tuition to not use the class time to teach new material, but instead just have them practice the same thing over and over again for years. That would certainly make the instructor’s life much easier, because the students don’t actually need an instructor for that…
Which brings me to my final point. Does it really make sense to expect a new CS grad to have the equivalent of a decade of programming experience to be eligible to work an entry-level job at your company?
Sure, some may have close to that experience. Some started coding before college, and maybe were still practicing coding every weekend and every summer while in college, all while doing what most people consider as a very stressful and time consuming major.
But as an expectation, it seems unrealistic to me. In no other field are you expected to work for 10 years BEFORE you can start collecting paychecks.
What would happen if we required all doctors to have 10 years of practice with patients, before they could get paid? Answer: there would be no doctors. In order to have a steady flow of doctors, some patients have to be the guinea pigs and help pay the salaries of young new inexperience doctors.
The same thing applies to code shamans. Some company has to invest in these young inexperienced CS graduates, and let them make a living gaining the practice needed to actually become an expert code shaman. Or else you won’t have that many expert code shamans.