3 ms·
Compilers don't just catch syntax errors though - they also show up logic errors, that may be too subtle to see on a whiteboard. That's true even with very simp
by YeGoblynQueenne 11y ago
Compilers don't just catch syntax errors though - they also show up logic errors, that may be too subtle to see on a whiteboard. That's true even with very simple programs.
You can definitely step through your program by hand and follow the logic etc, and you should totally be able to do that, but most programmers will not be in the habit of doing this. And neither should they, because it's slow, tedious and error-prone to hand-simulate your algorithms, or even just your for-loops. Not to mention recursive, or larger stuff.
I guess what I'm saying is that programmers are used to "lean on the compiler" and you don't have that on a whiteboard exercise, so it's a bit artificial.
[Full disclosure: I'm in the habit of hand-simming my stuff especially in the last year where I've been developing a grammar induction algorithm, so I'm not worried that I'll have to stand on a whiteboard and not know how to step through a loop, but I still think it's not very useful to make people do that).