I believe that the final bug in TeX was discovered and removed on November 27, 1985. But if, somehow, an error still lurks in the code, I shall gladly pay a finder's fee of $20.48 to the first person who discovers it. (This is twice the previous amount, and I plan to double it again in a year; you see, I really am confident!)

Writing Solid Code: Microsoft's Techniques for Developing Bug-Free C Programs by Steve Maguire

ISBN: 1556155514 This book is available from Amazon