How focused are you?

Your focus is the most precious thing you have. To be able to focus on one task at a time is the most important skill you need to have.

However, today we have more distractions than ever before. I wrote an application to measure how much time I spend focused on doing one task.  Here is a screen shot of my activity, it tells me how much my mind is thrashing,  and I am jumping from one application to another.

My aim is to see big block of colors on this application which tells me If I was focused on one thing or not. Too many different color lines means I am doing too much time-slicing and I am distracted.


Every 10 sec, this application is making a log of my activity on my machine, and it shows an activity graph with different colors of lines per activity. This is a very simple application, It just log my activity on my PC. Code is on GitHub and you can download this application here.

Here are list of things, you can do to be less distracted:

  • Turn off all the notification on the PC and phone
  • Absolutely, you must turn off email. It is a productivity killer. I check my mail every few hours.
  • Don’t check twitter, FB and other social sites too often.
  • One most annoying distraction is when you open a web page to do something, and it by default start showing you todays news … and you end up reading the news and realize after 15 min that you open the web page to do something important. Turn off the news on default new page.
  • I know Slack, Team, Skype and communicator all are important part of your work, but I say you should turn them off too to avoid being distracted.

Webpack tutorial for beginners

Learn Webpack basics. In this screen cast we start with plain vanilla JavaScript, and then convert the code to different modules AMD and then ES6 module. And on every step of the way we will see how webpack makes our life easy and how seamlessly it works with different module system.

We will also learn how webpack is not only good for module bundling but how it can be extended for CSS, SASS and Lint etc.


Humans of Microsoft – Edward Sproull

Here is the second episode of Humans of Microsoft.


Let’s meet the man who inspired this show  “Humans of Microsoft”.

When I first come to know about Edward Sproull, I thought I must bring his story to more people, it is such an inspiring and positive story.
Ed Sproull was 27 when he woke in the hospital, disoriented and hung over. He felt a searing pain in his left leg, and suddenly the memory of the motorcycle accident came flooding back to him. He had been racing drunk when the brake line blew out, and he clipped his leg on an oncoming car. His upper leg had been fractured in 80 places, and his lower leg had been severed below the knee.
Losing a limb was a low point in Ed’s life, but he didn’t hit rock bottom until 10 years later, when he landed in prison on a six-year sentence for drug possession. As he lay on a prison cot that first night, using a toilet paper roll as a pillow, he wondered where his life went off the rails.
Ed couldn’t see a way out of this one; his future felt dim. That’s when he met the professor.
Let’s find out Ed’s journey from Prison to Microsoft.
Watch it here.

Humans of Microsoft: Jeffrey Snover

Jeffrey Snover, is a well-known figure of Microsoft. He is the inventor of PowerShell, Architect of Windows server and a Technical Fellow of Microsoft. In this show, we will go beyond the technology and try to meet the human behind the window server and PowerShell. We hope, in this personal and candid interview we will get inspired by his personal story and learn one or two things in the process. Let’s start the conversation and see what Jeffrey’s last tweet will be?


Watch it here.

Parsing Akamai logs using Azure HD Insight Spark Cluster.

You have seen many videos on Hadoop/Spark cluster, where a ubiquitous example for map reduce is used of counting the words “Banana” from a clean text files. But, in real-life your log files are not this clean, and they are not on cluster itself. Clusters are expensive affairs, so how do you programmatically create cluster and automate your processing?

Here is a presentation about developing a real-life application using Spark cluster. In this presentation, we will parse Akamai logs kept on an Azure storage. We will introduce some of the tools available. After having the script run in Jupyter notebook, we will automate the solution which can be started by a call to an endpoint.

Watch it here:



Thinking, fast and slow


In “Thinking, fast and slow”, Nobel prize winner, Daniel Kahneman talks about our mind. To explain our mind inner workings, he defines two actors, he divides our mind into two systems, “System 1” and “System 2”. “System 1” is fast, instinctive and emotional; It operates automatically and quickly, with little or no effort and no sense of voluntary control. “System 2” is slower, more deliberative, and more logical.

He describes System 1 as effortlessly originating impressions and feelings that are the main sources of our beliefs and choices. He describes System 1 with some examples of automatic activities:

  • Detect that one object is more distant than another.
  • Orient to the source of a sudden sound.
  • Detect hostility in a voice.
  • Answer to 2 + 2 = ?
  • Drive a car on an empty road.

System 2 require attention and get disrupted when attention is drawn away. Here are some examples:

  • Focus on the voice of a particular person in a crowded and noisy room.
  • Monitor the appropriateness of your behavior in a social situation.
  • Count the occurrences of the letter a in a page of text.
  • Tell someone your phone number.
  • Park in a narrow space
  • Fill out a tax form.
  • Check the validity of a complex logical argument.

