So Alex Smith — battered and injured, booed, written off as a bust, publicly scorned, targeted by sideline coaching tantrums, repeatedly demoted behind nameless rivals, his toughness questioned — has finally arrived seven years after his NFL journey began.

Smith, the former University of Utah star, has helped the previously hapless San Francisco 49ers win 13 games and a division championship. He will lead them into the playoffs this week against the New Orleans Saints.

Smith has become one of the steadiest, if least spectacular, quarterbacks in the league. What a difference the right coach and environment can make for a young quarterback. Only a year ago, Smith lost the starting job twice as the Niners won just six games.

The window of opportunity rarely remains open for quarterbacks who haven't proved themselves within a few seasons, even first-round picks. They are either waived — JaMarcus Russell (3 seasons and done), Ryan Leaf (5), Cade McNown (4), Jim Druckenmiller (3), Joey Harrington (6) — or typecast as career backups — David Carr, Matt Leinart, Akilli Smith. But Alex Smith has found his game in mid-career with the arrival of rookie head coach Jim Harbaugh, the former Stanford coach and NFL quarterback.

With the lowest interception rate in the league, Smith completed 61 percent of his passes while totaling 3,144 yards, 17 touchdowns and five interceptions, which adds up to a 90.7 quarterback rating — all career-highs, by far. Not bad for a guy who, at various times, was relegated to a backup role behind the likes of J.T. O'Sullivan, Shaun Hill and Troy Smith. It is an amazing resurgence for a player whose first three years resulted in just 11 wins, a 54 percent pass completion rate, 19 touchdown passes and 31 interceptions.

"I told Alex, 'Hey, we're going to want you to come back here next year,'" said Harbaugh.

Before Harbaugh's arrival, the 49ers were ready to give up on Smith, the first pick of the 2005 draft. It was generally agreed that he was a flop. Google "Alex Smith and bust" and you'll get thousands of hits.

And it was largely the 49ers' fault. They mishandled Smith every step of the way. They couldn't have done a worse job of nurturing a young quarterback if they had tried. They could give a clinic on How to Screw Up a Quarterback. In fact, let's do it for them.

HOW TO SCREW UP A YOUNG QUARTERBACK IN EIGHT EASY STEPS:

1. Hire seven offensive coordinators in his first seven seasons — in this case, Mike McCarthy in 2005, Norv Turner 2006, Jim Hostler 2007, Mike Martz 2008, Jimmy Raye 2009, Mike Johnson 2010, Greg Roman 2011. Each one tweaked the offense, some of them dramatically, which forced Smith to start over each season to varying degrees. A young quarterback is already faced with the daunting challenge of making split-second decisions — reading defenses and throwing on time — without giving him the additional challenge of a new offense each season.

2. Hire four head coaches in seven seasons, from the defensive-minded Mike Nolan (2005-08) to former linebacker Mike Singletary (2008-10) to interim coach Jim Tomsula (one game in 2010) to Harbaugh (2011-). Two of them handled the quarterback dramatically different than Harbaugh — or mishandled.

3. Throw him into action before he's ready. Whatever you do, don't give him the luxury of an apprenticeship that allows him to stand on the sideline for two or three seasons and learn the game, which is how Green Bay's Aaron Rodgers developed. Instead, insert him in the starting lineup five games into his rookie season, the equivalent of teaching a kid how to swim by throwing him in the deep end. Result: 1 TD pass and 11 interceptions in nine starts. Occasionally, this philosophy works (Cam Newton, for instance), but it's not for everyone (see Harrington, Carr, Leaf) and tends to shatter confidences and foster bad habits.

4. Make sure he has mediocre talent at wide receiver and a weak offensive line during his formative years. The Niners didn't get around to drafting a No. 1 receiver until 2009 — Smith's fifth season — when they used a first-round pick on Michael Crabtree, who then proceeded to miss the first six weeks of the season as the longest holdout in club history.

5. Have two different head coaches question your quarterback's toughness in the media. Singletary famously called Smith "meek." When Smith was injured, Nolan questioned whether the injury was as bad as his quarterback said it was. Smith injured his right shoulder in the fourth game of the 2007 season. It was diagnosed as a Grade-3 separation that would not require surgery. Smith missed the next three games and then played poorly when he returned for three more games. Smith claimed the injury affected his ability to throw the ball (his quarterback rating was a paltry 57.2) and he completed fewer than 50 percent of his passes); Nolan told reporters he doubted the severity of the injury. A public feud ensued and Smith was clearly wounded after being undermined by his own coach. Another examination revealed that Smith was correct — the shoulder had not healed as doctors expected. Smith underwent surgery and missed the rest of the season. He would also sit out the 2008 season with complications resulting from the same injury. By then, Nolan wasn't questioning his quarterback's injury.

6. Jerk him in and out of the lineup to further erode his confidence. From 2008 to 2010, bench him in favor of O'Sullivan (a sixth-round draft pick), Hill (undrafted free agent) and Troy Smith (fifth round).

7. Announce publicly that your quarterback probably will be released after the season. This is what general manager Scott McCloughan said in 2008. After Nolan was fired, the Niners announced they wanted Smith to return if he would take a considerable pay cut — which he did.

8. When your quarterback isn't playing well, just yell at him on the sideline in front of a packed stadium and national TV audience to make him play better. After Smith made several bad plays in a game against the Eagles last season, Singletary berated him. The resulting argument became so heated that two 49er players intervened. Singletary nearly pulled Smith out of the game, but the quarterback argued his case and not only remained in the game but played well the rest of the way. Later in the season, Singletary would also get into a sideline screaming match with Troy Smith. This was hardly any way to treat a quarterback, the leader of the team by virtue of his position.

"That's really not part of coaching," observed broadcaster and former coach John Madden.

Singletary was fired with a game left in the season.

Harbaugh has taken the opposite approach of Singletary and Nolan. He has never denigrated Smith in public. Quite to the contrary, he has referred to Smith as an "elite" player and called him worthy of a Pro Bowl selection. Shortly after getting the Niners job, Harbaugh said he wanted Smith to return to the team and was impressed that Smith wanted to return, as well.

"He's a neat guy," Harbaugh told reporters last summer. "I'm really interested in him, in just the character of Alex Smith. He's been maligned by the hometown fans there. And he's really even been thrown under the bus by his own team more than once. And the kind of character of a guy that would want to come back, prove himself with that same football team, that's rare kind of character. (It) probably falls somewhere in the endangered and extinct range. So we can win with that."

Harbaugh, it turns out, was right about that.

Email: drob@desnews.com