Martin Seligman developed the theories of learned helplessness and learned optimism. His daughter inspired him to focus on positive psychology when she told him about stopping her whining. Seligman found that when dogs received random and uncontrollable shocks, they later failed to escape subsequent shocks even when escape was possible. In humans, this relates to reactive depression and learned helplessness. However, optimism and control can be learned through encouraging effort and showing people they influence events. Seligman developed techniques like attributional style to help people explain events in a more optimistic and flexible way.