It took two of us to keep up with one Bob

Date:November 30, 2006 / year-entry #398
Tags:other
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20061130-06/?p=28873
Comments:    32
Summary:One of my friends (let's call him "Bob") retired from Microsoft many years ago. Bob is an amazing programmer whose skills I remain in awe of. I remember visiting his office one evening with a mutual friend ("Fred") to catch up on things. When we turned up, he showed us a problem that he was...

One of my friends (let's call him "Bob") retired from Microsoft many years ago. Bob is an amazing programmer whose skills I remain in awe of.

I remember visiting his office one evening with a mutual friend ("Fred") to catch up on things. When we turned up, he showed us a problem that he was working on. He was doing some sort of fancy graphics effect, but since I'm not a graphics person, I sat down in his guest chair and flipped through some magazines while he talked about the problem with Fred. (Fred being a graphics guru.) They discussed the problem and settled on an algorithm. Or at least I assume that's what they did, because I wasn't paying much attention.

And then Bob started digging into the algorithm's implementation. Since this particular effect was in the program's inner loop, it had to be fast, and at the time this story took place, that meant assembly language. Not just your everyday assembly language, but insane assembly language, pulling crazy tricks like using the stack pointer as a general purpose register (since the x86 has so few registers) and performing multiple operations in parallel with one register. I put down my magazine, and Bob and I sweated out the details. Meanwhile, Fred flipped through a book on Bob's shelf.

That's how great Bob was. It took two people (Fred and me) to keep up with one Bob.

Anyway, that's a pretty long introduction to Bob just to get to the real story, which will come tomorrow.


Comments (32)
  1. JamesNT says:

    Something tells me I’m going to enjoy this one.

    Mr. Chen, I can’t say this enough, but thank you for maintaining this blog despite all the horrific people who come here and taunt (annoy) you.  You’re right, you should become a professional psychic.

    James Summerlin

  2. Mesa says:

    JamesNT took the words out of my mouth.

  3. David Walker says:

    Yes, I really enjoy reading (almost) all of these entries.  And I’m sure that the ones I don’t enjoy reading, other people dp enjoy!

    Keep up the good work.

    David Walker

  4. Keithius says:

    I agree. You do a great job here, and I REALLY enjoy reading your entries each day. I hope you keep it up – and thanks for what you’ve done so far!

  5. Jade Philosopher says:

    The Great Raymond Chen, only half as good as some random retired Microsoftie named Bob. &lt/taunt and annoy&gt

    I too greatly enjoy these anecdotes and appreciate the effort that goes into this place.

  6. Stu says:

    Now this sounds awfully like the opening paragraph of a typical post on TheDailyWTF.com…

    I wonder what happens next :)

  7. Cody says:

    If there’s someone with twice as much computer-fu as Mr. Chen why haven’t we heard of him before?

    [Heck you wouldn’t have heard of me either if it weren’t for this web site. -Raymond]
  8. Jonathan says:

    I take it that it was in DOS, and the SP-munging was done between CLI and STI? Otherwise an interrupt would start writing stuff in random locations.

    Also thanks AMD for AMD64, which finally gives us some registers…

    [?!? Imagine the disasters that would occur if hardware interrupts ran on a user-mode stack. -Raymond]
  9. mikeb says:

    > [Heck you wouldn’t have heard of me either if it weren’t for this web site. -Raymond] <<

    Oh, long before the days of blogs I would occasionally read you and Geoff Chappell arguing over some arcane Windows 95 bug/detail/oddity/whatever…

  10. Cody says:

    [Heck you wouldn’t have heard of me either if it weren’t for this web site. -Raymond]

    The thought of that saddens me slightly.

  11. Igor says:

    Moral of the story is that the Raymond is assembler guru :)

    Now we just need Norman to complain how Mr. Chen is not using his 1337 ski11z to stop some hax0rz.

  12. steveg says:

    Igor, surely Norman will complain about the Japanese implementation of DOS? ;-p

  13. Neal says:

    >[Heck you wouldn’t have heard of me either if it weren’t for this web site. -Raymond]

    Not true here.  I remember you from usenet a good many years ago… ok, about a decade maybe.  You were helping people with bugs, giving advice, etc. and you even responded to emails I sent you.  An asset then and now, both to Microsoft and us all!  

  14. cK says:

    To: David Walker

    Are you from Michigan?  I know a David Walker and just want to VERIFY(IsIt(_T("David Walker")); that I know.

  15. Legolas says:

    Nice cliffhanger!

  16. Dean Harding says:

    which will come tomorrow.

    Argh! I hate "to be continued"-style endings!!

  17. Wouldnt it just be a case of different skillsets overlapping in different places?

  18. andy says:

    [Heck you wouldn’t have heard of me either if it weren’t for this web site. -Raymond]

    Not true, fortunately! You gave me and many others kind advices on the shell-newsgroups almost a decade ago :) That’s actually why I started reading your blogposts (on gotdotnet.com) – because I recalled your name from the newsgroups and hoped/assumed you would write the same interesting posts as in the answers on microsoft.public.platformsdk.shell. And you absolutely do :)

    [Okay, some of you may have known me before the web site, but I think those people are more the exception than the rule. -Raymond]
  19. Sarath says:

    Mr.Chen, you said that you are not a graphics person. So I’d like to know what’s your expertized area? I’m confused a bit because you writing about various Win32 stuffs :)

  20. Norman Diamond says:

    Thursday, November 30, 2006 3:51 PM by steveg

    > Igor, surely Norman will complain about the

    > Japanese implementation of DOS? ;-p

    Other way around.

    Mr. Chen is the one who said that Windows 95 legitimized 32-bit programming.  So as for the 32-bit programming that I did before MS-DOS existed and during the era when MS-DOS was used on toy computers, Mr. Chen complained that my work was illegitimate.

    I didn’t have to pay for or use MS-DOS in those days so I haven’t experienced much cause for complaint with it.

    [“Mr. Chen is the one who said that Windows 95 legitimized 32-bit programming.” Did I say that? I can’t even find the word ‘legitimized’ anywhere on the blog except in this very comment. I think you’re being a bit oversensitive. (Even if I had said it, it was clearly not to say that all 32-bit programming before Windows 95 was illegitimate. Perhaps “popularized” would have been a better term, if I had even written it at all, which I don’t think I did.) -Raymond]
  21. Norman Diamond says:

    > Did I say that? I can’t even find the

    > word ‘legitimized’ anywhere on the blog

    > except in this very comment.

    I agree, I don’t remember which word you used that had the same meaning.

    Probably the posting would have been in year 2003 or 2004 but this doesn’t help much in tracking it down, sorry.

    > Perhaps “popularized” would have been a

    > better term, if I had even written it at all,

    > which I don’t think I did.)

    I agree that “popularized” is more compatible with your writing style.  In a while I’ll try searching again.  32-bit programming was popular before Microsoft existed, so the effect of reading “popularized” would have been the same as the effect of reading “legitimized”.

    [32-bit programming may have been widespread but it wasn’t in the consciousness of the non-technical computer user. That’s what I meant by “popularized” – that it became something even non-technical people understood at some level. -Raymond]
  22. I agree with JamesNT (the first post)!

    Please keep writing Raymond, your blog is on my top 3 list of blogs, without it I would have to go back reading newsgroup with a much lower SNR.

    I haven’t posted a comment here in a long time since this blog is already flooded with comments, but I just wanted to say that I enjoy your blog a lot and I guess that there are a lot of people like me who don’t post comments (frequently) but still enjoy reading your blog.

  23. Chris Becke says:

    [Heck you wouldn’t have heard of me either if it weren’t for this web site. -Raymond]

    Actually, it was by following up a reference to "Dress like Raymond day" somwhere in wikipedia that I did a google search and ultimately found this web site.

  24. Norman Diamond says:

    > That’s what I meant by “popularized” – that

    > it became something even non-technical people

    > understood at some level.

    In that case it wasn’t an insult and I apologize for feeling
    insulted.  (And since I haven’t found the statement that I think
    you made, I might owe you an additional apology.  But I do plan to
    do more searching ^_^)

    But I have a feeling that most non-technical people really don’t
    understand the meaning of 32 bits even at some level, whether in the
    era of IBM 360s or VAXes or PCs.  On this matter I don’t have any
    complaint about your opinion, I just have different experience.
     My experience includes several people who couldn’t understand the
    idea of a virus even when I abused the word to include all kinds of
    malware, people who don’t understand what role memory plays in a
    computer, people who do understand memory but don’t understand why an
    increase from 32MB to 160MB might bring a speedup (nor why an increase
    from 256MB to 1GB wouldn’t speed up the kinds of things they do), and
    people who don’t understand why it takes longer to write a program than
    to use a program.

    [By “understood at some level” I meant that you
    could put “New 32-bit edition!” in an advertisement and people would
    say, “Wow, that must be better!” They may not know why they think that,
    but there’s been a lot of buzz about this new “32-bit” stuff so it must
    be good. -Raymond
    ]
  25. Sven Groot says:

    Am I the only one who, when seeing the title of this post, thought it was going to be a story about Microsoft Bob? :P

  26. AK says:

    I remember Raymond from the stuff he used to write about The Simpsons. A lot of it is still available at snpp.com :-)

  27. If it’s not as a favor, then it’s a job.

  28. BryanK says:

    Sven:  No, you aren’t…  ;-)

  29. David Walker says:

    ck: No, I’m not from Michigan.

  30. James says:

    “By “understood at some level” I meant that you could put “New 32-bit edition!” in an advertisement and people would say, “Wow, that must be better!” They may not know why they think that, but there’s been a lot of buzz about this new “32-bit” stuff so it must be good. -Raymond”

    I rather suspect putting “now with 20% more relocated sectors” on HDD packaging would have a similar effect, too…

    It did push 32 bit code to the point 32 bit apps could sell in volume, but I very much doubt there was any real understanding of the implications (remember Bart incinerating his “obsolete” console which was only 252 bits, once the 256 bit version was released?)

    [Would you be happier with the formulation “brought the term ’32-bit’ into the mainstream consciousness”? My point is that if you said “32-bit” before, people would just look at you funny. If you said it after, people would at you funny and say “I’ve heard that term, what does it mean?” It came out of the geek world into the general public (even if the general public didn’t understand it technically). -Raymond]
  31. Mike Hearn says:

    So are we ever going to find out how to do that trick with reusing ESP? Unless you play tricks with assuming you can always obtain a particular page for your own use, I can’t easily imagine how to get the stack pointer back after losing it from the register.

    Educate us Raymond! :)

    [? Save the register to memory, what’s so hard about that? -Raymond]
  32. Uri Geller says:

    Sunday, December 03, 2006 2:22 PM by Mike Hearn

    So are we ever going to find out how to do

    that trick with reusing ESP?

    >

    [? Save the register to memory, what’s so hard

    about that? -Raymond]

    Hey, what happened to your famed psychic powers?  You’re not supposed to use memory for ESP, you’re just supposed to use tricks.

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index