The late-night bull sessions in college or at backyard barbecues are at some level like out-of-body experiences, allowing a re-coloring of past experience to connect with new acquaintances. Psychological studies suggest that seeing past labels from a distance — explaining them, analyzing them, mocking them — not only reduces the sting of the memory but can also reinforce the sense that you have changed, have grown up and out of those old clothes.

A more obvious outlet to expand identity — and one that’s available to those who have not or cannot escape the family and community where they’re known and labeled — is the Internet. Admittedly, a lot of the role-playing on the Internet can have a deviant quality. But researchers have found that many people who play life-simulation games, for example, set up the kind of families they would like to have had, even script alternate versions of their own role in the family or in a peer group.

Thus the quiet one becomes more forceful, the screw-up more careful, the flake single-minded. The act of seeing your own story, and playing out other versions of it, marks the beginnings of self-definition, and is central to what happens in good psychotherapy.

Decades ago the psychologist Erik Erikson conceived of middle age as a stage of life defined by a tension between stagnation and generativity — a healthy sense of guiding and nourishing the next generation, of helping the community.

IN a series of studies, the Northwestern psychologist Dan P. McAdams has found that adults in their 40s and 50s whose lives show this generous quality — who often volunteer, who have a sense of accomplishment — tell very similar stories about how they came to be who they are. Whether they grew up in rural poverty or with views of Central Park, they told their life stories as series of redemptive lessons. When they failed a grade, they found a wonderful tutor, and later made the honor roll; when fired from a good job, they were forced to start their own business.