Buy @ Amazon

Search This Blog

December 14, 2015

Book Review - Zero to One

 Zero to One

This book is an Achiever’s point of view.

There are three kinds of start-ups, one focussed on solving a particular problem without worrying about the scale, the other does care for the scale. So where does the third one fit? Its the fair majority that calls itself disruptive but actually lacks any stuff.

This book is a must read if you’re genuinely yearning to start a disruptive venture rather than namesake disruptive venture. Ignorance is not always a bliss.

Go get your copy from Amazon and get enlightened!

March 26, 2015

Blocks not Parameters for logging debug information in Ruby

Okay, it really matters if you've got to log your debug information that is more than a plain dumb string without any concatenation.

Let's take our typical habit of writing a debug like below:
logger.debug("This is a " + potentially + " expensive operation")

The above snippet could be better written as below:
logger.debug { "This is a " + potentially + " expensive operation" }

The block form is recommended because the code in the block is evaluated only if the debug log is to be written/logged. 

[Ruby Doc] How to log a message?

Book Recommendation:
[Book] Ruby Programming: The well-grounded Rubyist

March 9, 2015

The Bad Developer

"Discipline.. do I look I care?"
It takes one rotten apple to spoil the entire cart of A-grade apples. And it takes one, just one #BadDeveloper to spoil the spirit and works of the entire team and hurt the project beyond anybody's imagination - no pun intended here. It thus becomes imperative to quickly identify the behavioural traits of the #BadDeveloper to save the team, project and the business from sinking.

Here is a quick list of How-To(s) to find out the #BadDeveloper (or the rotten apple in your development team). How to deal with him is for the other post. How to identify him in your team is the focus of this post.

By the way, the list in not comprehensive and I'd appreciate your participation in growing the list by commenting your experience in the comment section of this post. It helps and indeed matters!

February 14, 2015

How to check whether a string contains a substring in Ruby?

Typically, one would expect (at least I end-up trying this first, almost everytime) a method by name contains? to be available for use. Unfortunately, it isn't present.

February 1, 2015

Repair Homebrew Permissions after installing as root

If you have run brew as root or with sudo prefix, later updates to brew fail to change the git versioning. Additionally, the directory permissions to /usr/local and /Library/Caches/Homebrew gets restricted to root only.

To correct this all you need is execute the below command in your terminal:

# Reset the permissions of /usr/local and Homebrew's caches to the current user:
          $ sudo chown -R $USER:admin /usr/local /Library/Caches/Homebrew          

You now should have got your freedom back ;)