Sunday, February 11, 2018

The One Thing - Garry Keller and Jay Papasan

In this book, the author told us how extraordinary results can be achieved just by concentrating on one right thing at a time. 
The book is divided into three parts:
  1. The Lies
  2. The Truth
  3. Extraordinary Results

Part - I  The Lies

In Part -1 (The Lies) of this book the author told us about the six lies which we received from our parents throughout our childhood.
The Six Lies are: 
  1. Everything Matters Equally
  2. Multitasking
  3. A Disciplined Life
  4. Willpower is always on Will-Call
  5. A Balanced Life
  6. Big is Bad
Let's understand these Lies in detail:

1. Everything matters Equally
Since our childhood, we have been told and dragged to do many things which are being taught equally important. But that's not the truth, According to the author, there is always a single thing which is the most important of all others and we should concentrate on that ONE Thing to achieve success. 
The author also, said that instead of creating a to-do list we all should make a success list by applying Pareto 's 80/20 Principle which says that 80% of the result can be achieved by putting 20% of efforts. More to this the author said, if we need success we should continue to apply Pareto's principle to our success list until we get our most important ONE Thing to do. 
The author also, told that doing the most important thing is always the MOST IMPORTANT Thing.

2. Multitasking
We have been told that one who is capable of doing the multitasking is the most successful man but that's not the truth. We cannot do two most important thing at the same time. Though we can walk in the garden and talk over the phone at the same time; though whenever we are crossing the busy road we cannot do the same thing (both walking and talking). The term Multitasking came from computers and even there it's not the one thing it's just that the context switching is so fast that it seems that the work is done simultaneously. We are human and doing context switching between two works we always lose few details also, it takes more time and effort to do context switch rather than finishing one work at a time and then switch to other.

3. A Disciplined Life
One more lie we have been told that we have to have a disciplined life to get succeeded but that's not true. We can't be disciplined always but what we should concentrate on is Habit. 
To be successful we need to have powerful habits and we need selected discipline to develop those habits.
A research showed that it takes an average of about 66 days to form a habit. The range is from 18 to 254 days depending on the easy to the tough behavior of habit that needs to be formed.

4. WillPower is always on Will-Call
Every time it is said that we can do anything anytime if we have a willpower. But that's not true. As per the author, our willpower is based on the fuel we have for our mind. The more we use our mind the lesser fuel is left every day. Fuel for the mind can be recharged by taking proper rest and nutritious food. 
One of the real challenges we have it that when our willpower is low we tend to fall back to our default settings. So, you must do the most priority things when your willpower is at its highest.

5. A Balanced Life
Balanced Life is a myth because if you think that you can focus on all the things then you end up giving your best to nothing.
So, to achieve extraordinary results you need to give the time it demands to your ONE most important THING. Doing so, you will be out of balance but that's OKs.

6. Big Is Bad
We have been told from our childhood that doesn't think big it's unachievable. Though, the truth is: You can achieve, what you can think.
Your thinking will either empower or restrict your tomorrow. So, thinking Big is the most important part of achieving Big.

Part - II  The Truth

In Part -2 (The Truth) of this book the author talks about the path to productivity.
The author says that to achieve extra-ordinary you need to ask a great question to yourself. Only great questions can lead you to great answers. These great questions are called as Focusing Questions. Thinking should be BIG but Focus should be small (on ONE most important THING now). 
So, the Focusing question could be: What's my one thing doing which everything else will be easier or unnecessary.
The author also says that you need to make asking the focusing question everytime a habit will keep you on track to achieving what you want to achieve.

In this part author also, tells us about three types of answers which come from your focusing questions.
a) Doable
b) Stretch
c) Possibility

a) Doable - These are the solutions which we are already accustomed to. Applying these nothing new can be learned and we will be at the same place we are currently.
b) Stretch - These are the solutions which we are not accustomed but, with a little effort we can achieve this.
c) Possibility - These are the solutions which we don't know we need to find it. Most of the times to achieve these we might need to change our behavior and acquire new skills and knowledge but doing this will lead us to a new world of knowledge and power and by doing this we can achieve extraordinary results.

