Monday, May 31, 2010

Firefox: Essential Add Ons

WOT – We all know about the threats which surfers suffer like viruses, spywares, adware, malicious spam, phishing etc., but here Web of Trust comes to rescue. WOT warns you about risky websites that try to scam surfers before they enter in them using a safety rating of 21 million websites, WOT combines evidence collected from multiple sources. Not only does it help surfers but also sets a protection level for children by blocking inappropriate content.

Ghostery – It keeps an eye on the websites that are keeping an eye on you i.e. it finds out that which web sites which are tracking you and would alert you about the same.

Interclue - Ever wanted to know what was behind the link before you clicked? Interclue tells you everything you need to know before you open yet another tab.


Colorful Tabs – Colors every tab in a different color and makes them easy to distinguish while beautifying the overall appeal of the interface.

Separe – Helps you keeping tabs tidy by introducing a new kind of tab.

Permatabs – turn tabs of your choice into permanent tabs that can’t be closed, and stick around between sessions.

Flashblock – blocks all Flash content from loading on a webpage.

Adblock Plus – is an enhanced version of Adblock. Block ads, applets, flash, embedded-media etc.


Download Youtube Videos+  -  Video and audio download toolbar for tube sites and flv movies

Google Toolbar for Firefox

Fastest Search: Text search on page/in all tabs. Contains many features such as search Count/regex/visualize & list result/find-as-you-type.


Friday, May 28, 2010

Basics of Delegation



1. Some Benefits:
  1. Change the management philosophy.
  2. Enhance management style
  3. Enhance your productivity
  4. Reduce your workload
  5. Increased availability


2. How delegation impacts you?
  1. Delegation is vital for effective management
  2. Reduce workload
Delegate non-critical work like:
  Researching
  Data entry
  Clerical duties
  Organizing docs
  1. Alleviate time constraints

3. How delegation impacts your employees?
1.      Increase motivation
2.      Challenge your employees
3.      Results in positive career development.

4. How delegation impacts your organization?
  1. Positive work atmosphere
  2. Efficient employees, high productivity, low turn over rates
  3. Retain skilled employees

5. Preparing you to delegate:
  Benefits:
1.      More confidence in your delegating ability
2.      Quicker task completion
3.      More time to focus on managerial tasks

6. Why managers hesitate to delegate?
  1. Managers want to be viewed as superior workers
    1. They may overextend themselves and get exhausted
    2. Employees may resent
    3. They may become inferior workers

  1. Perfectionist tendencies
    1. If you want something done right, do it yourself
Solutions:
1.      Prioritize tasks and realize that perfection is not always attainable or necessary.
2.      Redirect energy by turning mistakes/errors into positive learning experiences
3.      Hone delegation skills.

  1. Fear of being replaced

7. Delegating style:
  1. Controlling => limited experience, substantial managerial input needed  => limits responsibility, decreased stress and motivation levels
  2. Coaching => close supervision, moderately experienced employee => more responsibility
  3. Consulting => previous experience with similar tasks, manager is available for any questions, etc.
  4. Coordinating => Full responsibility to assignee, minimal feedback => results in a highly motivated workforce


8. Develop your delegating attitude:
  1. Confidence in delegating abilities
  2. willingness to take risks
  3. trust
  4. task oriented
  5. patience

9. Delegation Skills:
  1. Technical
    1. Mid to lower level employees
  2. interpersonal
  3. conceptual
              - Knowing the organizational structure
10. Attributes of a delegated task: (SMART)
  1. Pertinent to employee’s job description
  2. Possible to achieve
  3. Measurable
  4. As detailed as possible

11. Deciding What Tasks to Delegate
  1. Easily completed
  2. Suited to employee’s skills
  3. Challenging
12. Elements of a Delegated Task
1.      Mental
2.      Physical
3.      Interpersonal





Presentation Skills


1. COMPONENTS OF PRESENTATION:
  1. skills of presenter
  2. audience
  3. venue
  4. message


2. TYPES OF PRESENTATION:
1) motivate - acknowledge audience's -ve feelings and communicate vision of the future in positive way
2) inform - sequence information in logical order and ask questions to check audience's understanding
3) persuade - sell the benefits, support them with facts, appreciate audience's point of view
4) discussion - present set of options, listen to audience's views, answer audience's questions
5) entertain - amusing anecdotes, avoid telling jokes


