There's nothing inherently wrong with not being able to write code, but you probably shouldn't be applying for software engineering roles where the main responsibility of the job is ultimately to write working code.
While my career involves writing code, I am not a SWE, I have never done any formal leetcode prep, and I have no formal education in technology beyond a high school CS class. I have no college degree whatsoever, not even an associate's degree.
I had a rule I stuck to when doing these interviews (which were for a SWE role) that felt very fair to me - I would not give these candidates any problem I couldn't solve in the same circumstances.
For reference, in the allotted time, one such candidate spent a good chunk of their time reading up on JS if/then syntax on w3schools. As I watched, I reminded them they could use any language they wanted, if they were more comfortable or familiar with others, and this Harvard CS grad declined, stating JS was their "strongest" language.
My best guess about these cases were rich kids / legacy admissions that weren't allowed to be failed for political reasons.
Don’t get me wrong, we don’t have much of a choice in evaluating especially junior hires. Even for senior hires you want to make sure they haven’t drifted through their last jobs without actually coding. But on the spot performances are different even for the simple stuff, they should practice coding questions on the fly regardless, and even the worst possible SWE candidate should be able to pass these with a bit of prep. With a lot of prep they could do leetcode, a still suck at the job when they get it.
1. Output the numbers from 1 to 100
2. If the number is a multiple of 3, write Fizz instead of the number
3. If the number is a multiple of 5, write Buzz instead of the number
4. If the number is a multiple of 3 and 5, write FizzBuzz instead of the number
Does that really sound like something requiring special practice and preparation? Assuming a decent interviewer would help out with the modulo operator if that was unfamiliar
FizzBuzz, reversing a sentence -- this is programming your way out of a wet paper bag, not elite and esoteric skills that need advanced study and cramming
String.Join(" ",
String.Split(" ", sentence).Reverse()))If I ask that of a senior candidate, it’s because I got a whiff of “this candidate might not be able to code at all, and I’d like to save us both some time and frustration.”
And that’s for someone with only a 50/50 success rate at summing an array of integers. Do you want to hire someone for a software role who is an underdog to be able to sum an array of ints?
The beauty is, even a simple exercise answered quickly like "sum of integers" provides ample opportunity to learn a lot about how they think.
Start digging in to testability, requirement changes, etc. Change it to a rolling sum (producing a sequence instead of a single value). Do they use an array or an iterator? Do they output straight to the console, or produce an actual function? Could the numbers come from other sources (database, queue, etc)? What might the tradeoffs be? If there's something they are unfamiliar with, are they quick on the uptake if you explain it? And so on.