From time to time I receive bug reports for the libraries I've written. Some reports describe genuine bugs (and I'll be the first to admit I'm not perfect), but far too many others demonstrate a missed step in the submitter's "bug assessment" mental process.
Specifically, ten years ago I wrote the unit testing module included in Python's standard library. The module was a fairly direct copy of JUnit's proven design at that time, and has since been used as the basis of (I'm sure) millions of unit tests in projects around the globe, including Python itself. It's fairly safe to say that the major bugs have been ironed out by this stage.
But still, from time to time, I receive emails smugly pointing out a glaring bug in the module, with indignant comments such as "I am trying to teach more people in my company to use unit testing, but after the[y] discover bugs like these they come to me discouraged."
Many such bug reports come complete with a short "demonstration" code snippet that shows a fundamental misunderstanding of how the library is to be used. I send polite responses, but I'd rather have simply been asked for a link to a good tutorial instead.
So here's a question I'd like to request that every programmer (whatever his opinion of his own ability) ask himself before reporting a bug in a library he's using:
"Given the number of people using this library, is it at all possible that I could be the first person to discover this bug, or is it more likely that I've misunderstood how to use the library?"
P.S. Why not subscribe to future articles?







I agree, wholeheartedly.
But for newcomers to a new language eco-system, things can be quite confusing at first until one understands the community's norms and conventions. As library implementors and maintainers, we should, if enough people are confused, look for ways to help. Sometimes a bit of renaming can work wonders. Or see if there's a simple way to steer them in the right direction, by providing clearer error messages, or better documentation. A couple of examples is often all it takes to get a newcomer over the hump.
I'm all for helping newcomers, and used to hang out on comp.lang.python answering newbie questions by the score (a great reputation-building strategy, by the way).
And, of course, if enough people think they're finding the same bug because there's a mismatch between a library's behaviour and their expectations, then there's a good chance the API is wrong.
I guess my post was ultimately a request that users apply some critical thinking before concluding that they've found a bug, and some social skills when reporting it.