I just got back from a stay in Costa Rica that was quite pleasant - almost too pleasant.

The Costa Ricans do such a wonderful job of running things that life there is almost boring. If it weren't for the crocodile that bit the leg off a surfer who tried to take a short cut across an estuary last year, there would be nothing risky worth mentioning in the beach town where I spent my time.

What accounts for this prosperity in a part of the world infamous for violence? Jose Figueres Ferrer does. In 1948, he came to power after one of the many coups and civil wars that had consumed the country.

Figueres noted that Costa Rica was protected on both sides by oceans and had land borders with just two countries, neither of which represented a threat.

So he disbanded the army in favor of a small defense force. Costa Rica has prospered ever since while its neighbors have impoverished themselves by internal warfare.

There's a lesson in that, one that its neighbor to the north could profit from. Like Costa Rica, we have oceans to the east and west and non-threatening neighbors to the north and south. But anyone who points out that we might profit from taking advantage of our fortunate geography risks being branded an "isolationist."

That was the term Jeb Bush used to describe Donald Trump back when the Jeb still had a chance of becoming the third President Bush. In a January 2016 TV interview, Bush invoked that term because of Trump's stated desire to avoid getting further involved in the Syria civil war.

The voters didn't buy Bush's approach. But what approach did they buy?

It's hard to tell. But Trump's recent nomination of Lt. Gen. H.R. McMaster for the position of National Security Adviser is a good sign that Trump is leaning toward a policy more concerned with the defense of the nation than with the sort of endless Mideast meddling the Bushes favored.

If you doubt that, I invite you to read McMaster's 1997 book "Dereliction of Duty: Lyndon Johnson, Robert McNamara, the Joint Chief of Staff and the Lies That Led to Vietnam."

My copy is packed with Post-It notes on the pages where McMaster, who was then a major, offers piercing insights on his main theme - the idea that through the miracle of modern technology wars can be made somehow so safe and predictable that we risk little by getting involved in them.

McMaster writes of how McNamara, a former business executive, pushed on President Johnson the idea that the U.S. could defeat the Viet Cong and North Vietnamese forces through sheer managerial brilliance.

"Based on the idea that carefully controlled and sharply limited military actions were reversible, and therefore could be carried out at minimal risk and cost, graduated pressure allowed McNamara and Johnson to avoid confronting many of the possible consequences of military action," he wrote.

That didn't work out in Vietnam, but the same mind-set returned after the Gulf War, in which McMaster commanded troops. After what at first looked like a quick victory, the Beltway geniuses assumed they had war reduced to a science. McMaster begged to differ.

"It's so damn complex," he said. "If you ever think you have the solution to this, you're wrong and you're dangerous."

McMaster is not the second coming of Figueres, of course. His stated desire is not to get rid of the army but to use it only in the narrow national interest. He's not an isolationist but a realist.

This distinguishes him from some of the certified non-geniuses that Trump had talked of appointing to key roles. One was John Bolton, the bumbling U.N. ambassador in the Bush 43 administration who argues that we haven't invaded enough countries just yet. Fortunately Trump left Bolton in private life.

As for McMaster, he's inheriting a mess made by those who keep repeating the same mistakes that led LBJ to get the U.S. dragged into Vietnam.

Recently he's warned against the way in which the "military-industrial complex" - as Dwight Eisenhower put it - entices the Beltway crowd into believing whatever technology they're pushing can make war so manageable that actual human soldiers are barely needed.

"The military-industrial complex may represent a greater threat to us than at any time in history," he said in a 2015 speech to a Florida audience.

In his book McMasters details how the president's military advisers, the Joint Chiefs of Staff, refused to level with him about the consequences of intervention in a faraway land they only dimly understood.

Let's hope this adviser is a bit more forthright. Our foreign policy may never be as boring as Costa Rica's, but it certainly should be a lot less interesting.

ADD: McMaster's ideas on war could have come directly out of the Classic "The Art of War" by Sun-Tzu, a work of timeless wisdom that the non-geniuses inside the Beltway have chosen to ignore.

Here's a classic insight that applies to our 15-year so-called "War on Terror":

"No country has ever profited from protracted warfare. Those who do not thoroughly comprehend the dangers inherent in employing the army are incapable of the potential advantages of military actions."

Remind you of anyone? I mean, other than the entire Beltway establishment.

Also, here's former Vietnam Green Beret and consummate Mideast realist Pat Lang on McMaster:

"I have long considered LTG McMaster to be the best officer of his generation in every way that matters. Therefore I am immensely pleased that President Trump has chosen him for this job."

Read the comments thread for some interesting insights from some actual military experts. Lang's Sic Semper Tyrannis blog attracts some of the top realists - and zero of the unrealists known as "neo" conservatives.