1258
submitted 2 years ago by [email protected] to c/[email protected]
all 28 comments
sorted by: hot top new old
[-] [email protected] 77 points 2 years ago

Just be sure to pause for garbage collection occasionally.

[-] [email protected] 14 points 2 years ago

And mark items dirty.

[-] [email protected] 54 points 2 years ago

There is increased corruption as the lifespan of the cache grows, maintaining speed but reducing element quality

[-] [email protected] 36 points 2 years ago* (last edited 2 years ago)

This is acceptable for commonly used, hot items. But you also need a colder storage for stuff that you ain't gonna wear everyday!
This young lady is just inefficient and has no care for the cost of hot cache.

Personally, I use a top of bed hot cache, a chair warm cache and the rest in cold closet.

[-] [email protected] 15 points 2 years ago

I use to run my closet asynchronously like that, but I would loose way too many small packets waiting for the cache to fill. Especially when they were mirrored. Now I exclusively use synchronous writes to the cold store. It may be slower but it's worth it for better data integrity.

Oh pro tip, if you use a FAT filesystem avoid horizontal striping.

[-] [email protected] 35 points 2 years ago

Normalize and index your damn drawers or you're deadlocked!

[-] [email protected] 29 points 2 years ago* (last edited 2 years ago)

This is unironically how I think. Also carrying single items to their designated place is inefficient. I wait until there's a pile so I can process in batch and avoid latency overhead. Same for vacuum cleaning, I need to strike a thoughtful balance between accumulated dust and the time expended on vacuuming. All to maximize throughput in my life.

[-] [email protected] 9 points 2 years ago* (last edited 2 years ago)

Same. You can't imagine the amount of discussions with wifey i had about this. Life is hard ๐Ÿ™„

Also it's not chaos when i exactly know where everything is. Even if there are socks on top of it. I put them there. For a reason.

[-] [email protected] 20 points 2 years ago

Remember that cache goes stale

[-] [email protected] 14 points 2 years ago

Is mom the cache invalidator we deserve?

[-] [email protected] 5 points 2 years ago

But not the one you need. When she notices a smell it's already too late.

[-] [email protected] 19 points 2 years ago

Access to the chair cache is O(n) tho

[-] [email protected] 14 points 2 years ago
[-] [email protected] 10 points 2 years ago

Mom is way too harsh to call it a messy pile with only 1 cloth on the chair...

[-] [email protected] 3 points 2 years ago
[-] [email protected] 0 points 2 years ago
[-] [email protected] 3 points 2 years ago

Random fractal cloth patches for an irrational n

[-] [email protected] 0 points 2 years ago

N is the number elements to be parsed by the function

[-] [email protected] 19 points 2 years ago

Personally I assemble my clothes in a B+ tree on my desk. I've found that the hash lookup algorithm I was using had too many collisions.

[-] [email protected] 2 points 2 years ago

What was you hash function? return 1?

[-] [email protected] 4 points 2 years ago
[-] [email protected] 2 points 2 years ago

shirt.isShortSleeved()

That would actually be sufficient for my use case, not gonna lie.

[-] [email protected] 15 points 2 years ago

Posts and Comments like this is why I love this place

[-] [email protected] -1 points 2 years ago

Yeah, who needs R*****.

[-] [email protected] 5 points 2 years ago

big closet sounds like one of jay pritchett's competitors

[-] [email protected] 3 points 2 years ago

LIFO for lyfe!

this post was submitted on 20 Oct 2023
1258 points (97.8% liked)

Programmer Humor

37227 readers
85 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS