You perception will shape your self-esteem. If you tend to have a negative outlook on life, then you will determine most things as a failure as soon as you hit an obstacle. With a more positive outlook to life, obstacles just add to the excitement as you enjoying learning about new ways to achieve what you want.
