Wednesday, November 11, 2015

Who you are? Answer In light of Taittiriya Upanishad.

Taittriya Upanishad is one of the old Sanskrit scripture of ancient Vedas. In this article we will take certain part of this Upanishad and try to understand “Who we are?” in the thought of it.
The journey is to find who you really are and at last you will find yourself as well as God. In almost all religion, it’s said that you are the God you are the divine one etc., in this short metaphorical journey we will really experience the same.



There is Sufi (poem addressing Allah) poet who is said in his song “I find myself when I try to search god, I find God when I try to search myself”. This is the whole philosophy of this presentation.
Let’s start the journey to discover oneself.

Taittiriya Upanishad said,
Question > Do you want to know yourself?
Answer> Yes, of course.
Question> Ok, who you are?
Answer> this is I am, the face, the hand, leg, eye etc. In face I am the whole body!

Ok, let’s start with that. The Upanishad is saying this body as “Annayamaya Atma”. The body is made by Food. Yes, if you literally think that, our body exist because we do eat. Just think that how much food we have consumed in today? May be 2 K.g ! Ok, how much in last 7 days? 7X2= 14 Kg. and how much in last year? 365X2 = 730 Kg and so on.  Just think how much we have consumed in last 25 years! So, in broad sense, we do not see anything beyond food in body.

Ok, if the body which keeps on changing, is made with food. Upanishad saying, you are not the body. The self which we are trying to find is not the body. So, look within the body.
What you will find within body? Upanishad said, there is “Pranamaya Atma”. “Pranamaya Atma” means life.  You feel energetic, you feel hungry, sick, sad, and happy those are the functions of life. So, we find, “Annayamaya Atma” is behaving as jacket over “Pranamaya Atma”.

So, the thought to be clear, we are not “Annayamaya Atma” (not food) then are we “Pranamaya Atma”? Are we our life are we the sadness, happiness, etc which is covered by our body?
Upanishad says, No we are not the life, we are not “Pranayama Atma”. Let’s come one step deeper from this.

What is deeper than the life? Feel within, you will find your mind. Thoughts, Feelings, Memory, Decisions all comes from your mind. Upanishad is calling this as “Monamoya Atma”. People may identify him by combining the mind and body. I mean, they may define that I am so and so and I did so and so.

Do you think that the mind is what you are? No, you are not the mind, because mind changes time to time based on your experience. It’s not static and the Upanishad says, even that is not the self.
The mind is nothing but a cover by your life which is again covering by body. Let’s go next step from this.

Upanishad is saying. What do you use to use the mind? Impelled by what the mind thinks? Why mind act? Who controls our mind?  Upanishad is giving answer, it is “Intellect” and Upanishad call it as “Vidayanamaya Atma”.

So, the question comes, the intellect which we using is self? No, because it too is dynamic. The intellect which you had years ago and the intellect now, those are must be different. So, Upanishad is saying, Intellect is not self, it’s too covering by mind.

Let’s think something deeper than the intellect. What could be beyond than the Intellect? Upanishad saying there is a blankness which exist beyond intellect. Which we experience in deep sleep. Upanishad is calling this as “Anandamaya Atma”

So, are we the blankness? Upanishad saying, no we are not blankness because the blankness too is not permanent. We fall in sleep and week up, when we weak up the blankness goes away.
So, that is not self. Upanishad is concluding here, like this. The self is “Which is experiencing all those Atmas”

So, you are not your body-> You are not your life -> You are not your mind -> You are not your Intellect-> You are not the blankness beyond the Intellect. You are the one who is observing all those Atmas, all those covers and this is the God.


Friday, November 6, 2015

How common man turns into satisfied customer?

In upcoming few paragraphs what you are going to read is based on my experience and observation, not from any chapter of some management/sales book.



Sales and marketing are really an art and very few can able to master on this. Teachers of your MBA School may tell you few points for graceful selling but do not listen to them, if they have only academic background till dateJ .  Because sales is an unique art which is not possible to learn in B-school

Ok, let’s come in core discussion. I have shifted in a new place couple of months ago (due to my new job). Somehow, I managed a shelter to stay and the entire atmosphere was new to me.  The road, the people and the shops etc.

