Bad times sharpen a people's sense of humor. Laughter helps ease their frustration.

In 1945, while allied bombers were blasting their cities into rubble, Germans tried to buoy their spirits with jokes like this one:

"An optimist is a man who says, 'I'm afraid we're going to lose this war.' A pessimist is a man who responds, 'Of course we will -- but for heaven's sake, when?'"

Even the Americans who are being held hostage in Tehran have been the subject of recent quips. John E. Guiniven, a former District Liner who now lives in Larchmont, N.Y., reports that he heard this one on a commuter train a few mornings ago:

"President Carter has a new plan for solving our problem in the Middle East. When Soviet troops pass through Tehran on their way to Saudi Arabia, he's going to ask them to stop off at the American Embassy and free our people."

Cartoonist Jim Berry used the same basic idea three days ago. It is a sample of the bittersweet humor we turn inward upon ourselves because that helps us endure our frustration.

A considerably different type of humor plays a prominent role in political campaigns.

For example, a Democratic candidate who has mounted a manure spreader to address a group of farmers will began by saying, "This is the first time I have ever spoken from a Republican platform."

The line also works for a Republican candidate who says he is speaking from a Democratic platform, for this is humor directed outward, not inward. Its purpose is to sting an opponent.

Politicians convert folk humor to their own purposes, usually with good results. We all enjoy a good laugh, even when we are aware that the joke was a cheap shot and should not have been rewarded with laughter.

In the long political campaign that lies ahead, there are several basics we ought to keep in mind as we listen to the oratory and the jokes:

Don't trust a candidate who criticizes his opponent for what the opponent said or did years ago unless the critic is on record as having said and done the right things at that time. Hindsight isn't worth a plugged nickel.

Don't be swayed by a candidate who tells you how right he is now. Demand proof he was right when the opponent he criticizes was wrong.

Don't be taken in by a candidate whose claim to "foresight" is based on the assertion that if, years ago, we had adopted the policy he now proposes, we wouldn't have gotten into the mess we're in now. Ask him why he didn't advocate his present proposals years ago. And who knows what would have happened if we had followed such proposals then? Would we have gotten into an even bigger mess?

Never trust a candidate who ridicules an opponent for having changed his mind.

Conditions change. Unexpected events occur. A man who never changes his view of world events has a mind set in concrete.

One who ridicules an opponent for adapting to changing times is a cynical opportunist. I wouldn't support him for dogcatcher.

Beware of people who say, "The United States has no foreign policy." This libel has been directed at every administration of my lifetime.

Tactics change with the times, but our basic foreign policy has remained fairly constant for a long time. A politician who says with a wink that he doesn't know what our foreign policy is today is a demagogue.

Basically, our foreign policy in recent decades has been to seek friendship with other nations by giving them financial and other aid; by encouraging freedom, democracy and human rights; by refraining from selfish, Soviet-like acts of self-aggrandizement; and by respecting the right of others to determine their own destiny -- except when we intercede to protect what we deem to be our legitimate self-interest. I'm not attacking or defending that policy. I'm just describing it as most of us know it to be.

Those who equate our presence in Vietnam with the Soviet presence in Afghanistan or a dozen other countries give me a big, fat pain. We went into Vietnam because we thought we could help repel Soviet-backed invaders. We did not send our troops into Vietnam to try to take possession of that land. We wanted to get out just as quickly as we could.

We lost the war because we could not bring outselves to unleash the kind of attack that would have won. Hindsight tells us we botched up the Vietnam war. But what does hindsight tell us about Harry Truman's decision to send troops to help Koreans resist invasion? Was Korea ideologically "right" because we won and Vietnam ideologically "wrong" because we lost?

My foresight tells me that we're going to have to endure hindsight of this kind until the last politician has been elected to that Great Office In The Sky.