Why does being a good coder preclude code reviews? Even experts make mistakes and even when there are no mistakes an outside perspective can often be useful. People think in different ways and may have something to add even if you are all really good programmers.
The kind of mistakes that good programmers make are not normally caught in code reviews. That's pretty much the definition of a good programmer; their mistakes are rare and subtle.
> The kind of mistakes that good programmers make are not normally caught in code reviews. That's pretty much the definition of a good programmer; their mistakes are rare and subtle.
I think the opposite is true. Good programmers know where the risks of subtle bugs are, and will use the appropriate tools (e.g. good use of a decent type system, well documented code with well designed abstractions) to make completely sure they don't exist.
This just leaves simple stupid bugs in the parts of the code where any such bug will manifest itself quickly and obviously, exactly the kind of thing caught by code review.
Another way to put it would be: good programmers design their code in such a way that all bugs are catchable by code review.
> The kind of mistakes that good programmers make are not normally caught in code reviews. That's pretty much the definition of a good programmer; their mistakes are rare and subtle.
That's just arrogance. Good programmers make stupid mistakes all the time as well. It's the ability to recognize and fix such mistakes that separate "good" programmers from "normal" programmers and that's precisely where code review comes in.
That article is misleading -- it's really about C++, not C, and isn't really relevant to the Go compilers (which are written in C). I have Coders at Work and I think Ken Thompson was exaggerating a bit for the humor of it.
There is a "readability" process for C++, which is the thing he says he never got. Not much code is written in plain C -- the Go compilers would be an exception.
If I recall correctly, the book Coders at Work also talks a bit how the some of the Go/Plan 9 guys sat near to Bjarne while he was developing C++ at Bell Labs. They are not really fans :)
> Did he? I was under the impression he wasn't approved to write C at Google when Go was initially being developed.
It's not that strict.
Google has a big source repository which holds essentially all applications which run on Google's production machines. (They share a lot of library code.) In this repository, code written in any of several languages must have been written or approved by someone who has "readability" in that language. There's no C readability, but C++ readability applies to files ending in .cc or .h. (Not sure about .c.) There's no shortage of people around with C++ readability, so Ken wouldn't have had a hard time getting anything approved. He also could have easily gotten readability if he wanted it.
This process wouldn't necessarily apply at all to separate git/Mercurial repositories used by open source things like Go.
Interviewer: Was there any concept of looking at each other's code or doing code reviews?
KT: [Shaking head] We were all pretty good coders.