A
a24900
My boss just told me a concept I didn't know. (I am middle level Java
programmer.) -- "code review".
How did you manage to become a programmer without knowing that? A NASA
study from 1987 (yes, the idea is old and established) found that one
finds twice as much faults this way compared to testing. Other, later
sources have found an advantage of 20:1 or 33:1 in time spend on
finding and fixing faults ( which might be exaggerated).
According to what I heard, "code review" is somebody reads the thousands
lines of code written by other person
There is a difference between a code-monkey and a real programmer.
The average amount of code a real programmer writes is in the hundreds
of lines per month. That is average, and assumes thorough research of
the problem to solve, thought-out hand-written code, and code
documentation in an non-trivial field of work in a corporate
environment. I am not talking about endless copy-paste junk. It
further assumes tests are counted separately.
errors (logic errors, I guess, since the code at least can be compiled
and run).
Or, like, for example, multi threading errors? Potential performance
or scaling problems? Potential access right problems? Potential
deployment problems? Resource conflict problems?
And of course the biggies, too. Like misunderstanding or
misinterpreting of specification. Plus the human component, e,g,
weeding out slackers who didn't report their progress accurately, and
are of course behind schedule. Or fakers who can't code at all but got
the job with a faked CV.
I feel this is crazy!!!
Programmers who don't want that other programmers look at their code
usually have something to hide. Real programmers typically like to
show their code to demonstrate their competence and get
acknowledgments from their peers.
Since the reviewer has to "read" the original
code author's mind
No, the reviewer has to read the specification.
and make sure the code does what the author wants
No, makes sure the code does what the specification says.
and no hidden surprises! How this could be possible?! This would be
extremely time consuming and nobody knows better about the code than the
author.
If the author is the only one capable of understanding and handling
the code then the code has no long-term value. If the code is
unreadable or incomprehensible for others, it has a major fault, it is
unmaintainable. Code reviews are already valuable if all they could do
was to guard against unmaintainable code.
My boss says this is very common practice in software engineer development.
Your boss has a clue. A rare event in some corporate environments.
Consider listen to him, there are much worse bosses out there.