Sounds too good to be true, huh?
One of my programmers is cool enough to request a code review with me when something critical is at stake. I can’t really read code and he knows it. So why does he keep suggesting we do code reviews?
He realizes said activity will force him to explain his code at a translated-to-layman-terms-level. Occasionally, I’ll ask questions; “Why do you need that statement?”, “What if the code flow takes an unexpected path?”. But often I start to daydream…not about my weekend or other non-work things but about a previous statement the programmer made. My brain gets hung up trying to grok the code. And while I’m lost in thought, the programmer keeps zooming through their code, until…
…all of a sudden, the magic happens.
The programmer says, “Hold on…I see a mistake”. It happens every time! I kid you not! A different programmer on my team found two errors while explaining his unit tests to me Monday.
Now I’m not suggesting testers should daydream their way through code reviews. And of course, a tester capable of actually reading/understanding code is more valuable here. But I am suggesting this:
If you’re a tester who feels too uncomfortable or inadequate to perform a code review with your programmers, remember, all you have to do is listen and occasionally ask dumb questions. And even if you’re bored to death looking at someone’s code, and you fall into a daydream, who knows? You may have indirectly helped your programmer save the world.