When I graduated from college, in 1991, I started working for Microsoft (NASDAQ:MSFT) on the Excel team. My title was program manager. I was supposed to come up with a new programming system so users could automate Excel. I sat down to write a spec, a huge document that grew to hundreds of detailed pages.

In those days at the company, we used to have these things called BillG reviews, at which Bill Gates personally went over every major new feature. At the time, he was already famous and on the cusp of being named the world's richest person. The day before my BillG review, I was told to send a copy of my spec to his office. It consumed almost a full ream of laser-printed paper.

Once the spec was printed and on its way, I picked at random one of the million little details of the spec that I still had to tackle: figuring out if Excel's internal date and time functions were compatible with BASIC, the programming language we were using on the project.

The next day -- June 30, 1992 -- we gathered in a conference room. In those days, Microsoft was a lot less bureaucratic. Instead of the 11 or 12 layers of management the company has today, I reported to Mike Conte, who reported to Chris Graham, who reported to Pete Higgins, who reported to Mike Maples, who reported to Bill. About six layers from top to bottom. We made fun of companies like General Motors, with their eight layers of management.

So the whole reporting hierarchy was there -- along with, it seemed, its cousins, sisters, and aunts. Someone from my team was there, too. His job was to keep track of how many times Bill said the F-word. The lower the F-count, the better.

Bill came in. I thought about how strange it was that he had two legs, two arms, one head, etc. -- almost exactly like a regular human being. And he had my spec in his hand.

He had my spec in his hand!

He exchanged witty banter that made no sense to me, with an executive I did not know. A few people laughed. Then Bill turned to me. I noticed that there were comments in the margins of my spec.

He had read the first page!

Not only that, he had read the first page and written little notes in the margins. Considering that we got him the spec only about 24 hours earlier, he must have looked at it the night before.

He began asking questions. I answered them. They started off pretty easy, but I can't for the life of me remember what they were, because he was flipping through the spec.

He was flipping through my spec! (Calm down; what are you, a teenager?) And there were notes in all the margins! On every page! He had read the Whole Darn Thing!

As the conversation went on, Bill's questions got harder and more detailed. And they seemed a little bit random. But I didn't care. By now I was used to thinking of Bill as my buddy -- a nice guy who had read my spec. In my head, I was already thinking of how I would address his comments, pronto.

Finally, the killer question. "I don't know, you guys," Bill said. "Is anyone really looking into all the details of how to do this? Like, all those date and time functions. Excel has so many date and time functions. Is BASIC going to have the same functions? Will they all work the same way?"

This was exactly the question I had spent the previous day investigating. And as I had discovered, there was a discrepancy. In both Excel and BASIC, each date was assigned a numeric code. The code for any day in 1992 that I looked up was the same in both. But when I looked up a date around the turn of the last century, Excel and BASIC were one digit apart. Huh?

When I went to find someone who might be able to help, I was directed to Ed Fries, a longtime Excel programmer famous for inventing those screen savers with the swimming fish. I hadn't had much contact with Ed, but I used to see him every Friday afternoon as he played miniature golf in the hallways outside my office.

"Check out February 28, 1900," he told me.

Its number in the Excel code was 59.

"Now try March 1."

Its number was 61.

"What happened to 60?" Ed asked.

"It's February 29!" I said proudly. "1900 was a leap year!"

"Nope," Ed said, and left me pondering the problem for a little while longer. I eventually figured out, with some more guidance from Ed, that a group of programmers at Lotus had skipped a day in 1900 because it created a mathematical shortcut for them, and they probably figured that nobody would care about a mistake buried in the software's internal calendar more than 90 years in the past. The people who made Excel hadn't cared at all and built the bug into the code that the spreadsheets ran on. But the people who had written the code for BASIC had apparently been offended by the shortcut, so they set the start of their internal calendar a day earlier. That way, it would accurately reflect the actual calendar, but the solution was also practical. Because BASIC started its count a day earlier, the number that BASIC assigned to March 1, 1900, was also 61, and from that point on its date and time functions were aligned with Excel's.

So were the date and time functions compatible?

"Yes," I told Bill. "The dates are exactly the same, except for January and February 1900."

Silence. The F Counter and my boss exchanged astonished glances. How did I know that?

"OK. Well, good work," said Bill. He took his marked-up copy of the spec…wait! I wanted that…and left.

"Four," announced the F Counter, and someone said, "Wow, that's the lowest I can remember. Bill is getting mellow in his old age." He was, at the time, 36. Later, I had it all explained to me. "Bill doesn't really want to review your spec," a colleague told me. "He just wants to make sure you've got it under control. His standard MO is to ask harder and harder questions until you admit that you don't know, and then he can yell at you for being unprepared. Nobody was really sure what happens if you answer the hardest question he can come up with, because it's never happened before."

What did I take from all this? Bill Gates was amazingly technical, and he knew more about the details of his company's software than most of the people who worked on those details day in and day out. He understood Variants and COM objects and IDispatch and why Automation is different than vtables -- and why this might lead to dual interfaces. He worried about date and time functions. He didn't meddle in software if he trusted the people who were working on it, but you couldn't bullshit him for a minute because he was a programmer. A real, actual programmer.

Watching nonprogrammers trying to run software companies is like watching someone who doesn't know how to surf trying to surf. Even if he has great advisers standing on the shore telling him what to do, he still falls off the board again and again. The cult of the M.B.A. likes to believe that you can run organizations that do things that you don't understand. But often, you can't.

Over the years, of course, Microsoft got big, Bill got overextended, and the company's strategy put it at odds with the U.S. government. Steve Ballmer -- who was not a programmer -- took over as CEO, on the theory that this would allow Bill to spend more time doing what he does best: running software development. But that didn't seem to fix the problems that came with those 11 layers of management, a culture of perpetual, permanent meetings, and a stubborn insistence on creating every possible product no matter what. How many billions of dollars has Microsoft expended on research-and-development costs, legal fees, and damage to reputation, because it simply had to bring to market a free Web browser?

Oh, well. The party has moved elsewhere, and as of this month, so has Bill -- he is officially retiring to work full time on his foundation, though he will stay on as chairman. My old division has seen its share of change, too. Excel Basic became Microsoft Visual Basic for Applications for Microsoft Excel, with so many (TM)s and (R)s I don't know where to put them all. I left the company in 1994. Now, at my own company, I do the same kind of reviews, although I'm nowhere as good at them as Bill was.

And I had assumed that Bill had completely forgotten me -- just another face in the crowd -- until I noticed a short interview with him in The Wall Street Journal in which he mentioned, almost in passing, something along the lines of how hard it was to replace, say, a good program manager for Excel.

Could he have been talking about me? Naw, it was probably someone else. Still.

Joel Spolsky is the co-founder and CEO of Fog Creek Software and the host of the popular blog Joel on Software.