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

Share a tip on taking part in an organised challenge in the UK or overseas | Travel

Forget the sun lounger, more of us than ever before are signing up for trips which involve completing a tough physical challenge, whether it’s...

2026 customer service planning series: Vol. 02

When AI Agents resolve the majority of customer conversations, the shape of your support team has to change. This is part two of our five-part...

Things to distract you in November – The Bloggess

The world is hard but books are a lovely escape so here are some of my suggestions for new November releases you should read: As...

The missile meant to strike fear in Russia’s enemies fails once again

Therefore, it’s no wonder...