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

Microsoft Office Pro 2021 Gives Your Team the Edge at a One-Time $40 Cost

Disclosure: Our goal is to feature products and services that we think you'll find...

Error'd: Better Nate Than Lever

Happy Friday. For those of us in America, today is a political holiday. But let's avoid politics for the moment. Here's a few more...

Halter Dresses Are Summer’s Biggest Comeback Trend

We have our linen dresses, our milkmaid dresses, and our playful sardine-girl summer-ready takes to pair with sneakers, sandals, and thong kitten heels. But...

How Dominican Salons Shaped My Identity

Like most curly-haired Afro-Dominican girls, I had a complicated relationship with my hair growing up. Society loves to say that Black girls hate their...

ash80/RLHF_in_notebooks: RLHF (Supervised fine-tuning, reward model, and PPO) step-by-step in 3 Jupyter notebooks

This repository provides a reference implementation for Reinforcement Learning from Human Feedback (RLHF) framework presented in the RLHF from scratch, step-by-step, in code...