Beginners and experts (Batchelder blog post)

Chris Angelico rosuav at gmail.com
Thu Sep 28 18:00:09 EDT 2017


On Fri, Sep 29, 2017 at 7:47 AM, Bill <BILL_NOSPAM at whoknows.net> wrote:
> I won't claim to be any sort of "expert".  But one memorable problem, for
> me, was ultimately accounted for by the "inherent problem" of the floating
> point variables x0 and xo coexisting in the same module.  It's sort of funny
> if you think about it just right. FWIW, my job was to fix the problem, I
> didn't create it!

Today I helped one of my students debug an issue that was exacerbated
by a flawed shuffle function that, while capable of returning any
permutation of the input, had a bit of a tendency to leave things
early if they started early - it was about 8% more likely to pick the
first element than the last. Doesn't sound like much, but it increased
the chances of a collision pretty significantly. Now THAT was fun to
debug.

ChrisA



More information about the Python-list mailing list