Her essay in The New York Times drew a wide readership; she also chronicled her life with terminal cancer in a blog, finding humor amid despair.