DEV Community

Dimitri Merejkowsky
Dimitri Merejkowsky

Posted on • Originally published at dmerej.info on

A Simple Problem

Originally published on my blog

Let’s say that at your work, you have daily meetings every day at 10.

To avoid monotony, you’ve decided to signal the beginning of the meeting by playing a different song every time.

Let’s assume the following:

  • Your music collection is organized neatly, and all the file names look like <author> -<title>.mp3
  • The files can be found and downloaded easily from a web browser.

You’d like to:

  1. Make sure to never play the same song twice
  2. Be able to answer the question: “What was the song you played X days ago ?”
  3. Have a chronologically sorted list of songs, so that you can tell yourself: “Hum. It’s been two weeks I did not play anything from Pink Floyd, let’s use Another Brick In The Wall today”

Based on your experience, how many lines of code do you need to write to solve this problem?

I’m going to give you a moment to think about this …

Enjoy the video in the mean time:

So how much was it? One thousand lines of code, one hundred, ten?

I know you are going to say it depends on the language you are using, but in reality it does not.

The number of line of code you need to write does not depend on the language you are using because the answer is zero.

I'll let you think about it a while longer. Scroll down to see the solution :)

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

You just need a special folder, let’s say “Stand Ups” and a file explorer.

Every day, you download your song in the correct folder, and then you use the “sort by date” feature to have your songs sorted by date:

Stand Up folder

Yup, sometimes “do nothing” is the best strategy :)

I’ll leave you with a quote and a link:

The cheapest, fastest and most reliable components of a computer system are those that aren’t there.

– Gordon Bell

Bye!

Image of Datadog

Diagram Like A Pro

Bring your cloud architecture to life with expert tips from AWS and Datadog. In this ebook, AWS Solutions Architects Jason Mimick and James Wenzel reveal pro strategies for building clear, compelling diagrams that make an impact.

Get the Guide

Top comments (0)

Image of Datadog

Keep your GPUs in check

This cheatsheet shows how to use Datadog’s NVIDIA DCGM and Triton integrations to track GPU health, resource usage, and model performance—helping you optimize AI workloads and avoid hardware bottlenecks.

Get the Cheatsheet

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay