How can we construct a sense of self from the fragments of life we can recall? We dissect how science and fiction shed light on the mysteries of memory