Suppose you want to select k things randomly from a list of n items,
with no duplicates. Of course, if k > n, then it's hopeless, and if k =
n it's trivial, so the interesting case is when k < n. A naive approach
might pick an item randomly, and try again …
Read more
Posted Fri 27 June 2008
by mcherm
in Math, Programming
In a previous
article I talked
about using salt with a secure hash, but all of the examples assumed
that the secure hash would be used to validate passwords. Secure hashes
can be used for many other purposes, and I'll illustrate that by
describing two other possible uses.
The first …
Read more
Posted Thu 12 June 2008
by mcherm
in Programming
Any software project needs a Business Requirements Document (BRD)—a
document which describes what the deliverable is supposed to do once
it's been built. The traditional (waterfall) way is to write it in
paragraph form, but several agile development techniques recommend
writing it in the form of a collection of …
Read more
Posted Mon 12 May 2008
by mcherm
in Programming
I'm not a very good cook. One reasons is that I've never mastered the
art of tasting the food as I go along and seasoning it properly. When
cooking, I never seem to add the right amount of salt. As a programmer,
though, I always use salt.
"Salt", in programming …
Read more
Posted Mon 05 May 2008
by mcherm
in Programming
Edward Lorenz died this past Thursday at age 90. This is as good an
excuse as I will ever have to recount the story of his discovery (which
I first learned from the book Chaos by James
Gleick).
It is a tale of math and the proper use of computers …
Read more
Posted Thu 17 April 2008
by mcherm
in Math