dmerej blog

symlinks made easier

For years I’ve been struggling with the ln command.

I never could remember how to use it, mixing the order of the parameters, and the man page did not help.

$ man ln

      ln [OPTION]... [-T] TARGET LINK_NAME   (1st form)
      ln [OPTION]... TARGET                  (2nd form)
      ln [OPTION]... TARGET... DIRECTORY     (3rd form)
      ln [OPTION]... -t DIRECTORY TARGET...  (4th form)

So I thought, why not write a small wrapper around it?

Twitter and me, me and twitter

Some time ago, I pinned the following tweet on top of my timeline:

Announce: I’ve decided to no longer follow more than 20 people. Maybe one day I’ll explain why on my blog. (Not sure yet)

Well, it’s time to explain myself, and, as often on this blog, the post will start with a story.

Is TDD Worth It?

Well, here is a good question! Here’s what I have to say:

  1. I don’t know
  2. It depends

Those are, by the way, two very valid answers you can give to any question. It’s OK to not have a universal answer to everything ;)

Still, I guess you want me to elaborate a tad more, so here goes …

A Simple Problem

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?