In your example, I'd still have them both code something. That's almost always a half hour well spent.
The speed which the code can be understood says much more about the writer than the reader.
I think the point is that you hold the writer of the code invariant, and then substitute different code readers; the rates at which two different people can understand a given piece of code says something about their ability as programmers. More than just rate of understanding, I think depth of understanding is just as important: a novice might read some code and say "it does X", whereas an expert will understand X, observe that the code really meant to do Y, and that it might have memory leaks, deadlocks, or incorrect corner cases, for example.I think Gates has a very valid point: there are lots of circumstances where you need the ability to wade into an unknown code base and understand how it behaves (and how it ought to behave). The ability to read through code and understand non-trivial properties of the code really takes some experience to develop -- that is directly relevant to code review, for example.
There's a huge difference between a "needing the ability to wade into an unknown code base and understand how it behaves" and "one of the finest tests of programming ability".
It is clear that well written, well documented code is easier to read than poorly written, poorly documented code. But, for the purposes of Bill's argument, we can assume the code in question is of average quality.
We know enough of Bill's 1986 context to assume that the code he is referring to would be C++ or Assembler. (Included in the book are some pages of the 8080 code for BASIC, written by Bill.) Naturally, the number of pages would vary for different languages, but the argument can be adjusted accordingly.
Finally: building code that satisfies requirements and works perfectly is a noble goal. The question is: is there any test than can be given quickly that acts as decent predictor for this ability? I think Bill's test is not too bad in this regard.
At Microsoft, it may be a noble goal.
With my customers, it is a requirement.
To them, maintenance/support is for changes they want, not for fixing bugs that should have never been there in the first place. Less than 5% is for that.
Also, consider:
1. 30 pages of well written code != 30 pages of poorly written code
2. 30 pages of well documented code != 30 pages of poorly documented code
3. 30 pages of high level code != 30 pages of low level code
4. 30 pages of COBOL != 30 pages of BASIC != 30 pages or Java != 30 pages of Python
5, 30 pages of Microsoft code = 1 page of mortal code
The finest test of programming ability is what you can build that satisfies requirements and works perfectly. I'm not sure Bill Gates ever understood that.