Part - III Extraordinary Results

In this part, the author told us about how to achieve the extraordinary results. The author told us about three things to do to achieve extraordinary results:
a) Live with Purpose
b) Live by Priority
c) Live for Productivity
  • The author says that if we have a Bigger Purpose in life than we will have happiness in the way of achieving that purpose. 
  • To achieve big you need to train your mind to think of the Bigger Purpose but you also, need to drill it down over time until you know the most important thing that you need to do NOW to achieve your bigger purpose that's your Priority
  • To achieve the one thing you need to block your time (for that one thing) and you have to stick with that Time Block. Not only this you also, need to have Time Breaks to fill recharge your energy which is important for achieving your ONE THING. This will increase your Productivity.


At the end here is the summary.
  • Be like a postage stamp-stick to one thing until you get there - Josh Billings
  • Going small is a simple approach to extraordinary results.
  • The key is over time. Success is built sequentially. It's one thing at a time.
  • Everyone has one person who either means the most to them or was the first to influence, train or manage them. No one succeeds alone. No one.
  • Success demands singleness of purpose - Vince Lombardi
  • The ONE Thing sits at the heart of success and is the starting point for achieving extraordinary results.

Thursday, January 25, 2018

Constant and Fields

Constant 


Constant is a symbol,  the value of which is never changed. As it's value is assigned at compile time so, the compiler saves the constant value in assembly metadata.

Constant can only be of primitive type  i.e; Boolean, Char, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, Double, Decimal and String.
One exception to above is that you can have constant of non-primitive type but with value as null.
e.g; public const MyClassType ClassConst = null;

Constants are implicitly static members.

Whenever a constant is called, compiler search for it in the assembly metadata where constant is defined and embed the constant value in the intermediate Language (IL) of caller code.

For Constant no memory is required at run time as it's value is already embedded in the code. Which means that constants have no address and can't be passed as reference.
Also,  because of the embedding versioning of constants are not possible.

Fields


It's a data member that holds the instance of a value type or reference of a reference type.
Fields are stored in memory, so,  there value can be read,  write or updated at run time.

Versioning is possible with fields and variables need not to be of primitive data types as constants.

The modifiers that can be used with fields are:
  • Static
  • Instance type (default) 
  • Readonly
  • Volatile 

Readonly Fields
  • The value can only be altered in the constructor. 
  • Reflection can be used to change fields value 
  • If the field is of reference type and readonly, the reference is immutable and not the object field refers to. 


Friday, January 19, 2018

Delegates

Before understanding Delegates, we first need to understand two concepts.
  1. Covariance:- A method can return a type that is derived from the delegate's return type.
  2. Contra-variance:- A method can take a parameter that is a base of delegate's parameter type.
Note: Covariance and Contra-variance are supported only for reference types and not for value types or for the void. Because memory structure for value types and void varies, whereas, the memory structure for the reference type is always a pointer.


  • Delegates ensure that the callback method is type-safe.
  • Delegates also integrate the ability to call multiple methods sequentially and calling of static methods as well as an instance method.

When we define a delegate compiler internally creates a complete class for that delegate

internal delegate Int32 PrintString(Int32 value);

internal class PrintString: System.MulticastDelegate
{
        //constructor
       public PrintString(Object @object, IntPtr method);

    //Method with the same prototype as specified by the source code.
   public Int32 Invoke(Int32 value)
   {
        Int32 result;
       Delegate [] delegateSet = _invocationList as Delegate[];
   
      if(delegateSet != null){
          foreach(PrintString p in delegateSet)
                result = d(value);
     }
     else {
            //The delegate identifies a single method to be called back
            // Call the callback method on the specified target object.
             result = _methodPtr.Invoke(_target, value);
        }
   }
    return result;
}
  • Delegates can wrap calls to instance methods as well as static methods. For instance methods, the delegate needs to know the instance of the object the method is going to operate on.
  • Delegate types can be defined within a type (nested within other types) or at a global scope. Basically, because delegates are classes, a delegate can be defined anywhere a class can be defined.