After couple of days/weeks I started to explore nearby market, started to talk to shopkeeper. I notice that I became comfortable with few shops and like to visit always there for my daily commodities.
Now, the question came to my mind! Why the particular shop in market? Although there are plenty of shops who sells same goods. Let’s analyses few use case.

Case 1.
I always visit to a particular repairing shop for servicing my two wheeler which is little far from my shelter though there is another one just near to me.

Once I went to my nearby mechanical shop to fix one nut (In mirror glass) which hardly cost 1 minute of there time (Let’s neglect usage cost of tool and risk). They charge me 10 rupees for same. I got shocked by calculating that, the cost of 1 minute of the mechanic is 5 time more than one average experienced software engineer (Yes, I am J ) who is working for a MNC in silicon valley of India.

After few days, the mirror got un-tight again and need to fix. On the way of my office I found another mechanic shop who did it for no price at all. I offered him same 10 rupees and asked why you will not charge? He replied surprisingly! Sir, it’s too less effort, to charge any amount!
  Now, here is the point to focus. May be 10 rupees is nothing neither to me nor to first motor shop but the 10 rupees has given birth of an unsatisfied customer.
Needless to say, I became permanent customer of the second motor shop.

Case 2.
I enjoy my drinking water service to my doorstep. Service was going well, till the bad day when I was getting not reachable tune from the shop keeper’s phone number contentiously. On the other side water is essential need and the pot was near to empty. After long time, I could able to connect to my shop keeper and he said he has come to his native so, cannot able to serve water for few days because someone else is taking care of shop.

I went to local market to find another vendor and saw one guy was distributing water in his hand pull van. I talk to him, get contact number along with new water connection.
Yes, so far he did not miss a single water refilling request.   

Case 3.
I always like to buy vegetables because I cook myself. Earlier, I used to not check price of each and individual vegetables but I one day I noticed that the next shop is taking much genuine price than my current shop.

Another day, I bought a pack of milk from a shop and discover that it got expire though it did not cross expire date.  

In next day I change shop and told the shopkeeper that I had bad experience of buying milk and same should not repeat. She replied, Brother just throw the milk packet on my face if it is not ok. Hu... nice confidence and assurance, what customer exactly look for.

Anyway, there are tons of example which evolves around us. May be we do not notice each and every one but each one is really valuable enough in business standpoint

The mechanic shop would not lose a customer unless he charge unfair. The water vendor would not lose one customer if he communicate properly before going to native. The vegetable vendor could hold one customer If he would honest enough in pricing.

So, always be genuine, if you are in business. Don’t forget that, your competitor is sitting next to you.




Sunday, November 1, 2015

Block controller from outer world using custom route configuration.

There are many ways to block/restrict controller from outside world. Here is some possible solution for same

      1)      We can writer custom filter to prevent the controller from being execute and use the customer as attribute
      
      2)      Within delegating handler we can write some code to sniff controller from current http context and block there.
      
      3)      We can implement custom routing mechanism to prevent some controller from being execute.

In this article we will implement custom route class by implement IRouteConstant interface. The class can be use in time route initialization. Let’s implement the class at first.

 public class ExcludeController : IRouteConstraint
    {
        private readonly string _controller;
        public ExcludeController(string controller)
        {
            _controller = controller;
        }
        public bool Match(HttpContextBase httpContext, Route route, 
        string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
        {
            return  ! string.Equals(values["controller"].ToString(),
              _controller, StringComparison.OrdinalIgnoreCase);
        }
    }

Formally, the class name is ExcludeController. We have implemented Match() function within class. It will return false when current controller name will equal to restricted controller name. Now, we have to fit the class in route definition. Here is how, we can fit the class in route entry.

routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new
                {
                    controller = "Home",
                    action = "Index",
                    id = UrlParameter.Optional
                },
                constraints: new { controller = new ExcludeController("Configuration") }
            );

Please note that, we are passing parameter value “Configuration” that implies, when request will come for Configuration controller it will just ignore because Match() function will return false.
Here is sample code for Configuration controller.

public class ConfigurationController : Controller
    {
        public ActionResult Index()
        {
            return new EmptyResult();
        }
    }


And it’s throwing 404 result when we are trying to execute.

A simple MVC route configuration for RESTFul blog url.

