Live data from Hacker News

How to pair socks from a pile efficiently?

stackoverflow.com

31–40 of 42 posts

Re: How to pair socks from a pile efficiently?

#31
post #9
post #8

I have 18 pairs of the same sock. I found that the most efficient way. YMMV.

Isn't this making it especially more complex because now you have to match based on wear, not just the pattern? With different patterns it's easier as the wear is constant for each pair. OCD mileage may vary :)

No because you bought them all at the same time and washed them all at once. And you did the same activity each day resulting in the same wear for each sock. If you're that OCD, you would.

Re: How to pair socks from a pile efficiently?

#32
post #9

Earlier quoted context omitted.

Isn't this making it especially more complex because now you have to match based on wear, not just the pattern? With different patterns it's easier as the wear is constant for each pair. OCD mileage may vary :)

If you really had OCD, you would always do laundry, pull the contents of your sock drawer forward, put clean socks at the back, and only take socks from the front. Problem solved.

If you really had OCD, you would do laundry, wash your hands to avoid spreading diseases to your family, pull the contents of your sock drawer forward, wash your hands to avoid spreading diseases to your family, put clean socks at the back, wash your hands to avoid spreading diseases to your family, and only take socks from the front, after you have washed your hands to avoid spreading diseases to your family. Problem solved, if the problem has been washed, of course.

Re: How to pair socks from a pile efficiently?

#33
post #8

I have 18 pairs of the same sock. I found that the most efficient way. YMMV.

Meta warning...

That breaks down in the world of finance:)

For some reason, it was decided that people would be judged based on the socks that they wear.

I guess when you have to wear a suite each day you need to differentiate yourself and after a watch socks are the next best way?

Re: How to pair socks from a pile efficiently?

#36
The answer is http://www.bargain-bulk-sock-sales.com/ Get a gross of either ankle, high or dress socks. ALL EXACTLY THE SAME. When a sock goes bad, take it out of circulation and grab a new one from the box. I bought a gross in 2004 and I'm about 1/2 of the way through. So at that point it was about $90 for 10 years of socks with no time spent on matching socks. They all match.

Re: How to pair socks from a pile efficiently?

#38
post #11

No one owns enough socks of enough different kinds to make the accepted solution the most efficient. 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.

"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?

#39
post #5

Earlier quoted context omitted.

Exactly. O(1) FTW!

This would be O(n), since the time it takes to pair your socks is still proportional to the number of socks you have

The idea is that I don't need to pair my socks. I can just take any random 2 socks from the heap whenever I'm going out, since they are all the same. Hence, O(1).

Re: How to pair socks from a pile efficiently?

#40
post #11

No one owns enough socks of enough different kinds to make the accepted solution the most efficient. 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.

"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 s…

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.
Post reply on HN