4 ms·
In short, it takes a longer time to read code than to write a simple snippet. Because you may not know the syntactic sugar syntaxes while being an expert at th
by fendy3002 5y ago
In short, it takes a longer time to read code than to write a simple snippet.
Because you may not know the syntactic sugar syntaxes while being an expert at the language / field. They also may not know libraries that's been used by the code without researching beforehand.
OTOH, stripping the code to read from libraries and syntatic sugar syntaxes will reduce the code quality and sometimes making it harder to read / maintain. It doesn't reflect your tech stack in the company.
While writing code will guarantee that it's something the interviewee knows, with tolerable typo and syntaxes, and IMO it's more suitable for the interviewer to ask for written code than vice versa.