News for hackers. Stuff that matters.
Re:The xkcd survey by kachnuv_ocasek on Wednesday September 02, 2015 @11:13AM (#10159751)
>I have to match socks between several different styles Do I understand correctly that you throw all your socks into a drawer/container, and when you need a pair, you go and have to find two matching ones?

This may be cultural (or even familial) thing, but I always curl two socks up into a ball so that they stay together. When I need a pair, I just take one ball, uncurl it, and voila.

Re:The xkcd survey by brianwawok on Wednesday September 02, 2015 @11:37AM (#10159942)
But do you curl matching socks or not?

If you have many different styles, you need to go hunt around and find matches. Curl or not just delays the matching problem, it does not solve it.

Having all the socks be the same makes matching an O(1) problem.

Re:The xkcd survey by kachnuv_ocasek on Wednesday September 02, 2015 @12:01PM (#10160134)
Yes, I pair them after washing, and curl them after drying. Putting them together makes searching O(n) instead of O(n^2) if you have a particular style in mind.

Of course, homogeneity makes this even faster, but you lose the benefit of choice, variability and fashionableness. Quid pro quo.

Re:The xkcd survey by kenbellows on Wednesday September 02, 2015 @01:09PM (#10160608)
I think his point was that if you're seeking out all the pairs when you curl them together, you're still spending unnecessary time and effort matching socks, just ahead of time instead of in the moment when you need socks
Re:The xkcd survey by brianwawok on Wednesday September 02, 2015 @01:53PM (#10160898)
Exactly he does an O(N^2) Pair followed by a later O(N) search.

Why not do a O(1) Pair folloed by an O(1) Search.

Re:The xkcd survey by djfm on Wednesday September 02, 2015 @04:15PM (#10161650)
Intuitively I'd say a human pairing socks is far better than O(n2) because finding something that matches a given sock is close to O(1) on small sets.
Re:The xkcd survey by dtparr on Wednesday September 02, 2015 @02:42PM (#10161189)
Of course, there's an enlightening stackoverflow question on this: http://stackoverflow.com/q/14415881/220347

Finally, my graduate-level algorithms class comes in handy in real life.

Re:The xkcd survey by Gravityloss on Wednesday September 02, 2015 @11:53AM (#10160071)
but if you curl them after drying, you have a much smaller pool to find the pair from, the just washed socks (which will be the socks you use the most anyway). So it's faster that way, than to mix them all up and only then match.
Re:The xkcd survey by gknoy on Wednesday September 02, 2015 @12:12PM (#10160208)
My wife has about twenty pairs of socks, and no more than a few of the pairs are the same variety. It's like some masochistic combinatorics problem every single time I fold socks. My kid and I literally were playing "sock go fish" a few times to get him to help (except ... I was more interested in the pairing, rather than taking turns. Doh.)

Laundry-folding happiness is increased significantly when I don't have to play "Find-the-mate" every time I pick up a sock (which applies to my kids' socks as well, since they are all patterned, but thankfully my son likes wearing party-colored socks, so I only need to match on shape).

I have two "vintages" of socks -- the old ones that I hate, and the newer ones that I prefer, roughly equally divided. I would donate + re-buy if I had more than two flavors of socks.

Re:The xkcd survey by cortesoft on Wednesday September 02, 2015 @01:53PM (#10160900)
I pretend I am a computer doing a matching problem. I have a buffer of unmatched socks that I compare each sock as I pull it out of the pile, and if unmatched I add to the buffer. Kinda fun.
Re:The xkcd survey by thumbtackthief on Wednesday September 02, 2015 @12:35PM (#10160398)
Sock go-fish is _genius_