Monday, April 30, 2018

Recommitting

I have committed to complete the Google Home app by end of April, but I haven't been able to complete it even though it is end of April because of a few reasons.

But being a professional, I can't leave something undone. I want to complete what I start. So am recommitting to completing the app as soon as possible.

I don't want to run fast only to sleep like the hare. i.e is I want to go sustain-ably like the tortoise.
The major reason why I couldn't complete is as planned is because of lack of focus or distractions.
I forgot my commitments to myself. I ignored the deep work rules even though they were just on the back of my mind.
And then distractions are just a click away. All of these cause a very familiar situation - no time. Planned work undone and amateurish plan for the next day.
But what we shouldn't forget is that there are enough hours of the day if we know how to make full use of them. 8 hours of work + 8 hours of sleep = 8 hours of remaining time. Anything worthwhile has to be done in those 8 hours only.

How can I make the best use of those eight hours? Where is the time to read news and gossips ?
Where is the time to get distracted ? couple of hours with family. 2 hours commute time.
one hour hygiene, couple of hours for speaking with parents, having food and  one hour for studying.

It seems we cannot afford to get distracted on weekdays. There is really no time. Every distraction time has to come at the expense of something else.

Now why do you want to do anything ? I feel as an engineer I can use my skills to automate stuff and save time in the lives of our fellow humans.

Ofcourse as a human, I want to use the little time on earth to make it worthwhile by doing things which inspire me and by giving something back for this awesome time on earth.

So I recommit to living fully, starting with why on everything I do, do it with complete focus and not rush but do it well.


Monday, April 16, 2018

Developing a Google Assistant app using NodeJs, Dialogflow and Firebase Functions - Part 1

What is Google Assistant?

Google Assistant is a virtual personal assistant developed by google available on variety of devices like mobile phone, smart home device, on a smart watch or on a TV or even the web. It can engage in two way conversations and can work entirely with voice. 

What can it do?

With the assistant, you can control smart home devices, do most of the functions on your phone like placing a call, sending a text etc with just your voice, play content and also interact with apps. It also has routines which is a sequence of things which can be done with a single command. So existing content can be packaged into an assistant app or apps can be built without writing any code using templates or by writing custom apps. 

How to develop custom apps for Google Assistant?

For more flexibility we can also develop apps using the APIs provided by Google. There are two APIs we can use are Actions SDK and Dialogflow 
Using the actions SDK, your app can perform actions. An action defines an entry point into your app’s functionality and maps an intent that describes the action to the fulfillment that processes the intent. The fulfilment gets the user input as string, processes the input and provides a response. This interaction continues back and forth till the action is complete. 
Dialogflow is a conversational platform that lets you design and build actions by wrapping the functionality of the Actions SDK and providing additional features such as an easy-to-use IDE, natural language understanding (NLU), machine learning, and more. So it sits above the actions SDK and works with actions SDK. 

Developing the App

Here I will show how to create an app called InspireMe using the Dialogflow API. User can talk to this app to get inspirational quotes and passages. 

The flow of the app works like this 



User specifies an intent to Google Assistant or explicitly asks for taking with the app - > The welcome intent of the app is triggered - > Fulfilment is triggered for the intent - > Fulfilment picks a quote and returns in the response - > That quote is played in the response -> User is given an option to listen another quote or end the conversation - > If user selects Yes -> another quote is picked and played -> when user says no -> App wishes user a good day and the flow ends. 


The steps to create the app are

1. Create an actions on google project. Save your app name and details
2. Build the project on dialogflow
3. On the dialogflow console, setup the intents for the app and enable fulfilment.
4. Handle the intent fulfilment webhook requests and return responses to the user.

The next steps for creating the app will are covered in part 2 here.

Monday, April 9, 2018

Leading metrics

You have something you want to achieve. It is somewhat big that you cannot complete it in one sitting. How can you make sure you keep track of it and work on it and achieve without wasting any time ?

It is by splitting the work into smaller things, allotting just enough time to complete and then tracking the leading metrics for the work we are doing. 


For e.g. the leading metric for an author in completing a book is number of words written per day. For a software developer, it is number of sub tasks completed/number of problems solved. These are different to the lagging metrics like number of books published or number of software released. Since for a person starting out and even for a person starting a new project, by definition, there will be some time before a project can be released. But to be productive in the time of development, it is important to keep track of the leading metrics. What gets measured, gets managed. 

This can be applied to everything important in your life. Identify the very important things where the result can be known only later. There, develop leading metrics to make sure you are on track. You will be surprised by how much you can achieve because of this. Apply this to your health, contributions, relations and finances. Let me know in comments how you have applied this to your life and how it has helped you. 

Monday, April 2, 2018

To be more productive, radically single task

Multi tasking is a myth. When we do multitasking our brains switch the context and this context switching is very in efficient. You might have noticed it when you go read something online and get back to work. It takes some time to settle in and again get back into work. It seems as if brain has to unload things from what it read online, then load the data related to work to start working and this switching sometimes takes 10 to 15 minutes. If you try to switch again in this time, now there was no way for brain to work efficiently.

The best way so is to do only one thing at a time, complete it and then go to the next, complete it and then go to the next and so on. If you try working like this you will be more productive and also more peaceful and at ease with work. You will also have worked in a more focused way with the whole processing power of the brain available to complete that work. This should help do the work better. It also helps to have pride in the work you do - that way you try to make it the best you can. 

There is nothing else to this. Just radically single task. Basically make a list of things in the order of priority that you want to do. Start with the first one. Finish it and start the second one till the time in the day is over or all your list is done! This will just guarantee that we don't get distracted at all. If you get distracted all you have to do is, just realize, recommit and then be back at what you're doing and restart the radical single tasking mode. 

Try it - it will be beautiful.

This is called the Ivy lee method of productivity. See the full story in James' blog