When to write a library

Published 2024-08-16

tag(s): #programming

Sometimes I remember things from my dreams with some level of detail. Even more so when I wake up and I have some clarity over what happened. Then go over certain "scenes" again to make sure I don't forget. In general it is humorous situations that I relay to my wife.

Last night, I woke up thinking, "yes, genius, you gotta remember that". What happened in my dream is that I was with some people from work, some real and some made up, in Germany [1]. We were building some sort of important project. And there was a conversation about some code, and I said (paraphrasing, of course):

You can't build the whole library yet, we don't know how the complete solution looks like. It will go to waste.
Let's focus on this problem now, start small. The pattern will appear, eventually.

In my dream there was some sort of argument and my comment stopped it, like I said something very deep and revelatory.
So I woke up with an urgency to go to the bathroom :) and this strange feeling that I said something important, so I tried to retain what happened as much as I could.

As I was doing my business, still half asleep, I kept revisiting what I said. "Why was that important?". Then it hit me and I started smiling: I had just stated one Fred Brook's [2] quotes, with different words:

The management question, therefore, is not whether to build a pilot system and throw it away. You will do that. […] Hence plan to throw one away; you will, anyhow.

That's when I knew I had to post this. First of all, I find it very funny that in my dreams, rather than saving the world fighting ninjas, I am quoting "The Mythical Man-Month".
And second, I like how in my version of the story, I drop this like a bomb of a comment, so much so that I woke up feeling like I had had a revelation.

Anyway, that's all there is to this post. That "Brooks was right" is as evident as the fact that legions of us developers keep ignoring his advise, and we repeat the same mistakes, again and again.

If I had to guess, maybe what prompted the dream was looking at code that someone put in a Utilities module at work. And it was used only once in the whole codebase.
I was annoyed at this, then I remembered at least two instances of me doing the same thing, and was less judgmental. At least in a conscious level LOL it seems my sub-conscious didn't let go of it!!!

Footnotes
  1. I have never been to Germany. Or Europe even.
  2. https://en.wikiquote.org/wiki/Fred_Brooks

Back to top

Back to homepage