The driver of a small black sedan honked and leaned out his window one recent cold, windy Sunday.
"Go ride on the sidewalk!" he yelled.
It was a teachable moment as the bike rider continued calmly down the street near Golden Gate Park, trailed closely by two students.
The group was part of an intensive on-road class run by the San Francisco Bicycle Coalition that teaches cyclists how to ride safely not just in typical city conditions, with traffic and randomly opening car doors, but also in San Francisco's own challenging terrain, including drivers who are sometimes fed up with bicyclists.
"It's a sidewalk, not a sideride," Frances Barbour told her students later during a break, reminding them that adult cyclists should never ride on the sidewalk here, even when it seems like the best way to dodge motorists amid the city's gusty winds, slippery trolley rails and steep hills where oil can gather at the bottom.
Among American cities, San Francisco has the third highest percentage of bike trips to work slightly lower than Portland and Seattle according to figures from the Municipal Transportation Agency. Bike counts have increased 71 percent since 2007, up to 75,000 trips a day in the fall of 2011. And the San Francisco Bicycle Coalition, with more than 12,000 members, is the largest city-based organization of its kind in the country.
Before the day was over, the coalition's class would be asked to cross two busy lanes of traffic to make a left turn, use hand signals to communicate with motorists, anticipate gear changes before climbing a hill and practice emergency stops and dodges, skills increasingly necessary for riding in a city with one of the fastest growing cycling populations in the country.
Bikes have wide appeal in San Francisco for environmental and economic reasons, but also because the city is only 7 miles long and wide. It's often faster to traverse on two wheels than four.
Sheer numbers work in cyclists' favor, says long-time instructor Bert Hill, a leader of the recent training. The accident rate in San Francisco is lower than in surrounding counties, which have fewer bikes on the road.
"You can't ignore 50,000 bikes, so it gets safer," Hill said. "You can't not see them."
But that is not always true. Despite a city bike plan that includes education, creation of more bike lanes and a "Coexist Campaign," which has publicized the need for cooperation, there were 531 car and bike collisions in 2009, up from 464 the previous year, according to city figures. Late last month, a bicyclist in the Castro District struck a pedestrian who later died, but such collisions are far more rare.
Last year, a San Francisco grand jury report found mutual distrust among motorists and cyclists, leading to the inevitable conclusion that "motorists and bike users need to understand each other better." Motorists saw cyclists, among other things, as "arrogant" and "irresponsible." Cyclists described motorists as "selfish" and "an impediment."
The Bicycle Coalition has offered its skills class for more than four years, but more recently added classes for families, pregnant women and adults who've never ridden a bike.
The six-hour on-road class sometimes has a long waiting list, especially in dry seasons. In order to take it, students must complete a classroom course where they learn rules of the road and basics of safety, including correct gear and maintenance, and the importance of riding confidently, predictably and courteously.
The on-road class is a chance to put this all together. After a written test recently, the instructors led a half-dozen students to a cul-de-sac near Golden Gate Park to practice quick turns, rock dodges and scanning for traffic.
"My main tool for safety used to be common sense, but I've never taken a class," said Brian Chiu, who used to live in New York City, where he rode often even though he didn't consider it very bike-friendly. "I've never done a quick turn before."
Chiu took turns practicing those, along with quick stops, watching as Barbour demonstrated how to shift weight towards the back of the bike while straightening her arms to keep from flying over the front.
Then they hit the streets in groups of two, stopping every few blocks for feedback. They navigated an intersection with the third highest number of bike accidents and crossed trolley rails at perpendicular angles. They rode in shared lanes, with cars zipping in and out of parking spaces, and then repeated the route.
"We've polled people who bike and asked what the biggest challenges are, and it's not the hills," said Leah Shahum, the Bicycle Coalition's executive director. "The biggest one is just feeling comfortable on the road."