Tag: open

  • A Subtle Bug

    A Subtle Bug

    Earlier this week, I saw this code being recommended on Stack Overflow. The code contains a nasty, but rather subtle bug. The version I saw has been fixed now, but I thought there were some interesting lessons to learn by looking at the problems in some detail. Let’s start by working out what the bug…