It really sounds like an urban legend, but apparently, Bill Gates admits it here himself. Not sure if it was the last piece of code he wrote though: https://web.archive.org/web/20120213015238/http://www.micros...