Re:How to pair socks from a pile efficiently?
by jameshart on Tuesday April 29, 2014 @02:50PM
(#7669161)
"No one owns enough socks of enough different kinds"
Not sure if you're making a legitimate YAGNI argument, or falling into a programmer fallacy of believing you can safely generalize from your own experience to your users...
I'm leaning towards the latter, and am further going to suggest that your experience might be limited to being single, and likely male, and that it generalizes badly on any axis away from that state.
This problem feels like a surprisingly good example of how your personal intuitions about a problem space can lead you to make incorrect simplifying assumptions to find an elegant solution, that will completely fail when they run into the real needs of your actual users.
Re:How to pair socks from a pile efficiently?
by debacle on Wednesday April 30, 2014 @08:21AM
(#7672788)
How many different kinds of sock do you own? I fold socks for four people - my wife and my two children, contrary to your ignorant assertion - and between the four of us we may have a dozen different kinds of sock.
It's much easier to simply try for a match on an unmatched sock, and if there is no match put that sock into cache (usually somewhere else on the bed). Your cache will probably never get above about 8 socks without a match.