Simplest Implementation – The Daily WTF

Date:

Share:

As the saying goes, there are only two hard problems in computer science: naming things, cache invalidations, and off by one errors. Chris‘s predecessor decided to tackle the second one, mostly by accurately(?) naming a class:

class SimpleCache
{
}

This is, in fact, the simplest cache class I can imagine. Arguably, it’s a bit too simple.

Instances of this class abound in code, though no one is entirely sure why. Future optimization? Just no one understanding what they’re doing? Oh right, it’s that one. It’s always no one understanding what they’re doing.

[Advertisement]
Keep all your packages and Docker containers in one place, scan for vulnerabilities, and control who can access different feeds. ProGet installs in minutes and has a powerful free version with a lot of great features that you can upgrade when ready.Learn more.

Source link

Subscribe to our magazine

━ more like this

25 Best Holiday Gifts for Travelers in 2025

Travelers can be a fickle group of people to buy gifts for. We’re constantly coming and going, we usually don’t carry a lot of...

Six PostSecret Books Available Now

—–email—– Dear Frank-My boyfriend knew I was a PostSecret fan and a couple of days before Christmas this was in a package on my porch....

Best Cyber Monday Sales 2025: Home, Fashion, Beauty

Every year, it seems like Black Friday and Cyber Monday sales simply aren’t what they were. In 2025, that’s not necessarily the case anymore...

Analog(ue) #244: Devout Real Tree Person

#244: Devout Real Tree Person December 6th, 2025 · 85 minutes Holiday traditions and reflecting on a big project. This episode of Analog(ue) is sponsored by: Squarespace: Save 10% off your first...