3. WHAT MAKES A SUCCESSFUL PRESENTER?

  1) behave confidently but not arrogant - eye contact, normal voice, natural gestures/movements
  2) interact with the audience but not too much - ask and encourage to ask questions
  3) demonstrate physical skills of presenting - know your equipments


4. AUDIENCE CONCENTRATION
  External factors:
    1) Size of venue and audience
    2) How well equipped the venue is
    3) The time of day


5. PREPARING FOR PRESENTATION:
 i) objective
        write what is the expected outcome of your presentation?

 ii)  select presentation content
          - choose quickly which helps ideas to flow and saves time
          - identify main points and then connected sub-points - SINGLE WORDS, NOT SENTENCES
       Options:
         i) brainstorm  - preferred due to flexibility and imaginative approach
        ii) linear list

 iii) organize presentation content
           arrange in logical order. eg: chronological order
           group your main points.
           choose powerful sub-points


6. ORGANIZING YOUR PRESENTATION NOTES:
    usually main headings with sub point bullets - complicated or new presentation
    sometimes main headings alone    - simple content or already given the presentation before
    occasionally read presentation as a speech - eg: in case of legal liability


7. ANXIETY
Rational Reasons for anxiety
    - less experience
    - on your own
    - pressure - imp. presentation

Irrational Reasons for anxiety
    - They won't like me
    - Run out of material
    - Completely forget what I want to say

Controlling anxiety
    - hours before presentation - do normal work, relax, exercise
    - be calm just before the presentation - sit/stand comfortably, get rid of irrational thoughts, control your breathing


8. REHEARSAL
    rehearse straight after u have finished preparing your presentation
    rehearse sevaral times
    rehearse in a condition as realistic as possible

  Full rehearsal
    deliver in the correct amt of time
    Include your slides and other equipment
    Use a space similar to the size of your actual venue
    record the presentation
    rehearse in front of audience

  Partial rehearsal
    Focus on difficult parts - start and end of presentation, introduction to a section
    Practice movements and gestures
   

9. PRESENTATION ENVIRONMENT
    seating arrangement - horse shoe/classroom style
    equipment position - easy to access
    shape and size of the room - comfortable for audience, be able to see the audience
    come at the venue 1 hr before

Wednesday, May 12, 2010

Tips on Google Search

Google has become very much an indispensable tool for carrying out many of our day to day tasks. But, chances are, unless you are a technology geek, you probably still use Google in its simplest form.  If your current use of Google is limited to typing a few words in and changing your query until you find what you’re looking for, then here’s a better way – and it’s not hard to learn.

Monday, May 03, 2010

Agile software development

Agile software development contains specific tools and techniques such as continuous integration, automated or xUnit test, pair programming, test driven development, design patterns, domain-driven design, code re-factoring and other techniques which are often used to improve quality and enhance project agility.

I'll cover some of the most important agile methodologies that I found very useful in executing projects.

1. Test-driven development (TDD):
It is a software development technique that relies on the repetition of a very short development cycle: First the developer writes a failing automated test case that defines a desired improvement or new function, then produces code to pass that test and finally refactors the new code to acceptable standards.

Benefits
1. Using TDD meant writing more tests and, in turn, programmers that wrote more tests tended to be more productive.
2. Used in conjunction with a version control system, when tests fail unexpectedly, reverting the code to the last version that passed all tests may often be    more productive than debugging
3. Test-driven development offers more than just simple validation of correctness, but can also drive the design of a program.
4. It allows a programmer to focus on the task at hand as the first goal is to make the test pass. Exceptional cases and error handling are not considered       initially.
5. Eliminating defects early in the process usually avoids lengthy and tedious debugging later in the project.
6. TDD can lead to more modularized, flexible, and extensible code
7. TDD can lead to more modularized, flexible, and extensible code. See: Mock Object design pattern
8. Because no more code is written than necessary to pass a failing test case, automated tests tend to cover every code path.

Criticisms
1. The tests themselves become part of the maintenance overhead of a project.
2. The high number of passing unit tests may bring a false sense of security
3. Unexpected gaps in test coverage may exist or occur.


2. Mock Objects:

Mock objects allow you to set up predictable behavior to help you test your production code by emulating some functionality your code depends on. This might for example be a huge database which is too difficult and time consuming to maintain just for testing purposes.

Referances:
http://mockpp.sourceforge.net/ - a platform independent generic unit testing framework for C++
http://code.google.com/p/googlemock/



3. Pair programming:
It is a software development technique in which two programmers work together at one work station. One types in code while the other reviews each line of code as it is typed in.