In this article we will configure routing for simple blog application in ASP.NET. The url will follow style of REST based url structure.  Let’s understand the routing for same.

    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "YearAndMonth",
                url: "{controller}/{year}/{month}",
                defaults: new { controller = "post", 
                action = "PostByYearAndMonth" }
                );

            routes.MapRoute(
               "PostByYear",
               "{controller}/{year}",
               new { controller = "post", action = "PostByYear" } ,
               new { year = @"\d+" }
            );

            routes.MapRoute(
                "PostByAuthor",
                "{controller}/{name}",
                new { controller = "post", 
                action = "PostByAuthor" }, 
                new { name = @"^[a-zA-Z]+$" }
            );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", 
                action = "Index", id = UrlParameter.Optional }
            );
           

        }

    }

We have defined couple of route for different type of request. Here is the controller implementation to support those routes.

public class postController : Controller
    {
        //Get all posts     
        //ex. post
        public ActionResult Index()
        {
            return new EmptyResult();
        }

        //Post by Author name
        //ex. post/sourav
        public ActionResult PostByAuthor(string name)
        {
            return new EmptyResult();
        }

        //Post by year
        //ex. post/2015
        public ActionResult PostByYear(int year)
        {
            return new EmptyResult();
        }

        //post by year and month
        //ex. post/2015/2
        public ActionResult PostByYearAndMonth(int year, int month)
        {
            return new EmptyResult();
        }


    }

Please have a look that routing entry for “PostByYear” taking year parameter which is restricted to integer type and “name” parameter in PostByAuthor is restricted to string. So, when we will pass integer value from route it will hit “PostByYear” action and when the parameter is string type, it will hit to “PostByAuthor” action.


Saturday, October 31, 2015

A large amount of today’s financial ecosystem is depending on Startup Company. In last few years startup ecosystem in India has stretched like anything. We can see plenty of startups in each and every sector, some of them are really doing well.



Anyway, venturestop.com is a digital media platform to promote startup’s success story in free. 

If you are founder/CEO of any startup and want to promote your company in free, please share your company’s information with us, we will create one nice article from this information and promote in our media.

It’s in free. 

Sunday, October 25, 2015

Pitfall in access AngularJS function from non-angular environment

In Google you will find lot of answer but there is one pitfall which I realize from my personal practical experience.

Suppose, we want to access AngularJS function from non-Angular environment (like JQuery and other JS environment). How we can do that? Very simple.

  angular.element(document.getElementById(‘Id')).scope().YourFunction();
     
Yes, we are getting element by Id and in this article here I want to focus. If you think that the “Id” is any Id value from DOM then you are wrong.

To make it work, please use the element Id where your controller is defines. Here is the example.

<div id='myId' ng-controller="IndexPageController">

In this <div> we are specifying the controller and once we want to access the function use “myId” in syntax. So the syntax will be like this.

angular.element(document.getElementById(‘myId')).scope().YourFunction();

Otherwise you may encounter function not found error. 


Sunday, October 18, 2015

Combine multiple promises and load before loading view AngularJS



It’s very common in application where we need to combine multiple promises to load and bind data in controller. 

In this article we will combine promise using “$q” service, which is well known in Angular environment.  Here is the implementation.

var app = angular.module('App', ['ngRoute']).

    config(['$routeProvider', function ($routeProvider) {
       
        $routeProvider.when('/myroute', {
               templateUrl: '../app/template.html',
               controller: 'myController',
               resolve: {
                   message: function (resultService) {
                       return resultService;
                   }
               }
           });
    }]);


    app.service('resultService', function ($http , $q) {
       
        var first = $http({ method: 'GET', url: '../Home/ReturnValue' });
        var second = $http({ method: 'GET', url: '../Home/ReturnValue' });

        return $q.all([first, second]).then(function (results) {
            return {
                first: results[0].data,
                second: results[1].data
            };
        });


    });

Please, have a look that we are combining both HTTP call using “$q” an returning result as a single object.

The object is getting return by resolve function which is defined in route. As the service is getting call in resolve of route , the data will get load before loading the view.

Here is the controller for the route.

    app.controller('myController', function ($scope, message) {
        $scope.time1 = message.first;
        $scope.time2 = message.second;

    });

Here is the output of the application.