The first time I visited one of the Canada's big aid projects in Afghanistan I was assured I would see plenty of local gratitude as students at a school we supported were expected to give us a warm welcome.

Well, warm it was — a shower of rocks and ridicule from the boys at the all grades school in Kandahar.

Actually, I would have found the whole scene quite funny had it not been for the obvious embarrassment and rage of the soldiers escorting us as we ducked the incoming rocks, all caught on camera.

This was hardly what our soldiers had come to this war-ravaged country to fight for, and I had the real feeling Canada's much vaunted development mission in Afghanistan wasn't all it was cracked up to be.

As Ottawa gets set to expand our military mission against ISIS in Iraq — likely with the promise of some aid development to follow — it's probably worth considering such past interventions, particularly given the audit just out on how our Afghan aid really fared.

The internal government audit of what has been the largest aid program in Canadian history concluded the $2.2 billion we spent yielded very mixed results, many of them disappointing in the extreme.

Yes there were some notable achievements, particular in education and health services, but nothing like the long-term impact Ottawa hoped would come from this huge infusion of aid, one that diverted hundreds of millions of dollars away from assistance projects in other very poor countries.

A few years after our exit from Kandahar, the audit finds "there is limited evidence of positive outcomes in terms of more jobs, enhanced income opportunities or better quality of services outside of the health and education sectors.

"In fact, there are some signs of potential negative impacts as a rapidly growing group of unemployed, educated youth, especially in Kandahar City, may be turning to drugs (the number of drug addicts in Kandahar City is reported to be growing rapidly), or to the insurgency."

Hearts and minds

Now, it is worth remembering that this was a truly massive Canadian undertaking, and yet, we floundered in southern Afghanistan because we didn't know what we were doing in a country we never could comprehend.

Many will see our grand plan's stumbles and set-backs there, quite correctly, as an object lesson in what to avoid in future.

As David Mulroney, who was deputy minister of the Afgan Task Force, said this past week: "Failing to look squarely at the last campaign can undermine your chances of success in the next one."

In 2010, Canadian police mentors began overseeing the first training course of female Afghan National Police officers in Kandahar City. (The Canadian Press)

Our massive development aid effort in Afghanistan was the third pillar of our national strategy there, along with the military and diplomacy.

The billions spent were supposed to win local hearts and minds, draw ordinary Afghans away from the Taliban, and help establish a more prosperous, safe and progressive society.

Fine sentiments. Yet after spending all that money and energy, as well as the blood of those killed and wounded protecting this humanitarian operation, we pulled our aid presence when we departed militarily in 2011.

The Harper government left all the work — on schools, medical clinics, even the showpiece irrigation work connected to the large, "signature project" Dahla Dam — to be picked up by the Americans.

But the handover was never properly handled, the audit says. The U.S. had other priorities and there was not enough support "to keep this strategic Canadian legacy alive."

Relentless boosterism

The almost inescapable conclusion is that Canada was as naive in departing Kandahar province as it was in accepting the military mission there in the first place.

My own view, shared by many others, is that central to Canada's problem was an overconfident, relentless boosterism around this mission that was encouraged, even demanded, throughout by Ottawa.

"We went into a complex country without a proper strategy and this was a major problem. And there was over-optimism so we were not looking at the status of the insurgency," Nipa Banerjee, who ran our aid there between 2003 and 2006, told Canadian Press this week.

In later years, the sunny Canadian outlook often astonished even NATO allies.

Chris Alexander, then our senior diplomat in Kabul and now the minister of citizenship and immigration, is remembered in one British memoir as "among the most persuasive of the optimists, and in many ways the golden boy of the effort in Afghanistan … a formidable operator who never let much check his unquenchable optimism."

For many of Canada's allies, our military and aid officials in Afghanistan simply ignored a trilogy of inconvenient facts: that the West didn't have the military or civilian capacity necessary for the challenge at hand; that the Afghans were in no position to take over any time soon; and that the Taliban grew stronger thanks to sanctuaries in neighbouring Pakistan.

In May 2007, a much younger Canadian Prime Minister Stephen Harper looks at a map of Afghanistan marked with Canadian aid projects, at a briefing at the Canadian Embassy in Kabul. (The Associated Press)

Some may be asking themselves if these elements, including overconfidence, apply to what looks to be our expanding war against ISIS in Iraq and possibly Syria.

One dark irony of this period was that the Conservative government and other ardent supporters of the war often criticized the media for being too pessimistic in its Afghan coverage.

The reality is most media were far too pliant and unquestioning of a military-civilian mission that, with rare exceptions, hid behind the false-confidence curtain dictated by Ottawa.

Understandably, many Canadians want to put that far-off war behind us and forget. But we simply can't ignore the lessons learned about the cost of our simplistic over-optimism if we're to avoid similar mistakes in Iraq or other campaigns to come.