Delegate Chain

Delegate.Combine (+=) adds delegate object to the delegate chain.
Delegate.Remove(-=) removes delegate object from the delegate chain.

eg. PrintString psString1 = new PrintString(Program.PrintToConsole);

      PrintString psStringChain = (PrintString)Delegate.Combine(psStringChain, psString1)
   
      PrintString psStringChain = (PrintString)Delegate.Remove(psStringChain, psString1)

PrintString psString1 = new PrintString(Program.WriteToConsole);
PrintString psString2 = new PrintString(Program.WriteToCloud);
PrintString psString3 = new PrintString(new Program().WriteToFile);

PrintString psChain = null;


1) psChain += psString1;



2) psChain += psString2; (A new delegate object is created)



3) psChain += psString3;


4) psChain -= psString3;

When Remove(-=) is called, it scans the delegate array (from the end towards index 0).
A) If a match found and there is only one item left in the array, that array item is returned.

B) If a match found and there are multiple items left in the array, a new delegate object is created - the _invocationList array created and initialized will refer to all items in the original array except for the item being removed, and a reference to this new delegate object is returned.

C) If you are removing the only element in the chain, Remove returns null.

Note:- Each call to Remove removes just one delegate from the chain, it does not remove all delegates that have matching _target & _methodPtr fields.

GetInvocationList() --> Operates on a Multicast delegate and returns an array of Delegate reference where each reference points to one of the chain's delegate object

Thursday, January 18, 2018

Life is what you make it - Reena Shennoy

In her book book "Life is what you make it"  Reena narrated a story of a girl named Ankita who was very intelligent and was very good in writing and painting.
The girl had seen so much of ups in her life but just after 6 months of joining MBA she became the patient of bipolar disorder and was not able to do anything.  She was not able to read and remember two sentences. After going to many psychiatrist she finally got a good doctor named as Dr. Madhusudan who helped her in recovering.  He was the one who actually made her realize that:

One should do what makes one happy and should continue with that. 

After this Ankita left her MBA and joined writing and painting courses and become very successful. 

Sunday, October 16, 2011

Online Dating


Online Dating is a very popular and online way of making new relationship via communicating with thousands of people of their interest.

It is a new way of making romantic or sexual liaison without first congregate with each other.

Some people are first fright about online dating as you are going to share your information with thousands or millions of people on the website, but once they do it, they find it very helpful. Many people found their life partners from these websites and they are very happy.

Everything has its own pros and cons same is the case with Online Dating, one side many people found their life partners but on its back side many people are being ditched on these sites. You are sharing all your information with many people so sometimes people can take extra benefits of yours. Many a times some married people seeks for extra marital affairs, some people tells a lie about themselves to trap the people, sometimes people misuse your snaps as nobody predicts the human mind. Even after all these problems all the dating websites are full of users.

If one is really serious about finding a partner on the online dating website then he/she should be very careful and specific about their profile. Your profile speaks for you there. Any one before chatting or mailing you will read your profile and most of the times people do not care about this.

When you are on the dating website you should take care of few things:
1.      Whenever you chat with any person talk to him on the things or topics you want your partner should have or should be good into them.
2.      While putting a snap on the dating website he/she should bear in mind that you should put a snap which is solely yours. Otherwise, sometimes it may create problems not only for you but for your friend(s) or family member(s) like; people may get interested in your friend instead of you. So, it is better if you put a snap which is.
3.      Whenever on the chatting site people are tend to start chatting with the members. First, filter out the people with different search criteria given on the website and then try to contact them via email or by private messaging. Many people those who are just doing time pass there will not reply you. So, by this you have one more kind of auto filtering.

Dating websites offer many services like broadcasting, online chat and message boards etc. Some gives you free registration but to search for premium members you also need to be a premium member.
So, when you are going to find a partner from any online dating website please take care of all the above mentioned things.