I'd argue the premise that anyone can code. Yes anyone can type what they saw in a book or online, but not nearly as many can comprehend what they typed and understand what they are doing and the implications of it long term.
Second to that, technology interviews overall are STILL broken. I really don't give a shit if you know the Big O for a specific algorithm, I care if you know when you would use certain data structures/algorithms and not others. I care if you can work in a team and participate and have a passion to learn.
So I, long ago, dropped doing the whos smarter interviews and went to a method that let's me ask you real world scenarios and see how you think through them. Because in the end that's what we do daily. So I'll ask questions for real problems we have faced and solved and see how you would approach them to see how you think. I don't care if your answer is the same as what we did, I care that you can defend your answer and participate in healthy non-conflict debate because that's how we find the right answer. I also don't sit there and ask you to whiteboard an efficient for loop to reverse a string or take your pick on other stupid questions. That isn't to say I won't ask specific coding type questions, but I don't care about you solving some stupid problem on the spot. I do care if you know the content and can apply techniques to solve the problem, because if you have those two things, you can figure the rest out effectively.
Oh and I will never send you a problem and ask you to code something for me, even paid. That is the ultimate of lazy and disrespectful IMO. To me it is like saying, you are not worth my time, but if you can pass this test I MIGHT bother talking to you, but no guarantees.
An alternative I feel is respectful and fair is during an interview, I might present you with some code and ask you to do a code review on it. I am not asking you to do "work" for free but I am seeing how you will look and think through code, plus I will gain far more from being able to ask you questions and see how you think than sending you home with some problem where I have no insight to your thought process.
Anyone can code - a little. People that can do it well, day after day and year after year, are much rarer than "people who can code", though.
More: You probably don't want to hire "someone who can code". You probably want to hire a software engineer - someone who can understand requirements, write code that works, debug well, run a profiler, find memory leaks, understand other peoples' code, give (at least somewhat) accurate estimates, work well with others, not break working features, test thoroughly... You want a lot more than "someone who can code".
* Even though anyone can learn to code, not everyone can code already
* People get nervous in interview settings and there are many reasons why you might fail a coding interview despite being good at coding
* People who tend to not pass interviews end up doing more interviews than people who do pass them, skewing interview stats (everyone thinks they are hiring the best, but that can’t be universally true)
Companies always interview a handful of candidates for each opening, so it feels like hardly anyone is passing because for each job, 1/7 gets it. On top of that just coding isn’t enough, you have to stand out so they can unambiguously say you’re the best. So you need soft skills and whiteboard skills as well.
So if they only hire the best 1/7, why do so many people say there are not enough coders on the job market and the demand is high? Why don't they just hire good coders too, not only the very best?
Coders are not interchangeable. You're a hot web programmer? Congratulations, you're not even considered for my job - I'm in embedded systems. You probably can't get hired to do deep learning, or Android programming. And the reverse is also true! There's all these programmers, and all these jobs, but nobody wants a generic coder. They want someone who can do the specific job that they have, or at least learn it quickly. When you're looking for a programmer, there aren't enough of the kind you want looking for work.
And then there's supply and demand. Good programmers are in limited supply at the moment. (Perhaps we could train more, but it's going to take time. At the moment, the supply we have is limited.) The demand is there, so the price rises until the supply and demand meet. That happens when some of those who want programmers get priced out of the market. To those firms, there's a shortage. That is, there's a shortage at the price they can afford to pay. But since they're the firms that would derive less value from those programmers, it's appropriate that they be the ones priced out. And if we had more (but not unlimited) programmers, we'd still have the same problem - there would be someone priced out who was complaining that there was a shortage of programmers, because they couldn't hire anyone at the price they could afford. When supply is limited, someone always gets priced out. To them, it looks like a shortage. But it's just a shortage at their price, not a shortage in general.
(There's also another problem: Programmers get paid really well. If you can fake it, and there's one company that you can fool, then you can get paid really well. That's a strong motivation to, shall we say, exaggerate your abilities. This leads to a number of "programmers" looking for work who can't program very well at all.)
Imagine you have 8 companies, each with one open position and different job requirements, and 7 coders who each apply to all 8 open positions and who each have different expertise. Every company extends an offer to the candidate who is best for them. No company hires more than 1/7th of the applicants, and every company hires only the best, yet at the same time there are not enough coders to go around.
Of course at the same time, the companies getting flooded with more applicants than they can hope to process are not the same companies struggling to fill positions, and the coders struggling through interviews are not applying to the jobs that will take anyone with a pulse.
Well, I think you've got to realise a few things here:
1. While almost anyone can learn to code, it takes time to learn how to code well, and someone who's just starting out will obviously struggle to pass interviews. I mean, would you hire someone who picked up a book about Python two days ago and just learnt how to write a loop?
2. There is a huge difference in the level of skill required by different companies. Many people who apply for coding jobs will be above average for some opportunities, below average for others and average for others still. Is your average CMS theme developer likely to get a job at Google?
3. People's perceptions of their abilities vary wildly. A lot of the time, they'll go for jobs well above their skill level on the off chance they'll get it, and this happens for everyone from complete beginners to actual expert programmers. They may be able to pass an interview and become a programmer at a company, it just won't be for the type of company they're applying to.
4. Just because anyone can code doesn't mean everyone can code right now. Does that stop them applying for jobs? Not really. But it sure makes it unlikely they'll get said jobs.
In other words, there are quite a few factors here, even assuming being able to learn to code is a universal human trait.
Edit: A few more
5. Some people get nervous or fall apart in interviews, hurting their chances.
6. Culture fit is important for quite a few organisations, and there'll be candidates turned down because their priorities differ from those of the people already there.
7. Interview questions often don't actually judge someone's programming skill. Many companies end up relying on Google esque logic puzzle bullshit that has no real effect on anything.
8. The skillset required for passing interviews is different from the one required for doing the work.
9. Sometimes personal issues get in the way of a good interview or opportunity. Perhaps the interviewer was having a bad day, or the interviewee misunderstood the question. Or the boss/other employees were racist/sexist/classist/agist/whatever or had a personal dislike of the candidate based on first impressions.
If you have some extra contracts that you don't have the capacity to complete and could use some extra hands, let me know. I would love to lend a hand and get some hands-on experience with what you do. You could pay me $100 and keep the $400 an hour for training me. If you want to discuss this further, my email is in my profile.
Second to that, technology interviews overall are STILL broken. I really don't give a shit if you know the Big O for a specific algorithm, I care if you know when you would use certain data structures/algorithms and not others. I care if you can work in a team and participate and have a passion to learn.
So I, long ago, dropped doing the whos smarter interviews and went to a method that let's me ask you real world scenarios and see how you think through them. Because in the end that's what we do daily. So I'll ask questions for real problems we have faced and solved and see how you would approach them to see how you think. I don't care if your answer is the same as what we did, I care that you can defend your answer and participate in healthy non-conflict debate because that's how we find the right answer. I also don't sit there and ask you to whiteboard an efficient for loop to reverse a string or take your pick on other stupid questions. That isn't to say I won't ask specific coding type questions, but I don't care about you solving some stupid problem on the spot. I do care if you know the content and can apply techniques to solve the problem, because if you have those two things, you can figure the rest out effectively.
Oh and I will never send you a problem and ask you to code something for me, even paid. That is the ultimate of lazy and disrespectful IMO. To me it is like saying, you are not worth my time, but if you can pass this test I MIGHT bother talking to you, but no guarantees.
An alternative I feel is respectful and fair is during an interview, I might present you with some code and ask you to do a code review on it. I am not asking you to do "work" for free but I am seeing how you will look and think through code, plus I will gain far more from being able to ask you questions and see how you think than sending you home with some problem where I have no insight to your thought process.