There’s enough to do in San Francisco that some people actually spend a lifetime there. If you only have a weekend, though, you have to be particular. You could try visiting the city’s literary sites, except so many writers have lived in San Francisco that even a literary tour must be limited. I suggest a closer focus: the bound worlds of the beat generation and Dashiell Hammett, the great detective writer. Not only will you visit the haunts of some of the country’s greatest writers and troublemakers but you won’t have to go across the bridge, you’ll see areas of the city that you might not see otherwise, and you’ll feel as if you’re part of the life and history of the town.

Of course, you’ll want to stay in a charming but reasonably priced hotel. San Francisco has a multitude of them, but my personal choice has always been the Queen Anne (1590 Sutter Street). Built in 1890 as a girls’ school, the Queen Anne is an elegant Victorian relic with comfortable rooms. In the morning forgo the hotel’s free continental breakfast and go directly to North Beach. Few places on earth are as pleasant in the morning as this traditional Italian neighborhood. Have breakfast at one of the many coffeehouses on Columbus Avenue or Grant Avenue and watch the former nerve center of the beat generation come slowly and calmly to life. Then head to 576 Green Street, near the northeast corner of Columbus and Green. This boring bank building was once the location of The Cellar, the most famous club of the beat era, where poetry readings and jazz flourished. A few doors to the east is Gino and Carlo (548 Green Street), itself a famous bar from the beat days. Walk a few steps farther east to 1353 Grant and the Lost and Found Saloon, formerly the Coffee Gallery. The club hasn’t changed much at all over the past forty years—its small stage still hosts bands (all day on Sundays) and readings. In 1967 I saw Creedence Clearwater Revival there when they were still playing for tips.

A short walk south, to the corner of Broadway and Columbus, lies City Lights bookstore (261 Columbus), the intellectual center of the beat movement and its great surviving institution. The store has expanded since the early days, but it still has the same tiny room and cashier just inside the door and the same narrow, creaky wooden steps down to the basement. Near the cash register pick up a copy of The Dashiell Hammett Tour, by Don Herron. It’s a delight to read and a great source of information about Hammett and the San Francisco of the twenties.

Outside City Lights, walk east down Broadway and through the heart of the famous topless dancing craze of the sixties. Some tired sex sixties. Some tired sex clubs still remain. At 1010 Montgomery Street, on the corner of Broadway and Montgomery, is a large white apartment building where Allen Ginsberg lived when he wrote Howl. There is a fine view from here of downtown San Francisco in one direction and of the bay and the Bay Bridge in the other. Pause for a moment to reflect on such a despairing poem being written in such a pleasant setting. Back down Broadway you might want to stop for lunch at Little Joe’s (523 Broadway)—cheap, easy, and savory Italian food.

North Beach gets crowded and less pleasant in the afternoon, particularly on Fridays and the weekend. This is a good time to visit some Hammett sites. First head to 891 Post Street, at the corner of Post and Hyde. Hammett moved into the left corner apartment on the fourth floor facing Hyde in 1927. Here he wrote The Maltese Falcon, featuring his most famous character, detective Sam Spade. Some passages in the novel suggest that this was also Spade’s apartment. The neighborhood is much the same as it was in 1927—respectable, but charmless and slightly menacing, perfect for a tough private eye.

Several blocks toward downtown, just off Bush Street between Powell and Stockton, lies the radioactive core of Hammett’s San Francisco. Dashiell Hammett Street runs here and the apartments at number 20 (where he lived briefly in 1926) are named Dashiell Hammett Place. At the corner of Grant and Stockton sits an overpass; in Hammett’s day the building on Stockton immediately to the right of the overpass was under construction. This is where the body of Spade’s murdered partner, Miles Archer, was discovered—the scene is convincingly recreated in Hollywood’s version of The Maltese Falcon starring Humphrey Bogart. Just to the east is a blind alley named Burritt Street, where Archer was murdered—the blindness of the alley is crucial to Spade’s solution of the crime.

For dinner go back to North Beach. Parking is a problem; the cheapest lot I found was between Powell and Columbus on Green Street, here called Beach Blanket Babylon Boulevard (it’s a long story). Close by, at 532 Columbus, sits Reed Hearon’s Rose Pistola. Reed is the son of Texas novelist Shelby Hearon. A poem by local legend Lawrence Ferlinghetti, the owner of City Lights bookstore and a frequent customer, graces the back of the menu. The restaurant is elegant and beautiful, and the food is too. If Rose is full, try Moose’s (1652 Stockton Street) or New Pisa Restaurant (550 Green Street). After dinner walk down to Tosca Cafe (242 Columbus Avenue), right across the street from City Lights, for coffee or a nightcap. For years Tosca has been a favored hangout for writers, actors, painters, classical musicians, and other interesting folk. Allen Ginsberg and Bob Dylan were once kicked out, under complicated circumstances. Spec’s (12 Adler Alley), in a cul-de-sac next door to Tosca, and Vesuvio (255 Columbus Avenue), right across the street, are two other longtime literary watering holes. Jack Kerouac once spent the night drinking in Vesuvio when he was supposed to be driving down to Big Sur to meet Henry Miller. Perhaps, over drinks there, you could debate the wisdom of his choice.

The second day is another chance to spend a pleasant morning in an awakening North Beach. Once again, get out before the hordes descend. This time go to Russian Hill, to 29 Russell Street, near the corner of Hyde and Green. You can get there on the Powell and Hyde cable car if it’s not too crowded. Kerouac lived at this house in 1952 with Neal and Carolyn Cassady. He revised On the Road there while the three had long mystic conversations into the night and slept with one another in various combinations. The area around the house is completely charming, with beautiful long vistas, graceful architecture, a few interesting shops, and no tourists. From here go to 3119 Fillmore Street. Now an antique store, this was once Six Gallery, where Allen Ginsberg first read Howl aloud and created a sensation that has still not ebbed. As is so often the case with beat generation shrines, this site sits in one of the most pleasant neighborhoods in San Francisco. Union Street nearby is a nice mixture of grocery stores, coffee bars, hardware stores, and exclusive shops of all descriptions.

For a farewell dinner, you’ll want to go to John’s Grill, at 63 Ellis Street. A bit off the beaten path, this restaurant was a favorite of Hammett’s: wood paneling, brass fittings, starched white tablecloths, and waiters in black jackets and starched white aprons. The bar is worn so smooth it is surely the same one Hammett stood at seventy years ago. His favorite dish was rack of lamb, but mine is seafood cioppino à la marinara, a sort of seafood soup. The walls are covered with photos of celebrities, old San Francisco, and stills from The Maltese Falcon. One warning: John’s Grill has a special, sticky-sweet drink in honor of Hammett called a Bloody Brigid; even the waiters will tell you not to order it, and they are right.

As I mentioned, two days are not enough to see all of the interesting literary sites here. There is, for instance, Downey Street in the Haight, where poet and playwright Michael McClure threatened me with a hatchet one night when I…but that’s a literary tour for another time.