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

How to Write Usefully

February 2020What should an essay be? Many people would say persuasive. That's what a lot of us were taught essays should be. But I think...

Study Finds Weed Use Linked To Early Heart Disease

A study found that healthy people who regularly smoked marijuana or consumed THC-laced edibles showed signs of early cardiovascular disease similar to tobacco smokers....

23 Best Travel Pants For Women 2025

When curating our list of the best travel pants, we held them to sky-high standards: They needed to be versatile enough to wear straight...

Courteney Cox’s Must-Have Products: Shop Her Beauty Picks

While each product featured is independently selected by our editors, we may include paid promotion. If you buy something through our links, we may...