Benefits:
* Design quality: Shorter programs, better designs, fewer bugs.
* Reduced cost of development: With bugs being a particularly expensive part of software development, especially if they're caught late in the development process, the large reduction in defect rate due to pair programming can significantly reduce software development costs.
* Learning and training: Knowledge passes easily between pair programmers: they share knowledge of the specifics of the system, and they pick up programming techniques from each other as they work.New hires quickly pick up the practices of the team through pairing.
* Overcoming difficult problems: Pairs often find that seemingly "impossible" problems become easy or even quick, or at least possible, to solve when they work together.
* Improved morale: Programmers report greater joy in their work and greater confidence that their work is correct.
* Decreased management risk: Since knowledge of the system is shared among programmers, there is less risk to management if one programmer leaves the team.
* Increased discipline and better time management: Programmers are less likely to skip writing unit tests, spend time web-surfing or on personal email,[8] or other violations of discipline, when they are working with a pair partner. The pair partner "keeps them honest".
* Resilient flow. Pairing leads to a different kind of flow than programming alone, but it does lead to flow.[citation needed] Pairing flow happens more quickly: one programmer asks the other, "What were we working on?" Pairing flow is also more resilient to interruptions: one programmer deals with the interruption while the other keeps working.
* Fewer interruptions: People are more reluctant to interrupt a pair than they are to interrupt someone working alone.
* Decreased risk of RSI: The risk of repetitive stress injury is significantly reduced, since each programmer is using a keyboard and mouse approximately half the time they were before.




4. Extreme Programming (XP):
It is a software development methodology which is intended to improve software quality and responsiveness to changing customer requirements. As a type of agile software development, it advocates frequent "releases" in short development cycles (timeboxing), which is intended to improve productivity and introduce checkpoints where new customer requirements can be adopted.

Other elements of Extreme Programming include:
1. programming in pairs or doing extensive code review,
2. unit testing of all code,
3. avoiding programming of features until they are actually needed,
4. a flat management structure,
5. simplicity and clarity in code,
6. expecting changes in the customer's requirements as time passes and the problem is better understood, and
7. frequent communication with the customer and among programmers.

XP attempts to reduce the cost of change by having multiple short development cycles, rather than one long one.

Criticism:
    * A methodology is only as effective as the people involved, Agile does not solve this
    * Often used as a means to bleed money from customers through lack of defining a deliverable
    * Lack of structure and necessary documentation
    * Only works with senior-level developers
    * Incorporates insufficient software design
    * Requires meetings at frequent intervals at enormous expense to customers
    * Requires too much cultural change to adopt
    * Can lead to more difficult contractual negotiations
    * Can be very inefficient — if the requirements for one area of code change through various iterations, the same programming may need to be done several       times over. Whereas if a plan were there to be followed, a single area of code is expected to be written once.
    * Impossible to develop realistic estimates of work effort needed to provide a quote, because at the beginning of the project no one knows the entire           scope/requirements
    * Can increase the risk of scope creep due to the lack of detailed requirements documentation
    * Agile is feature driven; non-functional quality attributes are hard to be placed as user stories



5. Scrum 

Scrum is an iterative, incremental  framework for project management and agile software development.

The main roles in Scrum are:
   1. the “ScrumMaster”, who maintains the processes (typically in lieu of a project manager)
   2. the “Product Owner”, who represents the stakeholders, represents the business
   3. the “Team”, a cross-functional group of about 7 people who do the actual analysis, design, implementation, testing, etc.

During each “sprint”, typically a two to four week period (with the length being decided by the team), the team creates a potentially shippable product increment (for example, working and tested software). The set of features that go into a sprint come from the product “backlog,” which is a prioritized set of high level requirements of work to be done. Which backlog items go into the sprint is determined during the sprint planning meeting. During this meeting, the Product Owner informs the team of the items in the product backlog that he or she wants completed. The team then determines how much of this they can commit to complete during the next sprint.[1] During a sprint, no one is allowed to change the sprint backlog, which means that the requirements are frozen for that sprint. After a sprint is completed, the team demonstrates the use of the software.



Daily Scrum Meetings

Each day during the sprint, a project status meeting occurs. This is called a “daily scrum”, or “the daily standup”. This meeting has specific guidelines:
        * The meeting starts precisely on time.
        * All are welcome, but only “pigs” (i.e. the ones committed to the project in the Scrum process) may speak
        * The meeting is timeboxed to 15 minutes
        * The meeting should happen at the same location and same time every day

