Void

Month: August, 2018

Blogs Versus Books

Long time back, in one of the social gatherings, someone asked me what do you do in your pastime? I said I read a lot. That person asked – What was the last book you read? I stumbled a bit and took a name. I realized that it had been quite a while since I read a book. Unbeknownst, I had gotten into the habit of reading blogs and articles online with social media and messaging boards acting as the source. There is always more than you can chew with articles touching a wide variety of subjects. Also, it feels a bit like going down a rabbit hole, one blog/tweet leads to another which leads to another and so on until you lose track of time.

I have been a voracious reader of books since my childhood. I got hooked onto online articles and blogs only during the later part of my life. This got me thinking about the difference between reading blogs versus books.

book-1659717_640

Even though most books revolve around a core central idea, the author takes the pain to reinforce this with varying thoughts and anecdotes. The author builds a structured case around the idea and presents a lot of scenarios leading to the core idea. Reading blogs and articles in most cases feels like reading a summary of a concept or just one facet of it.

When you read a book you are enjoying the journey whereas reading a blog feels more like focussing on the destination. Both have their own place but one should strike a balance between the two.

Advertisements

Naming Things

There are only two hard things in Computer Science: cache invalidation and naming things.

— Phil Karlton

Even though the above might have been in jest, naming variables while writing code is a head-scratching experience. Should I make it short? Should I make it descriptive? If descriptive, how descriptive? These thoughts keep running in one’s head.

tag-309129_640

A simple strategy is to keep the descriptiveness of a variable’s name in line with the reach of that variable. If the variable is short-lived i.e within a small block, stick to a short name as the cognitive load of the variable is negligible. If the variable’s reach is much larger, as in if it spans a large number of lines, make it as descriptive as possible.

Goes without saying that names should adhere to the conventions that your team has adopted.

Self-infliction

I recently watched the movie Hichki. The Plot of the movie revolves around a group of kids from less privileged strata of society who get a chance to attend an elite school. During the course of time, these kids feel that the school and the more privileged students there do not give them the respect they deserve. They rebel against this by not studying, causing nuisance and failing grades.

suicide-1267709_640

Kids can be excused when they exhibit self-inflicting behavior but sadly, a lot of adults too manifest this. One common adult refrain is – The organization is not treating me well, so I am not putting my best into the job. Keeping aside morality and call of duty, who loses due to this behavior? It is you. When you do not put your best into anything, you do not improve. If you do not improve, you do not progress.

It is in your best interest to put 100% into your job irrespective of how your organization treats you. If you feel you are not treated well, talk to your higher up and see if you can change this. If not, move on. Slacking is not an answer. You are harming yourself by exhibiting this sort of behavior.