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

Lead, lead again, with Sheryl Sandberg

REID HOFFMAN: When technologies become ubiquitous and essential, they also generate opposition. Take PowerPoint, a product I use almost every day. There’s a...

Entitled neighbor repeatedly enters couple’s backyard property unannounced, neighbor escalates issue to the HOA and couple escalates issue to the police: ‘Please send help’...

Fences exist for multiple reasons, but the biggest one is privacy. Most humans live in fairly close quarters with one another, so measures are...

‘A push towards the conservative’: Cannes tries to ban oversized outfits and naked dressing | Cannes film festival

Not for the first time, organisers of the Cannes film festival, the ritziest and most photographed in the industry’s calendar, have decreed that various...

REVIEW & SWATCHES | Shu Uemura Murakami Holiday Collection

It's that time of the year again where every makeup company is buzzing about their new holiday collections and Shu Uemura definitely has one...