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

Founding Fathers Pub in Buffalo, New York

Stepping inside the Founding Fathers Pub feels like stepping straight into the pages of an American history syllabus–only this one comes with beer,...

Tom Cruise Buys Fitbit To Help Him Get 10,000 Daily Stunts

CLEARWATER, FL—Explaining that his personal health was everything to him, Tom Cruise told reporters Thursday he had purchased a Fitbit to help him get...

Elevate Your Style With These Burst Fade Haircuts For Men

Burst Fade The burst fade is a striking blend of traditional and contemporary styling, creating an eye-catching rounded fade that arches around the ear and...

Chanel Les 4 Ombres Boutons

Chanel Beauty launched new limited-edition eyeshadow palettes called the Les 4 Ombres Boutons Multi-Effect Quadra Eyeshadow ($86 each, Chanel and Nordstrom). They sold out...

Apple Watch Bands Are 70% Off Right Now

We may earn a commission from links on this page. ...