San Francisco was a popular setting for many early literary works, including Mark Twain's San Francisco, a collection of articles that glorified "the liveliest, heartiest community on our continent." It was also the birthplace of Jack London, who wrote several short stories of his younger days as an oyster pirate on the San Francisco Bay, as well as Martin Eden, his semiautobiographical account of life along the Oakland shores.
For all you mystery buffs, two must-reads are Frank Norris's McTeague: A Story of San Francisco, a violent tale of love and greed set at the turn of the 20th century; and Dashiell Hammett's The Maltese Falcon, a steamy detective novel that captures the seedier side of San Francisco in the 1920s (you can even take a walking tour of Hammett's famous haunts).
California has always been a hotbed of alternative -- and, more often than not, controversial -- literary styles. Joan Didion, in her novel Slouching Toward Bethlehem, and Hunter S. Thompson, in his columns for the San Francisco Examiner (brought together in the collection Generation of Swine), both used a "new journalistic" approach in their studies of San Francisco in the 1960s. Tom Wolfe's early work The Electric Kool-Aid Acid Test follows the Hell's Angels, the Grateful Dead, and Ken Kesey's Merry Pranksters as they ride through the hallucinogenic 1960s. Meanwhile, Beat writers Allen Ginsberg and Jack Kerouac were penning protests against political conservatism -- and promoting their bohemian lifestyle -- in the former's controversial poem "Howl" (daringly published by Lawrence Ferlinghetti, poet and owner of City Lights in San Francisco's North Beach District) and the latter's famous tale of American adventure, On the Road.
Among Wallace Stegner's many works of contemporary fiction and nonfiction about the West is his novel All the Little Live Things, which explores the conflicts faced by retired literary agent Joe Allston; the book is set in the San Francisco Bay Area of the 1960s. The Spectator Bird (winner of the 1976 National Book Award) revisits Allston's character as he reflects on his life and his memories of a search for his roots.