Sorting your clothes is a tricky chore, whether you’re an obsessive compulsive sorter or just trying to work out which shirts to keep and which must go. Looking at 50 shirts and trying to work out which you like the most and which you like the least is something the human brain doesn’t handle very well, the more choices, the more bogged down we get. So how can we possible sort a large number of garments with out using a computer to help us?
The clue is to think like a computer, or rather, by using a computer algorithm. Hold on, before I lose you, this is much simpler than it sounds, so bear with me, even a kid could understand it. The most basic way a computer sorts items is called a “bubble sort“. The way it works is that the items sort of bubble up into the correct order, by going through a simple comparison of two at a time. Humans excel at comparing two items at a time. Imagine two cars, which would you prefer? Two songs, which sounds best? Two potential partners, which makes your heart beat faster?
So if you systematically compare two and two, and keep the best ones on the right each time, the shirts will almost miraculously order themselves from worst to best from left to right. Once you understand the concept, and it really is pretty simple, you can use the same method for sorting socks, sweaters, trousers and even underwear. The only other factor to sleep in mind is that you need to run from left to right as many times as you have items, to give the best shirt a chance to bubble all the way to the top if it started in the losing position.
In clearer terms:
- Stack rack with items to be sorted
- Start at left side and compare the first two
- If the left hand item is worse than right, leave items in order they were
- If the left hand item is better than right, swap them
- Move one item along and compare with the next item
- Loop back to step 2 until the end is reached
- Loop back to the first item on the left until you have repeated a number of times equal to number of items to be sorted (or until you see that the result truly is awesomely perfect).
[wpvideo iN8RHDCq]
Now, once you’ve sorted all you shirts, and in many cases this is a job that may require 2-3 beers or the equivalent, see how easy it would be now to say goodbye to the ones that ended up at the far left? Or if you were thinking of getting started on Project 333, this would help you sort thrash from fash (how cool does that sound?). And of course, the pieces you no longer rank highest can always be added to your For Sale page, right?
And now you can confidently say you know something of computer algorithms as well. How is that for quality advice?
No Comments