A DM who is fair and honest is set up for success.
Understand that the dice decide all. For good or bad, their outcome on any given roll shapes the character of the encounter and the adventure. Accept their outcome even when it works against your best-laid plans or intentions; it is unfair to the players for the DM to over-rule his dice. Give your antagonists and NPC’s no advantages outside of the rules of the game. Use deus ex machina sparingly, if at all.
To paraphrase my friend E.G. : “The DM doesn’t kill characters. PLAYERS kill their characters.” Be a fair DM; don’t harbour grudges against characters or intentionally set out to kill characters you believe are too powerful or you simply don’t like; or because you don’t like the player. This ruins your credibility as DM. If a character dies in your game, have it come about because the dice went against the character or because a player made poor choices for his character’s actions.
Allow for alternate possibilities during encounters. Don’t run (or ruin) the game with your ego. Let logic and common sense be a guide. Don’t “block” a player’s goals for his or her character. Give players a fair chance at winning and succeeding, and give them the chance to shape events in your game’s storyline.
Be an honest broker. Don’t break the rules to suit your needs. Be consistent. As umpire, god, and storyteller be neutral towards the characters, neither protective nor vindictive. Do not play favorites among characters or players. Make no compacts or secret deals with individual players. Admit your mistakes when you make them. Admit you don’t know when a question arises that is beyond you. Make decisions that represent the most sensible outcome to a situation, even if that outcome works against your intentions.
Respect the rules, respect the story, use your godlike DM powers carefully.