Former Microsoft engineer Dave Plummer recently shared an intriguing revelation about his time at the tech giant, particularly regarding a notorious bug he shipped in the beloved game, Pinball. This game, alongside the widely recognized Task Manager, has become a hallmark of Plummer’s legacy, despite Windows XP being the last client version to feature it. Plummer was instrumental in porting the original Pinball game to Windows NT, transforming segments of assembly code into C and crafting an engine to manage video and sound. However, it was within this engine that the bug emerged.
The Bug Unveiled
In a candid moment on his YouTube channel, Dave’s Attic, Plummer admitted, “My game engine had a bug in that it would just draw frames as fast as it could.” Initially, this rapid rendering was manageable on the hardware of the time, specifically the MIPS R4000, a formidable processor operating at 200 MHz. Plummer noted that on a good day, the game would run at an impressive 60 to 90 frames per second, which he deemed sufficient for a game of its nature.
However, as technology advanced, the implications of his design choice became apparent. “It was now drawing at, like, 5,000 frames per second because machines were much, much faster,” he recalled, highlighting the unintended consequences of the bug as newer hardware capabilities surged.
Tracking Down the Issue
It was fellow Microsoft engineer Raymond Chen who ultimately pinpointed the source of the excessive CPU usage. In an interview on the Dave’s Garage channel, Chen recounted his investigation into why Pinball was monopolizing an entire CPU core. “I realized it had no frame limiter,” he explained. The game was simply rendering frames at an unrestrained pace.
Chen discovered some debug code that revealed the frame rate, which astonishingly displayed three asterisks, indicating that the frame rate had exceeded three digits due to the advancements in computer speed. By implementing a frame rate limiter, Chen significantly reduced the CPU usage, capping it at 100 frames per second and bringing the usage down to approximately one percent. “My proudest moment in Windows development,” Chen remarked, “was I fixed Pinball so you could kick off a build and play Pinball at the same time.”
A Reflection on Production Bugs
Despite the humorous undertones of the story, Plummer acknowledged that having a bug in production code is no laughing matter. “That was kind of a shameful thing,” he confessed, hinting at the potential embarrassment felt by engineers when faced with similar situations. Given the quality of recent updates, one might wonder how many engineers at Microsoft share this sentiment.
Plummer also reminisced about the culture surrounding bugs in daily builds, recalling that “people were merciless.” He recounted a moment when Windows legend Dave Cutler humorously suggested that an author of particularly poor code might have indulged in a few adult beverages. “It was all fun and games until you shipped it. And then it was really serious,” he concluded, encapsulating the gravity of software development in a competitive landscape.