How a programmer experiences heart break
Thursday, June 22, 2017

It's like having a vital piece of functioning code ripped out of my program suddenly.

Analogy time.

I started out as a normal program with code required to function and perform day to day tasks. One day, I was introduced a small piece of new code, it became part of me; but it wasn't doing any critical function yet.

Over time, more and more functions and code are added to that block of code. My program started relying heavily on it and it made me run faster, tasks was shared with it and generally all was good. But no program is bug free, so I spent a lot of time debugging the errors and working out the kinks. But some bugs never really went away, hotfix patches would resolve those bugs, only for them to surface again after an arbitrary amount of time. It was a lot of work to keep up with the patch work.

After many rounds of careful analysis, it was decided that the code needed to be removed.

Even though the prep work has been done, deleting a huge block of code that has been supporting the program is a painful move. Unsurprisingly, the program crashed, and it crashed hard. Turns out that block of code was doing a lot more than the comments specified. Vital operations were disrupted and errors were throwing up everywhere, constant stack/heap overflows.

The best course of action is to start going through all of the error messages and addressing them one by one, which I did. Slowly but surely, I started writing out little functions that handles all the memory leaks. But they are pretty much just

emotions > /dev/null 2>&1 ?

In summary, the program still works. It's a little confused on what files to import, wishing that the missing block had adopted an adapter pattern. But

It'll continue to run, just a little different from now.