It's true, Anakin's turn to the dark side - as was the case with virtually every other interesting storyline in the prequels - was quite badly executed.
In this particular case, a lot of the failure in the way Lucas portrayed it, was the way he put so much emphasis on Anakin's obsession over Padme's death (and acting like a general crying little bitch), that it completely overshadowed his inner conflict about the teachings of the Jedi, and Windu's ultimate betrayal of those ideals. A Jedi doesn't use the ends to justify the means. Murdering an unarmed man - regardless of his influence, power, etc - because it is likely to save future grief, flies completely in the face of what the Jedi are supposed to stand for. This is a complete exposal in Anakin's eyes. He's being told by the second highest of his order, that the teaching of the Jedi don't matter, if the stakes are high enough. So now, in Anakin's mind, if the ends justify the means, why NOT simply go to the extreme? Why not simply do away with this ineffective, hypocritical order, and instead rule the galaxy with an iron fist?
This comes across better in the novelization of episode 3, if I recall correctly, but obviously Lucas wasn't able (or willing) to put it on screen that way....instead continuing the trend of Anakin being portrayed as a whiny, weak, crying, susceptible individual who was just hoping the Sith lord that had been manipulating the galaxy all his life could perform a miracle for him. Which of course, isn't exactly the way anyone wanted to see the birth of Darth Vader.







