Foundation steps to become a leader

Recently I went through a literature which was given to me during a leadership training at my previous work. I wanted to live through the training again and decided to follow it again completely. The content was great and it was mainly conveying 3 main things to become a successful leader:

  1. Translating individual potential to team potential and individual strength to team strength
    1. This is done by showing trust in team and confidence
      1. Winning trust is not an easy thing and it is done be being honest
      2. Confidence in team is created by encouraging them to do the exemplary things by showing the path, not by doing it yourself
  2. Searching hidden potential in team and bringing it the limelight
    1. This is done by preparing and promoting team member for bigger task
      1. This is achieved by seeing big and looking for the big picture
      2. After that showing the exact same picture to everyone
      3. Finally bringing everyone to follow the same objective
  3. Do less and achieve BIG
    1. This is hardest to achieve because a leader want to see the results at his scale and to match then, he or she starts doing everything by himself and it is the end of leadership.
      1. A leader is nothing if his or her team does not see himself or herself a leader and you can not force someone to follow your lead.
        1. This is achieved by mastering #1 and #2 above.

A leader is consider to be like the “paddle” for the boat. The “paddle” seems to look very small comparative to the “boat” however it is “paddle” who gives the direction to boat and help reaching to its destination . Everyone sees the “boat” however no one see the “paddle”. Now these days leaders are like “flag” on the boat who are there to show off and get the credit from the “paddle”.

zsh Shell HowTo

I would say that as being new to mac, I found zsh shell is one of the best and I am digging more about it every day.  I thought this article would be helpful for someone who is in need of a great terminal application.  The zsh shell comes with lots of themes to beautify the static terminal. I use iTerm2 on my mac and using zsh with it, the combination made in heaven.

Screen Shot 2013-08-25 at 10.20.30 PM

I use brew on my mac (as application installer) so using brew to install zsh shell on mac is the best option however it will only work if the zsh package is available through brew installer. If you don’t have brew on your mac you can install just by visiting the site below and follow the instructions:

To check if any application or package is available on through brew you can try:

$ brew search <package_name> 

$ brew search zsh 


As we can see above the zsh package is available so we can get more info about it as below:

$ brew info <package_name>

$ brew info zsh

zsh: stable 5.0.2
/usr/local/Cellar/zsh/5.0.2 (1053 files, 8.7M) *
Built from source
==> Dependencies
Required: gdbm, pcre
==> Options
Disable the reading of Zsh rc files in /etc
==> Caveats
To use this build of Zsh as your login shell, add it to /etc/shells.

If you have administrator privileges, you must fix an Apple miss
configuration in Mac OS X 10.7 Lion by renaming /etc/zshenv to
/etc/zprofile, or Zsh will have the wrong PATH when executed
non-interactively by scripts.

Alternatively, install Zsh with /etc disabled:
brew install –disable-etcdir zsh

Add the following to your zshrc to access the online help:
unalias run-help
autoload run-help

To install zsh  shell you can just in

$ brew install <package_name>

$ brew install zsh

You can make sure installation is completed and zsh is installed:


 After the installation is completed you would need to download the config files which you can download directly from zsh git repo by cloning the repo to a specific folder. In the command below I am cloning zsh to my work folder, in its own folder name .oh-my-zsh.

 $ git clone ~/work/.oh-my-zsh

After clonOnce cloning is done you can change the shell for a specific using in your mac using chsh command used as below:

$ sudo chsh <desired_shell_binary> <user_name>

$ sudo chsh /usr/local/bin/zsh my_user_name

Now the last step to configure the zsh shell as you desired. First you would need to make sure that zsh shell resource configuration file is located in user home folder name .zshrc as below:

$ ls -lah ~/.zshrc

Next edit the .zshrc file to reflect the correct .oh-my-zsh location as below (In your case choose the correct folder where you have cloned the zsh shell config):

$ vi ~/.zshrc

Edit the path for correctness

# Path to your oh-my-zsh configuration.

You can also edit your choice of the these as below:

ZSH_THEME=”jonathan” ## “robbyrussell”

Finally source the shell to reflect the changes as below:

$ source ~/.zshrc

Thats all. You have zsh shell working with your terminal.