Systems 1 and 2 are both active whenever we are awake. System 1 runs automatically and requires very less effort and energy from you. System 2 is expensive, slow and needs much  more effort and burn most of the glucose in your brain. It is hard to activate System 2. When all goes smoothly, which is most of the time, System 2 adopts the suggestions of System 1 with little or no modification. You generally believe your impressions and act on your desires.

When System 1 runs into difficulty, it calls on System 2 for help. System 2 is activated when System 1 does not offer an answer, e.g. what is 17 × 24?

System 2 is also credited with the continuous monitoring of your own behavior. You need System 2 for self-control. That’s why you need attention and effort for self control.

Active mind engages System 2 more often. However, majority of people, 50% of students at Harvard, MIT and Princeton avoided to activate their System 2. The number goes to 80% in less selective universities. Now, you can imagine where does the general population must  be standing.

You can raise your intelligence by improving the control of attention.

In other words, to be mentally active, to be intelligent means you are  engaging your System 2 more often than the norm.

Specially at work, where you are hard pressed for time, people are talking, communicators popping up messages, continuous mails are flowing in  and you need to reply quick. You are surviving because of your System 1, but in a hurry you may be making many mistakes too.

Now the question remains how to engage System 2 more often and rely less on System 1?

One easy technique, I found is for any issue at work, any design decisions, you quietly open a note book in your mind, divide the page  into two columns, “pro” and “cons”, and start listing the pros and cons of any issue. This act will actually activate your System 2. This will often makes you slow, but the outcome will be much better.

If system 2 is so important, then how can I keep it in good shape and lubricated the machinery to activate it more often with ease?

I think, to keep System 2 engage continuously is to remain mindful.

Continuously keep watching yourself.  Keep watching your thoughts. To keep System 2 healthy – meditate daily!

The easier for you to activate your System 2 the better you will be.

System 2 makes you thoughtful and intelligent.


Continue reading

The Role of Development Manager

Just other day, I was talking to a friend of mine who transitioned from the role of a world class Developer to be a Development Manager. He is struggling with his new role and questioning  his contribution. He came from the mindset, if there is no code produced by him, then he has not contributed.

This blog entry  is answering the narrow question of new Development Managers, who recently transitioned from dev and wondering about their contribution when their output is not code.

I tried to explain to him –

“The role of a Development Manager is like a conductor of an orchestra. The conductor never produces a sound himself but rather guides others to create sound.

I think as a development manager your role is more of an enabler. I see a good manager as a  training wheel on a kids bike, they come in play only when kids is out of balance.

If you are a Dev Manager of a large team, with multiple projects under you, then you cannot code the product by yourself.  You need to make sure to have people in team who can help you achieve your goal. The first quality of a Leader is to get work done from others by inspiring them.

A strong Dev. Manager cannot be the excited developer who runs after every new and shiny objects (new frameworks/languages/new paradigms), but instead you are the adult in team, you must accept new frameworks and adopt technologies deliberately and with caution. Every theoretical claims must be backed by empirical data. Often you contribute not only by adding features to product, but what you decided not to do.

You are the voice of customer. You must have extreme empathy with customers. Technology for the sake of technology is of no use.

Like the conductor, who understands every instrument, and their role in symphony, you need to understand every aspect of development.  You need to know what’s the best language to use to solve a certain problem. You need to know about testing, you need to be a good Product and a good Project Manager.

You need to know your team, their passion, their weakness and their strengths.Your job becomes more interesting as you not only deal with machines and software but the humans are involved. They are the most sophisticated machines with emotions and attitudes.

Like a good conductor, you should be able to play any instrument and show what exactly you want. You should be able to code but while not coding for the final symphony. You should be able to tell a bad design from a good design. You should be able to tell how an algorithm be improved. How a shiny code will crumble in production. You keep an eye for maintainability, security, extensibility, complexity and performance implication of any design.

A note of caution, don’t manage too much. Don’t be in every decision. Have smart people in your team, and get the heck out of their way. I think, your success is not measured by how many right decisions made, but how many right decisions made without you!

Sometimes big complex projects are more difficult than conducting a Symphony.

In software development, often symphonies are written as we go along.

Often end product is not well defined, no one knows how it will look in the end. As a Dev Manager, it becomes your job to explain, motivate, and guide the team to build something which is not known or seen by anyone. Often different products, developed by different teams, in different countries, by different people come together forming a perfectly beautiful product.