This blog post was contributed to GOVERNING View by Mark Funkhouser, director of the GOVERNING Institute and former mayor of Kansas City, Mo.

Jeremy Minnier, an 18-year-old high school student, was elected last month mayor of Aredale, Iowa, a tiny little hamlet of about 75 people. Another young mayor, Alex Morse, 22, a recent graduate of Brown University, was elected mayor of Holyoke, Mass., a little city of 40,000.  These young men deserve our thanks and appreciation for putting themselves forward and joining the hundreds of other new mayors in cities and towns across America who stepped up to the rigors of campaigning and succeeded in getting themselves elected.  And now they begin the hard part.

For me, campaigning for the office of mayor of Kansas City, Miss., was exhausting but exhilarating.  To my surprise, actually serving as mayor was even more exhausting.  But unlike Jeremy and Alex, I had already been in public life for more than 30 years and so I was pretty sure I knew what I was getting into. Turns out I was wrong. I was surprised by the relentless pressure of the work and by how much I had to learn in order to do the work well.

I did learn, and quickly.  My biggest problems occurred early in the first year of my term and even my critics would admit that I got much better at being the Mayor as time went on. If I could sit down with young Jeremy Minnier, Alex Morse or any other of the newly elected mayors across the country, I would tell them that life is long and that they don’t want to be regretful should they succumb to compromising their values just for re-election. In addition to that main point, here are five other things I would tell them I learned from the “Mayors’ School of Hard Knocks.”

1.  Stick to your principles. This seems obvious. After all, we’ve all heard the line that “If you don’t stand for something, you’ll fall for anything.” The fact is, however, you will be challenged frequently on issues of principle and most of the other players you’ll be dealing with will assume that you will back off if the stakes are high enough or the cost is too great. You will be told that politics involves compromise, and it does. But, in fact, you should only compromise when it advances one of your own principles.

In my case, I appointed a lady to the parks board in Kansas City because she was very qualified and shared my beliefs about the role of parks in the city. After I made the appointment, I (and the world) learned that she belonged to group, called the Minutemen, that has controversial views on immigration. Although I do not share her views on immigration, I refused to ask for her resignation.  I was blasted for this repeatedly, but it seemed to me that the rights of political association and free speech demanded that, so long as it did not impede her work as a parks board member, she should not be punished for her views. For me that was the right call.

2.    Be a professional politician.  Like most Americans, I had a negative view of “professional politicians.” In my years as a bureaucrat and an academician, I used the words “elected officials” instead. I’ve changed my mind. Think about what it means to be a “professional.”  A professional is someone who has developed such a high level of special knowledge and expertise in a particular field that he or she can make a living at it. Think doctor, lawyer, plumber or football player. Do you want an amateur or a professional treating your illness, arguing your case, fixing your pipes or carrying the ball for you? You want a pro. Politics is the same way. It requires a specific set of skills and knowledge and it takes time to learn to do it well. By getting elected. you’ve passed the licensing exam, now you’ve been admitted to the same profession as some of our greatest heroes, from Abraham Lincoln to John F. Kennedy. (Mind you, I didn’t say a professional liar, I said a professional politician. There’s a difference.)

3.  Communication is key.  When I ran for mayor, I was openly contemptuous of “ribbon cuttings” and ceremonial events. These seemed to be for the “haves,” and I was trying to bring more to the table for the “have-nots.” Instead, I was going to work hard to devise and implement sound solutions to my city’s enormous problems and then go home to my wife and family every night at 5:30 just as I had when I was a bureaucrat. I looked at communication as relatively minor stuff, bordering on fluff or window dressing.

The 5:30 quitting time was a short-lived fantasy. The fact is that I worked 70 to 80 hours a week and was out in the community far more nights than I was home with my family. About 80 percent of my time was spent communicating with all the different constituencies that make up the city. To be effective, you do need to listen to and talk with everyone – Democrats and Republicans, liberals and conservatives, the captains of industry, the lawyers, the bankers and the regular folks. They are all reached through different channels and you have to work each and every one of those channels.

4.  Be true to your family. I don’t know this for a fact, but I’m pretty sure the rate of alienated children and extramarital affairs that lead to family break-up is much higher for politicians than it is for other folks. I had no idea how hard my being mayor would be on my family. My son was a senior in high school when I began my run. I basically missed his senior year. Not only do the stress and the long hours take time and attention away from family, but family members and close associates are apt to be the targets of opponents constantly looking for an angle to spin something innocuous into something negative.

My wife and I are close partners who have worked together effectively and achieved a great deal in the more than 30 years we’ve been married.  She managed my successful election campaign and because she was beloved by our supporters during the campaign, she continued as a volunteer in my office after I was elected. Both of us were completely unprepared for the way perfectly innocent behavior (or sometimes nothing at all) could be the basis for vicious attacks aimed primarily at her.  Likewise both of my children were the frequent target of ridicule, especially from bloggers, some of whom actually drive the mainstream media and have huge readerships. Be prepared for this, and recognize that you’re going to have to go the extra mile help those you love cope with both your absence and their pain and hurt.

5.  The disloyal opposition.  I was prepared for the fact that people who saw problems and solutions differently than I did would disagree with me and oppose what I was pushing forward.  I did not expect that people who essentially agreed with me would oppose my ideas simply because they were mine. That happened frequently, and now I recognize that it happens often in politics.  Politics has winners and losers. If your idea gets the votes and gets implemented you’ve won a round. If you win a few rounds, other politicians may see you as amassing power and influence and a threat. Often I would hear that certain public officials would not support a particular proposal of mine because they didn’t want the mayor to be seen as “winning.” They will do this even when it hurts the constituents you’ve all pledged to serve. The best strategy to blunt the effect of the disloyal opposition is to work at the communication part of the business, not necessarily directly with your colleagues, but by going to the funders of your colleagues.  If you can create a wide enough agreement on problems and solutions with the funders, other politicians find opposition too politically costly, regardless of the ownership of the ideas involved.

My final words to Alex, Jeremy and the other new mayors are, again, thank you. I saw many people who I thought would have been very effective in elective office who simply refused to make the sacrifices required to get elected and to serve. Indeed, many commentators have noted an unwillingness of more and more qualified people to run for office because of what I’ve described.  Thanks for joining the fray.  Your city – and your country – need you.