The days I feel like Sherlock Holmes

Arun Kumar Dave
3 min readNov 11, 2019

Quite possibly the greatest detective of all time, having that extraordinary delicacy of touch, Sherlock, I admire you so much. I’ve only read a very little about you so far, yet you amazed me into writing about you.

The ability to find the minute details of anything that crosses your eyes, ears or any senses. The analogy you detect afterward which mostly turns out to be true. To find the intuitive, go deeper, and find contra-intuitive, that’s when we actually get the answers to anything. All these and many other things took my thinking skills to a whole different level.

There are some days I too feel like Sherlock Holmes when my partner comes to me, and says, we’ve got a situation. There’s a misconfiguration and the server is about to crash. We need to do something! Quick!

I put my thinking hat, and earphones on, and say to myself.

Sherlock mode ON!

So, somewhere in this massive project-repo is a piece of code that keeps dynamically changing based on various criteria. To me, it feels as electrifying as a murder mystery. Investigating for you is debugging for me, where I have to keep an eye on every variable that is declared and the places it has been used. My iDE is like Dr.Watson, mostly does as I say, sometimes thinks he’s smarter than me, but isn’t.

Open up the debugging console, add a few breakpoints in each of the suspected files. I then eliminate the files which seem not causing any issue, and virtually creating an image of how the variable goes by and from where to where. The possibilities of all the cases.

When nothing really works out, I play the scene, again and again, to check the data being stolen from where, and the memory leakage that’s happening. Step by step gathers the broken pieces until finally, I might assume what’s wrong with the code, and call to check the method that abruptly returns ‘null’ and TADA! Issue found: Line 221B.

Now just change the return statement that should’ve been done before the allocation and not afterward, re-write the line, and ahoy, it worked. It’s done. Now that it’s solved, rest can be taken care of! Care for a cup-o-tea? Partner?

Thank you, Sherlock, for bringing out the Sherlock in me.

Started reading this one recently

--

--