Conservatives should shed no tears over Gen. Stanley McChrystal's forced resignation as U.S. commander in Afghanistan this week. The man may have been a brilliant military strategist -- and is certainly a fine patriot -- but he exercised exceedingly poor judgment, which began long before he agreed to a Rolling Stone profile that got him fired. What's more, he squandered the chance to make a forceful case that the political calculus governing the Obama administration's Afghanistan policy endangers American lives and makes success less likely.

McChrystal's first mistake was to vote for Barack Obama. McChrystal told Rolling Stone that although he had voted for Obama, his first meeting with the president didn't go well. In a thinly disguised reference to "sources familiar with the meeting," Rolling Stone quotes its source -- unmistakably McChrystal -- as describing the president as "uncomfortable and intimidated" in a roomful of military brass. Well, what did he expect? He voted for a man who not only had zero military experience but no executive experience whatever -- and one, moreover, who positioned himself as the anti-war candidate during the Democratic primaries. And it is not as if Obama was running against a Republican with similarly unimpressive credentials. How could anyone whose top priority was the U.S. military pick Barack Obama over war hero John McCain?

Worse than his initial support for Obama, McChrystal's decision to allow a reporter -- and one from Rolling Stone magazine no less -- to spend a month observing his inner circle speaks volumes about his naivete. It's as if McChrystal lacks the innate ability to distinguish friend from foe. Journalists, by definition, are never your friends. They are out to make news -- and the only sure way to do that is to stir up controversy. What was McChrystal thinking when he welcomed reporter Michael Hastings into his circle? He allowed Hastings to observe his interaction with his top advisers not just in controlled settings but when the group went out for a night on the town, drinking until the wee hours of the morning -- all of it on the record.

Surely McChrystal knew he was skating on thin ice when he allowed members of his staff to deride the president and vice president to a reporter. The Military Code of Justice is very specific on this issue. Article 88 says: "Any commissioned officer who uses contemptuous words against the President, the Vice President, Congress, the Secretary of Defense, the Secretary of a military department, the Secretary of Transportation, or the Governor or legislature of any State, Territory, Commonwealth, or possession in which he is on duty or present shall be punished as a court-martial may direct." In McChrystal's presence, his staff referred to Vice President Biden derisively, "Biden? Did you say: Bite Me?" a top adviser asks, while McChrystal jokes, "Are you asking about Vice President Biden? Who's that?"

While McChrystal's own words may have fallen short of a punishable offense, it was a dereliction of duty for him to allow his subordinates to violate the code in his presence. McChrystal may have good reason not to respect the president and vice president. But the proper way for him to deal with it would have been to resign his commission first and then speak out, not to take pot shots in the press. Had he done so, he might actually have prompted a good and open debate on whether the president's schizophrenic approach to the war in Afghanistan makes sense: increasing the number of U.S. troops at the same time that he tells the world -- and our enemies -- when he's planning on withdrawing them. Instead, McChrystal gave Obama the opportunity to look like a tough commander in chief, summoning a general to the Oval Office for disrespecting the chain of command.

The irony of the McChrystal debacle may be that we will have a much tougher commander in Afghanistan once the Senate confirms Gen. David Petraeus as his successor. Petraeus has testified before Congress that he considers the Obama administration's July 2011 Afghanistan deadline as "the date when a process begins, based on conditions, not the date when the U.S. heads for the exits." Petraeus won't make the same mistakes as McChrystal did -- and our chances of success in Afghanistan will be significantly better under his leadership.