Space Time Crystals

Time to time, i like to think outside the work and enjoy totally random stuff so I decided to learn more on Space-Time Crystal and collected the following:

What is a crystal?

crystal or crystalline solid is a solid material whose constituent atomsmolecules, or ions are arranged in an ordered pattern extending in all three spatial dimensions. (more from wiki)

What is time crystal? (also called as space-time crystal or four dimensional crystal)

space-time crystal or four dimensional crystal is a theoretical structure periodic in time and space. It extends the idea of a crystal to four dimensions (more from wiki)

Classical time crystals:

 We consider the possibility that classical dynamical systems display motion in their lowest energy state, forming a time analogue of crystalline spatial order. Challenges facing that idea are identified and overcome. We display arbitrary orbits of an angular variable as lowest-energy trajectories for nonsingular Lagrangian systems. Dynamics within orbits of broken symmetry provide a natural arena for formation of time crystals. We exhibit models of that kind, including a model with traveling density waves.

Read Full Paper here

Quantum time crystals:

Difficulties around the idea of spontaneous breaking of time translation symmetry in a closed quantum mechanical system are identified, and then overcome in a simple model. The possibility of ordering in imaginary time is also discussed.

Read Full Paper here.


A few notable articles:

Finding Python Module version

Sometimes it becomes a need to find out particular module version in Python, here is the quickest way to find it:

  1. Launch python
  2. >>> import <module_by_name>
  3. Try any of the following way to get the module version:
    1. >>> ModuleName.__version__
    2. >>> ModuleName.version
    3. >>> ModuleName.version_string

Here is an example of finding pyCrypto (Module name – Crypto) version:

╚═╝ § python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import Crypto
>>> Crpto.__version__
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
NameError: name ‘Crpto’ is not defined
>>> Crypto.__version__
>>> quit()

Hadoop MapReduce job failure with Task process exit with nonzero status of 137

While working with Amazon EMR, it is possible that you might see an exception as below with your failed map/reduce task:

java.lang.Throwable: Child Error
Caused by: Task process exit with nonzero status of 137. 

The Root Cause:

The potential problem in this case is that, the Hadoop mapper or reducer tasks are killed by Linux OS due to oversubscribing memory.  Keen in mind that this issue  Linux OOM killer and not the Java OOM Killer. In general such issue occurs when a particular process is configured to use lots more memory then the OS could provide and due to over memory subscription OS has no other way to kill the process.

With Amazon EMR such job failure could happen very easily if use have configured setting to way high comparative to specific EMR instance type. This is because each EMR instance type has preconfigured setting for Map and Reduce jobs and a misconfiguration could lead to this problem.

An Example:

For example the EMR Instance type is m1.large which means it has 768 MB memory allocated for each Map or Reduce task in Hadoop job as below:


Parameter Value
mapred.tasktracker.reduce.tasks.maximum 3

However in the mapred-site.xml if user setup the to way high value i.e. 8GB as below:


The above configuration would cause Linux OS to kill Mapper or Reduce task due to very high memory subscription. Linus OS will kill the same process even when it is configured to use 4GB also because it is way over the configured limit.

The solution:

The solution  to this problem is to let your job use default mapreduce settings instead setting by your self during the job submission. Using default mapreduce setting helps jobtracker to run the task under  whatever settings Amazon EMR instance already have configured.


A visualization on how a blog article is viewed by linkedIn users

Once I have written a blog entry and shared through LinkedIn,  LinkedIn has a new way to visualize how my article is viewed within my inner and extended LinkedIn circle.  Here is an example:

First LinkedIn shows how my specific article is shared with others.


As displayed in the image below, you can see the blog has been views by 168 linkedIn users and 2 of them liked it. Those who liked the article are from two separate groups:

Screen Shot 2013-08-19 at 1.31.50 PM


Now in the image below, you can see who from my direct contact view and liked the article:


Screen Shot 2013-08-19 at 1.31.32 PM

Next as shows in the image blow you can see who from my extended circle liked and views the article:

Screen Shot 2013-08-19 at 1.31.42 PM

Finally you can see more….

Screen Shot 2013-08-19 at 1.37.21 PM