Theory vs Practice
Ξ March 15th, 2010 | → 0 Comments | ∇ Algorithms, Thoughts |
I’ve recently come across an interesting article detailing an existing bug in the binary search implementation presented in Programming Pearls (Addison-Wesley, 1986; Second Edition, 2000). The article can be found here and it presents a bug that can easily be overlooked. Many of us may be very familiar with the problem and many a times we notice it, but easily disregard it because we say that it cannot occur in practice. The nice thing about this bug is that if the program would have been described in pseudocode, the bug would not be there. I really advise you to read the article… it presents how the bug was discovered and what was the impact.