4 ms·
Ask HN: Is this a bad interview question for an intern?
> There's a 50MB log file. Each line starts with ERROR, INFO, WARN or DEBUG, indicating what type of message was being logged. How would you figure out how many errors occurred? The technology you use is not important. We're just interested in the technique you would use.
(This is a simplified version of the kind of stuff we deal with on a daily basis)
Only one out of 4 managed to answer the problem in a satisfactory way ("count how many lines begin with the word ERROR"). The others seemed to be completely thrown by the fact that it was a 50MB log file. Is this just a bad question?
- drKarl 13y agoI guess that most of your candidates aren't familiar with GNU tools. Otherwise, they would trivially know to grep and wc -l.
- zimpenfish 13y agoPresumably they'd also know the -c flag to grep?
- arkestra 13y agoPerhaps people think the obvious answer is to count the lines, but because you throw the size of the file in, that this is somehow not feasible - and then they are trying to second-guess what you mean instead?
- Inception 13y agoI think it is an acceptable question. The size of the file is irrelevant and in my opinion a logical thinker should be able to decipher what is useful and irrelevant information in a given scenario.