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

Six of the best farm stays in Europe for delicious local food in glorious countryside | Food and drink

A Mandria di Murtoli, CorsicaA hamlet of restored rural buildings in the Ortolo valley in Corsica reopened in June as A Mandria di Murtoli....

Why It’s Safe for Founders to Be Nice

August 2015I recently got an email from a founder that helped me understand something important: why it's safe for startup founders to be nice people.I grew...

Error'd: Superfluous U's

In today's Error'd episode, we flirt with European English to acknowledge the GDPR. Modern Architect jeffphi shared an example of a hot software pattern...

Ulta 21 Days of Beauty Sale

I have a sale alert to share! It’s one that’s too good to pass up! Ulta is having their 21 Days of Beauty Sale...