Research trivia

(Context: I was working as a research assistant; my main task was to find efficient algorithms to update connected components in a dynamic graph whenever edge insertions and deletions happen).

Algorithm description. Pseudocode. Proof of correctness. I had everything in my written using LaTeX in PDF format. Now it’s the time to implement it using C++ on my Windows Visual Studio.

Despite having the pseudocode to refer from time to time, the implementation is itself a toilsome process. It wasn’t that difficult in the beginning: I just had to modify my code from the previous version (that dealt only with static graphs) to fit the changes added. I breezed through the first few sections which handle easier cases: they shouldn’t be that difficult to code, isn’t it? But the gist of the algorithm, as usual, handles the non-trivial cases that incurs countless of mutations in the data stored. With my own pseudocode detailing “do this, do that” but not “how to do them”, I found myself stuck and not too sure what I am doing.

You have to be very frustrated to write that comment (basically I wasn’t even sure to add that line amid the freaking messy setting)


As if this is not enough, the never-ending debugging process did equally well to drive me crazy. On one time there was a subtle mistake that took me two whole days to find out; on other times the fix is simply by removing one optimization part without me knowing why it ruined the whole program.

Classical meme of CS people at all times

In fact, it would be generous for the program to let you know whether your output is correct in minutes.

Duplicated from Instagram story (if not mistaken it halted at 15 hours)

If you think that this is all, no. The highest record was 115 hours and I killed it after determining that it’s not worth a try.

The piece that best relates to the status aforementioned is none other than Chopin’s Fantaise Impromptu. The running notes in the beginning of the piece complements the beautiful pedal point of the phrase coming a few bars after that to impress the audience. Nevertheless, all the audience knows is that “hey, the rapid finger movement is awestruck!” without understanding what’s going on–they simply have to enjoy the music.

Sometimes we just had to accept what we are doing without knowing why does it work (that said, it’s always good to be curious on these matters).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s