Ask HN: Is this a bad interview question for an intern?

2 points by ilitirit ↗ HN
> 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?

4 comments

[ 2.7 ms ] story [ 17.6 ms ] thread
I guess that most of your candidates aren't familiar with GNU tools. Otherwise, they would trivially know to grep and wc -l.
Presumably they'd also know the -c flag to grep?
Perhaps 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?
I 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.