Computer science can clean up your closet.

Closet organization software in the movie “Clueless”.

No, not using software—using an algorithm.

The algorithm is called “Move to Front”. It is so simple, that you can “compute” it yourself. (In fact, the first “computers” were people.)

Here is how it works:

  1. When you dress, take the clothes you’ll wear off of their hangers, and place those hangers at the far, right-hand side of your closet.
  2. When you undress, replace your worn clothes on the hangers at the right side.

That’s it.

What does this do? The clothes you never wear will pile-up at the left side of your closet. The clothes that you do wear, naturally make their way to the right.

When you go to pick out clothes for the day, you can focus your attention on the right side, because that is where the clothes you actually wear will end up.

If you group your clothes into sections (shirts, pants, …), run Move-to-Front on each one, independently.

To make room in your closet, just run the algorithm for a while, and donate the clothes at the left side. To convince yourself you really never wear something, mark a hanger with a piece of tape and write the date on it, then put that hanger at the right side of your closet. Look for the hanger a year later, and see what clothes are to the left of it—you haven’t worn those for a whole year.