Donald Trump clearly followed sound, conventional military advice when he struck a Syrian air base in retaliation for the regime's use of chemical weapons. It can only be hoped he is listening the same advice as he deals with North Korea.
Last Saturday a US naval strike force led by aircraft carrier was directed to the Western Pacific, apparently in response to reports North Korea may be about to conduct another nuclear weapon test, which would be its sixth in recent times.
With the carrier group moving towards its coast this week, the North Korean regime issued defiant proclamations announcing America's "reckless moves for invading have reached a serious phase", and promising, "the toughest counteraction against the provocateurs".
Trump, for his part, tweeted, "North Korea is looking for trouble. If China decides to help, that would be great. If not, we will solve the problem without them." So clearly he is trying to put pressure on China rather than North Korea at this stage.
The Chinese President was visiting Trump at the time he struck Syria and perhaps he thinks China has been moved to do his bidding.
China has been moved to assemble troops on its border with North Korea, though for what purpose was unclear yesterday. Trump had earlier tweeted that he had "explained to the President of China its trade deal with the US would be better if it solved the North Korean problem" but it is unlikely China would bring North Korea to heel for a trade deal.
All that can be said with certainty is that Trump is finding foreign policy a great deal more satisfying than domestic affairs.
The Syrian strike brought him a chorus of support at home and abroad, which would have been a pleasant change after his failures to put a new healthcare bill through Congress and get restrictions on Muslim immigration through the courts.
The military might at his command is far more responsive to his wish. Experienced politicians come to the US presidency knowing the office is severely constrained by constitutional checks and balances at home and has more latitude to act abroad.
Trump will be learning as he goes.
It is encouraging to recall that amid all his self-confident bluster on the election campaign he always declared a high regard for military advice.
For every enemy he resolved to defeat, the generals, he said, would come up with a terrific plan.
After the Syrian gas attack, they gave him a "proportionate response", meaning it was calculated not to escalate the conflict, certainly not with Russia. A warning was given, casualties were minimised, the airfield was not even put out of action.
But the necessary message was given that poison gas is not an acceptable weapon of war.
Likewise, there is reason to be confident the US Joint Chiefs are treating North Korea with caution so the President can put China to a test.
North Korea's nuclear programme is a response to its leaders' fear, whether real or feigned for propaganda, that the US threatens its existence.
Trump needs to be careful not to play the part its propagandists write for their misled people.