The book I was thinking of before is called "Thinking, Fast and Slow"