The Speaker of the House of Delegates undid the latch on the fence and bounced up the steps onto the porch of the Northwest Baltimore house. "Hi, [I'm] Ben Cardin," he said to the man standing on the porch, who held a baby in his arms.

Then, he turned to the baby and did a Donald Duck imitation.

"Quack, quack, quack," said the most powerful man in the Maryland state legislature.

The baby giggled. Cardin turned to the stunned father. "Well, now that I have your son's vote, I'll work on you."

State Sen. Howard A. Denis (R-Montgomery) calls it, "the long march." Doorknocking. Shoe-leathering. Walking. Whatever the title it is the most basic grassroots form of campaigning, the last bastion of genuine one-on-one politician-to-people meetings left.

For a politican running in anything larger than a district-wide race it is outmoded and, essentially useless because not enough people can be reached by knocking on their doors. But in a legislative district it is still the staple of most campaigns. He who knocks on the most doors often as not gets elected.

When people ask Del. Gerard F. Devlin (D-Prince George's) ask why, as a popular incumbent, he continues to knock on doors, he relates a story about Speaker of the House of Representatives Thomas P. (Tip) O'Neill, who encountered a long-time friend shortly after his first election to Congress.

The man said, "You know Tommy, I almost didn't vote for you."

The stunned O'Neill replied, "but you've known me since I was a boy. I cut your grass, ran errands for you, went to the same church as you. Why wouldn't you vote for me?"

"Because Tommy," the man said, "I like to be asked."

Doorknocking is the politician's chance to show the voter, by trudging up his steps, that he is truly committed and wants his vote. It also is the voter's chance to look a candidate in the eye and say what he is unhappy with. And it can be a humbling experience for a politician.

"It is remarkable to find out sometimes how little people know or care about politics," said Del. Luiz R. Simmons, who is seeking the Republican nomination for Montgomery County executive in Tuesday's primary. "People often don't know when the primary is or even that there is a primary. Or, they don't have the vaguest notion what a delegate does."

Last week Denis, one of the few politicians who doorknocks by himself, trudged up and down the long hills of Duvall Drive in Bethesda. At one door he was asked his views on the Middle East; at another he was asked to cut taxes; at a third he listened for 10 minutes as a woman asked him why the state senate couldn't do something about the illegal immigration.

Denis encountered three people on Duvall who complained about their mail service. The next day he checked and found that there had been problems with mail delivery throughout that section of Bethesda, including in his own office building. He sent a letter to the postmaster general with carbon copies to the people who had complained.

A lot of times you ask people, "is there any problem I can help you with and they say no,'" said State Sen. H. Erle Schafer (D-Anne Arundel), running for county executive. "Sometimes you think it's because they just want to get rid of you but then you realize more often it's because they haven't the vaguest notion how a politican can help them."

"Once you get over your initial shyness you enjoy it," said Del. Mary Boergers (D-Montgomery), who was appointed to her seat last year and is running for a full-term this year. "I found at first I had a tendency to be too quick because I was nervous. One man said to me, 'whoa, slow down, I can't understand you.' But when you get into a routine you really do enjoy it."

Most politicians doorknock in groups, either with other candidates, with relatives or with campaign workers. If someone at a door the candidate does not knock on wants to meet the candidate he is brought to that door forthwith.

One person who does not believe in that method is Denis, The Lone Ranger of doorknocking. "I don't think you affect people unless they meet the candidate or the candidate's spouse," he said. "If you are well enough organized, you'll hit every door in your district anyway."

The doorknocking routine has changed considerably over the years. The computer age has had a lot to do with it. No longer do candidates randomly knock on doors. Most do their walking armed with voter lists which tell them if the house has any registered voters; who they are; their party affilitation and how often they vote.

The lists not only save time but they help the politician at the door because people often are shocked to find a stranger on their steps who not only knows their name but their children's names and their party affilitation.

"When I first started in Bowie politics 20 years ago you could doorknock all day and reach all the housewives," said Del. Charles J. (Buzz) Ryan (D-Prince George's). "Now, with so many women working it really doesn't make sense to go anytime except in the evening."

Doorknocking can also be dangerous. There is not a politician alive who does not have a dog story or one who has not been bitten at least once. "I was bitten three times in 1978," said Del. Timothy F. Maloney (D-Prince George's) "but only once this year. I guess it's the power of incumbency."