this post was submitted on 20 Oct 2023
1238 points (97.7% liked)

Programmer Humor

32261 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
 
top 28 comments
sorted by: hot top controversial new old
[–] fubo@lemmy.world 75 points 1 year ago (1 children)

Just be sure to pause for garbage collection occasionally.

[–] jaybone@lemmy.world 14 points 1 year ago

And mark items dirty.

[–] JPAKx4@lemmy.sdf.org 53 points 1 year ago

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

[–] fibojoly@sh.itjust.works 35 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] InputZero@lemmy.ml 14 points 1 year 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.

[–] RojoSanIchiban@lemmy.world 34 points 1 year ago

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

[–] tias@discuss.tchncs.de 29 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] Dyskolos@lemmy.zip 9 points 1 year ago* (last edited 1 year 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.

[–] trailing9@lemmy.ml 20 points 1 year ago (1 children)

Remember that cache goes stale

[–] magikmw@lemm.ee 14 points 1 year ago (1 children)

Is mom the cache invalidator we deserve?

[–] trailing9@lemmy.ml 5 points 1 year ago

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

[–] lowleveldata@programming.dev 18 points 1 year ago (1 children)

Access to the chair cache is O(n) tho

[–] gvasco@discuss.tchncs.de 13 points 1 year ago (2 children)
[–] lowleveldata@programming.dev 10 points 1 year ago (1 children)

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

[–] gvasco@discuss.tchncs.de 3 points 11 months ago
[–] sigh@lemmy.world 0 points 1 year ago (2 children)
[–] Natanael@slrpnk.net 3 points 1 year ago

Random fractal cloth patches for an irrational n

[–] gvasco@discuss.tchncs.de 0 points 11 months ago

N is the number elements to be parsed by the function

[–] xmunk@sh.itjust.works 18 points 1 year ago (1 children)

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.

[–] Karyoplasma@discuss.tchncs.de 2 points 1 year ago (1 children)

What was you hash function? return 1?

[–] xmunk@sh.itjust.works 4 points 1 year ago (1 children)
[–] Karyoplasma@discuss.tchncs.de 2 points 1 year ago

shirt.isShortSleeved()

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

[–] indigomirage@lemmy.ca 16 points 1 year ago

This is marvelous.

[–] BannanaLama@lemmy.world 14 points 1 year ago (1 children)

Posts and Comments like this is why I love this place

[–] perishthethought@lemm.ee -1 points 1 year ago

Yeah, who needs R*****.

[–] Fixbeat@lemmy.ml 12 points 1 year ago

Just get your mom to clean the cache occasionally.

big closet sounds like one of jay pritchett's competitors

[–] CurlyMoustache@lemmy.world 2 points 1 year ago

LIFO for lyfe!