The Night I Pulled an All-Nighter for Bill Gates

The Night I Pulled an All-Nighter for Bill Gates

The quest for that perfect demo to one of the world’s most powerful men

[cross post of my original 6/16/21 blog since that blog may be behind a paywall sometimes.]

It was about 5am, five hours from the BillG meeting. My eyes were red and puffy and I was slightly delirious. I had been up for almost twenty-four hours. But I had just recompiled the code, and it seemed to work now. I could get two or three hours of sleep under my desk, and that gave me plenty of time to get the demo to our Program Manager before our dreaded meeting with Bill Gates that morning that was going to decide whether the project continued or not.

Back in 2003-2004, I worked at Microsoft’s Natural Languages Group (NLG). Among other things, we owned all the spellers and grammar checkers that shipped in Microsoft Office. My group was developing something that we called Contextual Spell Checker. This was meant to be squiggles in Microsoft Word that were neither misspellings (red squiggles) nor grammar errors (green squiggles). Think about cases where the word is spelled correctly, but it’s just the wrong word. For example, if you start an email with the word “Deer Carlos,” you probably meant “dear,” not “deer.” But a spell checker wouldn’t catch this (deer is a proper word), and a grammar checker wouldn’t catch this either (it’s grammatically correct).

We had an important Bill Gates meeting to demo a proof of concept, and this was the go/no-go meeting for funding the feature further, so it was kind of a big deal. Presenting in front of Bill was always a terrorizing experience, but in this case it was even more so. We owned a DLL that operated within Microsoft Word’s executable space, but since we had not integrated the Contextual Speller into Word yet, our demo was essentially a poor man’s demo, via a command line tool, outside Word. Just a command line tool in MSDOS that called our DLL. You typed a sentence in the console, pressed enter and then it would print whether there was a contextual spell error or not also in the console. I felt it lacked the visual “punch” of seeing the tags actually in Microsoft Word.

As an engineer, I was bothered by the lackluster experience. What if I could actually get it working in a debug build of Microsoft Word? I wondered. I downloaded the massive source code for Office to my desktop, built it, replaced its official version of our DLL with my debug version of our DLL that had the contextual speller functionality, and started setting breakpoints in the debugger. I spent a long time digging around the code to understand how it called our DLL. I figured it already had code for showing red squiggles and green squiggles, so all I had to do was copy it somehow to get a different type of squiggle that would show off the Contextual Speller. Back then Word sent our DLL a pointer to a convoluted data structure that had not only the text, but also the formatting, and a huge undo buffer so that Control-Z worked as expected. The contextual speller had to parse, and navigate this data structure, to extract the text. Problem is there were so many edge cases. These weren’t documented anywhere I could find so I had to reverse-engineer what that data structure would look like given different scenarios. What does it look like when you just type text? What does it look like when you bold one word and italicize another word? What does it look like when you change the font size? What does it look like when you highlight a word, delete it and replace it with another word? Etc, etc. I spent several hours understanding how it all worked, and got blue squiggles going for our Contextual Speller! That was very exciting… until it crashed 2 minutes later. I continued debugging it throughout the day and into the late afternoon.

My friend Takeshi was on his way home around 5pm, and he stopped by my office to say hi, and I showed off the new demo. He used to be a Software Developer in the Microsoft Word organization, so he knew the codebase intimately, and he decided to sit next to me and help me debug the nightmare of if statements handling edge cases all over the road. Ugliest freaking C++ code I’d ever seen. We kept going for three hours, laughing, cursing, scratching our heads, without a care in the world. Once an hour, Takeshi’s wife would call and strongly suggest that he needed to get home, and he would apologize profusely and promise “soon, soon.”

At around 8pm, my friend Gordon, who was another Software Engineer in NLG, stopped by. We were both night owls and would frequently work well into the wee hours. In the nineties, it was not unusual to see the hallways of Microsoft in Redmond bursting with activity in the middle of the night. He too was captivated by the spirit of what we were trying to achieve. So the three of us sat in front of my computer screen, trying out things, cursing loudly every time Word crashed, and laughing hysterically every time it did not.

We kept going. This was not our job, but we were fueled by a relentless passion for showing off our little feature to the world’s richest man (and our boss’ boss’ boss’ boss…) in the most impactful, beautiful way. A command line demo was no good! It needed to be shown off inside Word, and it needed to be beautiful. And it needed to work by 10am the next day. So we kept chugging along.

At midnight, we made a pot of fresh coffee and looked around for cereal and any food we could find since we had coded right through dinner. Takeshi’s wife had given up on him - she had stopped calling around 10pm and probably gone to bed. Gordon and I were single, no kids and without an obligation in this world so we didn’t mind the long hours. Our eyes were bloodshot, we were tired and loopy, and we were oh-so-close to having it working!

At 2am, Takeshi finally gave up. His brain no longer worked. He apologized profusely and went back to his office to pass out under his desk.

At 5am, Gordon and I had gotten it working! I emailed the Program Manager (PM) that was responsible for the demo to tell him about my idea. I compiled the code, put the binaries on a floppy disk (yes… a floppy disk!!!), left it on his desk, set my alarm clock for 9:30am, and passed out under my desk for a few hours.

I woke up that morning, and realized that our PM had not seen my email! The floppy was still on his desk. The demo was in Building 9, where Bill Gates’ office was, so I ran half-way across the Microsoft campus with the floppy in my hand. As I ran towards the conference room, I’m sure I looked pretty disheveled, sweating, panting, and likely lacking basic hygiene. “USE THESE BINARIES!!!” I yelled handing over the floppy disk, just minutes before Bill was to walk in the door. Our PM looked at me suspiciously, but decided to take a leap of faith. I had never seen a progress bar move so slowly as the binaries were being copied! He double-clicked on Word, and his hard disk chugged along for an eternity before Word’s splash screen showed up. Then, a new, empty document, and the cursor blinking. We all collectively held our breaths. Jerry typed a couple of sentences, and we waited what felt like an eternity. And then, the most beautiful thing: the little blue squiggles showed up!!! There was a collective sigh among the people in the room.

Bill loved the demo, and the project was funded. It is a current feature in Microsoft Word. I’d like to think that that all-nighter had something to do with that!

In fact, I got this little golden historical nugget from my old coworker Andrea Jessee: “I attended this BillG review! We actually showed him how the contextual speller found a typo in one of his own emails that had gone out to all FTEs [100,000 full time employees]. You can imagine how many eyes had previously proof read it before hitting send. I believe that was the only time during the meeting that he actually laughed.”

There’s so much I like about this example. It gives you a glimpse into the passion and camaraderie that we cultivated in that team. The fact that two engineers spent almost all night sitting right behind me, setting breakpoints into Visual Studio and debugging the world’s ugliest code, just because we weren’t willing to settle for mediocrity: we wanted to have a ‘beautiful’ demo, not just an ‘ok’ demo. And it wasn’t even production code. Great engineering is about craftsmanship, and that starts in the little details.


Stefan Tutuianu

Software Development Manager

2 个月

I've yet to read one story from you Carlos Arguelles that's not inspiring. I love the images you build, the stories, the framing - kudos to you and to many more engineering stories to inspire future generations!

Ritesh Khot

IT Project/Program Management | Business Research & Analysis | Content Writing | Thought Leadership

2 个月

Long time i been through this word "floppy disk" :) .. it's always great when you find oneness with the task, especially if its building something for the first time. I, myself has many instances when i used to code and logic used to appear in my dreams. I am sure it would had been quite beyond that. Thanks for sharing Carlos Arguelles

回复
Aleksey Tsalolikhin

DevOps Engineer / Trainer

2 个月

Absolutely beautiful!

回复

Carlos Arguelles you story makes that beautiful connection to each one of us who has experienced grit, passion and glory at least once in their careeers. Thank you for sharing it is indeed a fascinating read. ???? thank you for those blue squggily lines.

回复
Joseph MacQuarrie

Trusted Technical Enablement Specialist | AWS Certified Champion Instructor & Solution Architect Professional | Driving Adoption & Performance through Data-Driven Learning Solutions | Open to New Opportunities

2 个月

Fantastic story. It hits home. Thank you.

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了