During the meeting, each team member answers three questions:

        * What have you done since yesterday?
        * What are you planning to do today?
        * Do you have any problems preventing you from accomplishing your goal? (It is the role of the ScrumMaster to facilitate resolution of these impediments. Typically this should occur outside the context of the Daily Scrum so that it may stay under 15 minutes.)




Wednesday, March 17, 2010

Power of UNIX

UNIX/Linux is a very powerful operating system with a lot of simple commands for small tasks. Power of UNIX lies in its ability to handle very complex, huge data requirements which would bring other operating systems to a screeching halt.


For example from my personal experience, simple utilities like grep, gzip, gunzip, split are able to handle data varying from 1 KB to GBs with the same elegance and accuracy.

Say we have a file of size around 36 GB.

Follwing operations are performed on that file:
1. gzip   : size comes down to 4.2 GB.
2. gunzip : size grows back to 36 GB.
3. grep   : Search a pattern in this file and create a new file of size around 32 GBs => happens in around half an hour!
4. gzip   : compress it back and file size becomes 4.1 GB.

Alternately, you can use split command between step 2 and 3 to split the big file in no. of small chunks and then perform the remaining operations.



The operations we performed above are quite simple. However, the huge data set on which they are applied is what makes the problem hard. That's where power of UNIX comes...




Tuesday, March 09, 2010

Vim Tips

Very useful  Vi Tips:

