9 ms·
Organize Your Closet Like a Computer Organizes Memory
- danso 11y agoI think I must have just picked the wrong courses but I wish caching was covered more in the comp sci/engineering courses...not just the technical aspects of it, but how the implications of caching (and invalidation) are a great window into thinking about how to design for the real world, and the overall difficulties of information transfer between humans. Even though I never work on anything of such scale, I always like reading about caching architecture and implementation from shops like Facebook, just because it's easy to imagine how it connects to our information problems at the individual level...e.g. asking someone out on a date based on stale information about their relationship status.
- infogulch 11y agoOrganize your closet like Java: everything goes in a container.
- tonyarkles 11y agoI don't need to store all my shirts! I just need enough room in my closet for an AbstractShirtFactoryBean!
- mc808 11y agoI thought you were going to say everything goes on the heap.
- infogulch 11y agoNo that's just when I'm organizing my laundry.
- deleted 11y ago[deleted]
- tomsmeding 11y agoBut at least it's easy for the garbage collector.
- Splines 11y agoKeeping things in a single pile makes insertion O(1) but makes retrieval a linear O(n). Depending on your usage pattern this may or may not make sense. Personally I sort my mail by category (junk mail, mail my wife might be interested in, mail I am interested in). This means there is a one time linear traversal of my mail by me but this allows constant time retrieval of a list of mail by my wife, which she appreciates.
- tamana 11y agoNot O(n) because your eyesight is highly parallel pattern recognition, and you can move items in batch.
- Splines 11y agoThe bottleneck isn't the optical system, it's the mechanical swing arms that's the gating factor.
- omgtehlion 11y agoOk, my wife organizes my daily t-shirts as a deque: fresh comes into bottom, I take always from the top ) O(1) insertion O(1) retrieval.
- hobarrera 11y agoO(n) is stupidly efficient when it comes to looking across all my pants (5) or my shirts (8? 9?). Any complex effort to even bring that down to O(log n) would probably take decades to pay off.
- turaw 11y agoBy the way, that article is an advertisement for "Algorithms to Live By: The Computer Science of Human Decisions" [1] in case you're triggered by native advertising. That out of the way ... As the article states, caching is useful when you have memory stores with different access speeds. This is (frequently, in my experience, caveat caveat etc.) not the case in reality, where you only have the one storage area that has a fixed, fairly low access speed. People are mostly bottlenecked by scanning rate, so it'd make more sense to use an indexing mechanism. Maybe b-trees for closets? B-trees, perhaps, if you store things in boxes? [1]: http://www.amazon.com/dp/1627790365/ http://www.amazon.com/dp/1627790365/
- shadowfox 11y agoOr perhaps splay trees of boxes ..
- analog31 11y agoBy the way, that article is an advertisement... Ironically, Wired wouldn't let me read it, because I've got an ad blocker turned on.
- linhchi 11y agoYeah, after a few seconds of consideration, I gave up on Wired, not my ad blocker.
- kurlberg 11y agoOn a whim I gave w3m (or w3m-el to be precise) a try on this page, and it worked - I found a new adblocker-blocker-blocker, and I'm quite happy I did got to read this gem of a summary at the end of the article: >In short, the mathematics of self-organizing lists suggests >something radical: the big pile of papers on your desk, far >from being a guilt-inducing fester of chaos, is actually one >of the most well-designed and efficient structures >available. What might appear to others to be an unorganized >mess is, in fact, a self-organizing mess. Tossing things >back on the top of the pile is the very best you can do, shy >of knowing the future. You don’t need to organize that >unsorted pile of paper. > >You already have.
- r24y 11y agoMy personal style is a lot like Haskell: I barely understand it, but give me a few minutes and I'll probably come up with something passable.
- ScottBurson 11y agoYou mean, in a 48-dimensional hypercube? Great idea!
- analog31 11y agoYes, a closet where the contents become pure random entropy if you ever lose the key. ;-)
- kazinator 11y ago> Organize Your Closet Like a Computer Organizes Memory I do!!! See the massive fragmentation? Too bad closet objects can't be chopped up into equal sized "page" objects, yet still be available as unbroken through a virtual mapping. You can't move anything, by the way, because I have a reference to it that you don't know about. > Now you have two problems. And that's before regexes even came up as a topic.
- infogulch 11y agoI'm pretty sure regexes increase the problem space exponentially with a base of 2. See, you don't notice before because in the original quote you encounter "a problem" which is 2^1 == 2 problems. But since you brought up regexes and we already had two problems that's 2^2 == 4 problems.
- jzwinck 11y agoI followed this advice. Now I have two closets and I have laid them out identically. They are a mile apart, so if I'm inside one and want to get something from the other, it takes forever. There's no way to quickly discover if my wife has added clean clothes to the closet I'm not in. She only tells me at dinnertime. My closet manufacturer sold me the pair of closets for just a little more than twice what a single one cost, but a four-closet setup was ten times the price and a three-closet variant was not available. They told me there was an eight-closet setup too, but nobody really knew how to use it effectively. Each closet has a cubbyhole which is always open and super accessible. It is large enough for one single sock. I complained about this and was offered to replace all my socks with more expensive ones that take half the space but barely cover my ankles. The next larger compartment is big enough for one whole outfit, but not in the wintertime. Sometimes at night if I have nothing to do I will fill it with the outfit I want to wear the next day. By the next morning there's a decent chance I'll have changed my mind, but that's OK, it only cost me a few calories. There's a larger door I can open which has a few outfits in it. I use this pretty often, but the damper on the door is super-stiff and it takes quite a while to pry it open. And if one of my siblings also wants to use it, I have to wait. Ten years ago I lived by myself, but now the house is pretty crowded and we don't have space for more closets. Finally there's a huge area in the back that I can walk into and get anything I want. The distance to get there is about as long as a football field. Once in a while something I stored there gets damaged, but there's just so much stuff that I probably won't notice. I have no idea how they fit this thing in my house; those closet guys are geniuses.
- tomsmeding 11y agoNow that's a reasonably accurate analogy of computer caching systems. I sincerely doubt, however, whether this scale difference is actually optimal in real life. ;)
- LoSboccacc 11y agoremember when clothes didn't had to be aligned to the nearest shutter and you needed to retrieve both half and stitch them together for having an usable one?
- david-given 11y ago
- kybernetyk 11y agoSo I should take my closet, partition it into small 4k chunks, throw everything unordered in there and when I want retrieve something I look at the model of a perfect closet which I keep next to the real closet to find out in which of those 4k closet-chunks the stuff I'm looking for is? ;)
- jobigoud 11y agoIt's funny, we inadvertently implemented something along those lines a few months ago, it works pretty well so far. For things that are no longer clean but not ready to go in the to-wash bin, we have a cache: separate very-small bins (capacity about 4 pairs of socks, x2) and mini racks. These are add-ins to the side of existing closets and quicker to access.
- Decade 11y agoBufferbloat == San Francisco Bay Area housing market. The offices and jobs create demand for housing, but housing hasn’t been constructed anywhere near as quickly. We don’t want to lose packets of engineers, so we pile them into the buffer. The amount of free space in the buffer has shrunk so much that the cost of latency is spiking exponentially. We can try fancy schemes to guarantee QoS, but those work only for small numbers of applications on a limited scale. As any good network engineer can tell you, the only real solution is to build more.
- coroutines 11y agoSo, I've added another [smaller] closet for faster access in front of my original closet. I've experienced several cache misses and I've decided just to wear what I'm wearing... for the rest of my life. Is this data-oriented? Am I doing it? :O Are the poorly-dressed just disgruntled system analysts???
- mrob 11y agoThe article recommends you browse files on your computer by "last opened" time instead of the default alphabetical order. The recommendation is based on this paper: https://www.cs.cmu.edu/~sleator/papers/amortized-efficiency.pdf https://www.cs.cmu.edu/~sleator/papers/amortized-efficiency.... The recommendation is obviously wrong because the paper is talking about something completely different. Selecting files from an alphabetical list is roughly O(log n) not O(n), because you know the alphabet and can binary search.
- justinhj 11y agoActually in the real world browsing files by access or modified time is usually quicker because the number of items is small. There may be a set of 10-20 files that I've recent opened and the one I want will be in the top 3-5 very often. Doing a binary search invokes scrolling up and down a large list.
- mrob 11y agoThat makes sense for a "Recent files" menu in applications, but if I'm using a general purpose file browser I'm probably looking for something I haven't used recently.
- tamana 11y agoPeople are really really good as estimating and sorting access time and creation time, though, so we can binary search through that. People who use paper journals report they are really could at finding items by remembering when the related activity happened. Emacs org mode (or is it TODO.txt, I forget) also uses this principle.
- bobmichael 11y agoThe book this article is excerpted from ("Algorithms to Live By: The Computer Science of Human Decisions") looks interesting; I'm thinking of buying it. Has anyone read it / does anyone have an opinion about it?
- urza 11y agoI have my clothes all over the place. On the floor, on the wardrobe, on the banister, on my bed. Even washed clothes just ends up in piles on floor, because I am too lazy to put it into closet. (Why to put it there when I will just take it out tomorrow? Better keep it here.) Every morning I just look around until I see something that I like to wear today. I guess I follow the Random Access Memory organization..
- skoczymroczny 11y agosudo apt-get install wife
- occsceo 11y agobest, reply, ever.
- chollida1 11y agoYep, nothing is funnier than some mild sexism in the morning! Messy house, just find a woman to clean it for you, that's her job after all.... right??
- occsceo 11y agothe user's joke was more nerdy and a little sexist. that is all. same could be in the other extreme the other extreme for: sudo apt-get upgrade brakes-man paint-house. Yup, stereotypes exist. Chill and ignore on, no one is stomping out your right to be alive and do what you want.
- tamana 11y agoIt's rather sexist of you to assume the wife would organize clothes rather than be a supervisor process.
- sarreph 11y agoI tried to destroy my closet once but the closet-recovery authorities super-cooled it and alas all my clothes were exposed to my dismay...
- chadlavi 11y agohuh, today I learned wired.com is a jerk about adblockers. guess they won't be getting my pageviews anymore.
- tamana 11y agoI can only assume the feeling is mutual.
- ukyrgf 11y agoThe scrollbar for this site just disappears on Firefox!
- castratikron 11y agoI follow the "fib heap" method of keeping my apartment clean: don't bother keeping your apartment clean during item insertion, and instead clean your apartment only when its time to retrieve an item. Constant time insertion cost and amortized logarithmic time retrieval :)
- tamana 11y agoHow about organizing closets using appropriate algoritgms from gener computer science, not by mapping it to a completely different hardware atchitecture and access pattern? Submarines aren't fish, though both travel in water.