Blog Archives

Perils of Copy-Paste Programming

Double oops

Interestingly, my change “solved” the perceived bias in the shuffling code, but it actually introduced real bias in an otherwise correct implementation of the Knuth-Fisher-Yates shuffle algorithm.

This was pointed out to me yesterday (11 March 2017) in the comments on the answer I copy-pasted by Steve Marx.

Read more ›




Show Buttons
Hide Buttons