IN THE days of Maoist China Australia did some silly things with the diplomatic relationship, beginning with the fact that we didn't have one. We've come a long way since being "the cat's paw" and "the running dogs of American imperialism".
We've shed the bestial characteristics and graduated to human form. Better still, we're out in front.
We're leading the world's "anti-Chinese chorus", as the China Daily puts it, a paper known in Beijing as China's diplomatic noticeboard.
And we're "Building a stage for Xinjiang separatist leader", according to a Page One headline at the Global Times, a state-owned tabloid which prints 1.5 million copies a day.
It's would all be rather funny, except that there's not much that Australia can achieve in the world without being on speaking terms with China. In the 37 years between December 1972, when Gough Whitlam opened relations with China, and July 2009, Australia never copped the full colour and breadth of China's diplomatic lexicon.
The reason for the long, boring stretch of productive relations was that China's fits of high dudgeon are entirely predictable and therefore mostly avoidable. Each Australian leader - Whitlam, Fraser, Hawke, Keating, Howard - judged that it was preferable to avoid the tripwires unless there was a good policy reason to do otherwise.
Howard ran into early trouble because he didn't know the terrain. But he quickly learnt and fixed things up.
Dai Bingguo, in charge of foreign affairs in China's State Council (the cabinet), provided a China diplomatic roadmap for the Obama Administration on July 28 at the opening of the China-US strategic and economic dialogue in Washington. He said a healthy US-China relationship depended on mutual respect and "defending our core interests".
The first of China's "core interests" is to "maintain its fundamental system and state security", said Dai. Second is "state sovereignty and territorial integrity". And third: "the continued stable development of the economy and society".
The ordering is important. Economic development is indeed crucial to the Communist Party's self-perceived legitimacy, but it comes last. Confusion and disappointment over investment deals such as Chinalco are irritating but not sufficient to derail the relationship.
Beneath China's "core interests" are a series of well-established diplomatic rules. The concept of democracy is inherently threatening to China's authoritarian system while human rights, by definition, means defending the rights of individuals against the Communist Party. So the legacy of the 1989 Beijing massacre, persecuted Falun Gong practitioners, assorted political dissidents and activists all fall under the category of the "fundamental system and state security".
Tibet and Xinjiang come under the "sovereignty" heading, as do military policies that are threatening to China. And so on.
But Chinese diplomats also provide a series of what lawyers would call escape clauses, which are necessary to ensure China is not perpetually raging Sino-jihad against the whole world.
Foreign leaders, depending on who they are, can raise all of the above proscribed subjects if they do so privately. They can also take a surprising amount of practical measures that would otherwise breach the "core interest" rules, if they do so quietly.
So you can tell President Hu Jintao in private that his Tibet policies stink.
You can provide asylum for political dissidents and let them rail publicly against China, but don't be seen to be agreeing with them.
You can announce a fleet of new submarines - even if you don't really have the means or intention to actually pay for them - but don't go out of your way to advertise the fancy that they are designed to counter China's future naval power.
You can raise the case of an incarcerated business executive repeatedly through every channel and you might even get him out early, but best not do it publicly.
You probably wouldn't bother being the only leader in the world to raise the 1989 massacre on the occasion of its 20th anniversary, because there are more current priorities.
Such are the unwritten rules of China's diplomatic handbook. They are the rules that you consider if, like President Obama, your objectives are policy concerns like climate change, releasing detained home nationals, improving human rights in China, resolving the world's economic imbalances or preventing World War III.
Despite the breadth of Obama's ambitions and his commitment to values politics, the US-China relationship has never been in better shape. The strategic dialogue in Washington was attended by an unprecedented ministerial line up from both sides and Obama is planning his first presidential visit to Beijing.
At the same time, the Obama Administration is mounting a carefully targeted diplomatic campaign to attempt to obtain the release of a Beijing lawyer, Xu Zhiyong, who is important to the development of rule of law in China. Publicly, however, the Administration has not said a word about Xu, as it saves its rhetoric for persuading the American public on the vital importance of engaging with China.
Then there are some things that really are tricky, where you know China will vent its fury, but commitment to the values of democracy mean you should to do it anyway. Granting Rebiya Kadeer a visa is one of those, and no self-respecting Australian Government would have acted differently.
Kevin Rudd's Tibet speech at Peking University in April last year was a big departure from the business-focused Howard years, but a sophisticated one that was very much worth the cost, if subsequently handled well.
The trick is to store up your political capital for when you really need it and do whatever you can to avoid fanning the flames. You would not, for example, go out of your way to feed new detail about China's diplomatic tantrums to a commentator who had been crusading for a "Sinophile" prime minister to get tough on China.
If, however, your policy objectives are compromised by next week's opinion polls, or mollifying the extremes of the political left and right, or pre-empting a desperate political opposition, then you don't need a diplomatic handbook. Best to get out in front and be seen to "stand up to China".