UNLESS HE is acquitted by a jury of all 14 counts on which he has been indicted, Mayor Marion Barry can be expected to face a sentencing judge in the next few months. Whether a plea bargain is reached or he is convicted by a jury, the question of a penalty will have to be addressed.

For defendants convicted of crimes that occurred before November 1987, sentencing was an event fraught with uncertainty and influenced by many factors not spelled out in the statute books. The most important of these were the identity and penal philosophy of the judge. Some judges were known to be lenient and more susceptible to arguments that a variety of mitigating factors, such as poverty or an unhappy childhood, should be taken into account. Others were soft on some kinds of crime -- white-collar, for example -- and tough on others. And in every courthouse there were always a handful of judges dubbed "Maximum John" or "Hard Time Jane" because of their reputations for severity. Dissatisfied defense lawyers could also complain that some judges were particularly hard on blacks, others unsympathetic to women or more favorably disposed toward the rich. Because the options available to judges were so broad and because no one was keeping track of what sentences were being meted out to similar defendants charged with identical crimes in different courtrooms, disparity, and therefore injustice, were widespread.

The adoption of sentencing guidelines has changed all that. These guidelines, now in force in all federal courts, narrow the range of penalties for specific offenses, take into account some testimony about the defendant's history and eliminate reference to others, and require a judge to impose a penalty determined by plotting these factors on a grid. Thus a college-educated white man with a record of one prior felony conviction who robs a bank in Des Moines and shoots a bystander will receive the same sentence as a poor black woman with the same record who commits those crimes in Baton Rouge.

Many judges don't like this system because it reduces their discretionary powers. Some attorneys claim that it makes plea bargaining more difficult, since a reduced sentence cannot be promised in exchange. But it cannot be said that guidelines are not predictable or fair. Both Mayor Barry and his attorneys know what they are bargaining for and what they will face if the defendant is convicted after trial. There will be no talk later of special treatment for the mayor because he is a powerful political figure. Because this phase of the case will be circumscribed by universal rules, there can be no claim of prejudice either for or against Mr. Barry. In that respect, certainly, the guidelines have fulfilled their promise and demonstrated their value.