* # g* g#        find word under cursor (forwards/backwards) or word completion in insert mode
guu                  lowercase line
gUU                uppercase line
~                     invert case (upper->lower; lower->upper) of current character
'.                      jump to last modification line
`.                     jump to exact spot in last modification line
:reg                 display contents of all registers
:"1p                 paste from register 1
gf                    Open the file under cursor
ctrl+w f          Open the file under cursor and split screen horizontally.
vim -O file1 file2    open file1 and file2 side by side
:command              runs named command
Ctrl+w {left,right,up,down}    move to window
''                        move to previous position
Ctrl+o  move to previous position (recursively, in history)
CTRL-I jump to next location (recursively, in history)

Jumping to diffs:
[c  Jump backwards to the previous start of a change.
]c  Jump forwards to the next start of a change.


Wednesday, March 03, 2010

The Duct Tape Programmer


My Summary:

1. Duct tape programmers are pragmatic. They know that shipping is a feature. A really important feature. Your product must have it. :-)

2. It’s great to rewrite your code and make it cleaner and by the third time it’ll actually be pretty. But that’s not the point—you’re not here to write code; you’re here to ship products.

3. "One principle duct tape programmers understand well is that any kind of coding technique that's even slightly complicated is going to doom your project."

4. If there’s no unit test the customer isn’t going to complain about that.

5. One principle duct tape programmers understand well is that any kind of coding technique that’s even slightly complicated is going to doom your project.

6. Duct tape programmers have to have a lot of talent to pull off this shtick. They have to be good enough programmers to ship code, and we’ll forgive them if they never write a unit test, or if they xor the “next” and “prev” pointers of their linked list into a single DWORD to save 32 bits, because they’re pretty enough, and smart enough, to pull it off.

Its not necessary to apply everything mentioned in the article in letter and spirit. But you get the point.

Thursday, February 25, 2010

Sample vimrc file

The vimrc file contains optional runtime configuration settings to initialize Vim when it starts. On Unix based systems, the file is named .vimrc

Here is a sample .vimrc file I use.


"set smarttab       " When on, a in front of a line inserts blanks according to shiftwidth
set showmode        " Show the current mode
set showcmd         " display incomplete commands
set showmatch       " show matching braces,
set hlsearch        " highlight searches
"set title          " show title in console title bar
set laststatus=2    " always show status line
set ic              " case insensitive search : use set noic to turn it off

set nocompatible    " This setting prevents vim from emulating the original vi's bugs and limitations.

set autoindent
set smartindent
"   The first setting tells vim to use autoindent (that is, use the current line's indent level to set the indent level of new lines). The second makes vim attempt to intelligently guess the indent level of any new line based on the previous line, assuming the source file is in a C-like language. Combined, they are very useful in writing well-formatted source code.

set tabstop=2

set shiftwidth=2
"  The first setting sets up 2-space tabs, and the second tells vi to use 2 spaces when text is indented (auto or with the manual indent adjustmenters.)

set showmatch
"    This setting will cause the cursor to very briefly jump to a brace/parenthese/bracket's match whenever you type a closing or opening brace/parenthese/bracket. I've had almost no mismatched-punctuation errors since I started using this setting.

set vb t_vb=
"This setting prevents vi from making its annoying beeps when a command doesn't work. Instead, it briefly flashes the screen -- much less annoying.

set ruler
"    This setting ensures that each window contains a statusline that displays the current cursor position.


set incsearch
"    With this nifty option, vim will search for text as you enter it. For instance, if you type /bob to search for bob, vi will go to the first b after you type the b, to the first bo after you type the o, and so on. It makes searching much faster, since if you pay attention you never have to enter more than the minimum number of characters to find your target location. Make sure that you press Enter to accept the match after vim finds the location you want.

"set virtualedit=all
"    By default, vim doesn't let the cursor stray beyond the defined text. This setting allows the cursor to freely roam anywhere it likes in command mode. It feels weird at first but is quite useful.


set tags=/tags,./tags

set showfulltag         " Get function usage help automatically

""""""""""""" Highlight following in all files """"""""""""""""""""""
hi TODO ctermfg=red ctermbg=blue term=bold
syntax match TODO /TODO/




""""""""""""""""""""""""""""""""""""""""""
"        Use Cscope within Vi                        "

""""""""""""""""""""""""""""""""""""""""""" Refer http://vim.wikia.com/wiki/Cscope for more details

if has('cscope')
  set cscopetag cscopeverbose

  if has('quickfix')
    set cscopequickfix=s-,c-,d-,i-,t-,e-
  endif

  cnoreabbrev csa cs add
  cnoreabbrev csf cs find
  cnoreabbrev csk cs kill
  cnoreabbrev csr cs reset
  cnoreabbrev css cs show
  cnoreabbrev csh cs help

  command -nargs=0 Cscope cs add $VIMSRC/src/cscope.out $VIMSRC/src
endif
""""""""""""""""""""""""""""""""""""""""""

""""""""""""""""""""""""""""""""""""""""""
"               Mappings                 "
""""""""""""""""""""""""""""""""""""""""""
" Keyboard mappings
map :previous  " map F1 to open previous buffer
map :next      " map F2 to open next buffer
map :setl noai nocin nosi inde= " Disabling auto indent for the current file



Tuesday, February 23, 2010

Steve Jobs' Speech at Stanford

Here is an interesting and inspiring Commencement address by Steve Jobs at Stanford University.
In brief, he talks about life, profession, death.  


I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest I've ever gotten to a college graduation. Today I want to tell you three stories from my life. That's it. No big deal. Just three stories.

The first story is about connecting the dots.

I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?

It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: "We have an unexpected baby boy; do you want him?" They said: "Of course." My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.

And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents' savings were being spent on my college tuition. After six months, I couldn't see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didn't interest me, and begin dropping in on the ones that looked interesting.

It wasn't all romantic. I didn't have a dorm room, so I slept on the floor in friends' rooms, I returned coke bottles for the 5¢ deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:

Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didn't have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science can't capture, and I found it fascinating.

None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, its likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.

Again, you can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.

My second story is about love and loss.

I was lucky — I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation — the Macintosh — a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out. What had been the focus of my entire adult life was gone, and it was devastating.

I really didn't know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down - that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me — I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.

I didn't see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.

During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I returned to Apple, and the technology we developed at NeXT is at the heart of Apple's current renaissance. And Laurene and I have a wonderful family together.

I'm pretty sure none of this would have happened if I hadn't been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Don't lose faith. I'm convinced that the only thing that kept me going was that I loved what I did. You've got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

My third story is about death.

When I was 17, I read a quote that went something like: "If you live each day as if it was your last, someday you'll most certainly be right." It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: "If today were the last day of my life, would I want to do what I am about to do today?" And whenever the answer has been "No" for too many days in a row, I know I need to change something.

Remembering that I'll be dead soon is the most important tool I've ever encountered to help me make the big choices in life. Because almost everything — all external expectations, all pride, all fear of embarrassment or failure - these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.

About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didn't even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctor's code for prepare to die. It means to try to tell your kids everything you thought you'd have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.

I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and I'm fine now.

This was the closest I've been to facing death, and I hope its the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:

No one wants to die. Even people who want to go to heaven don't want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Life's change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.

Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma — which is living with the results of other people's thinking. Don't let the noise of others' opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.

When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960's, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.

Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: "Stay Hungry. Stay Foolish." It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.

Stay Hungry. Stay Foolish.

Thank you all very much.