Snape is easily one of the most complicated characters, if only because of his constant refusal to fall in line with the generally accepted rules of morality. He has too much goodness in him to really be the villain, but he's nowhere near good enough to be the hero of the story. He's capable of being both noble and extremely petty, sometimes at the same time. And for the entirety of the series, no one knows who he really is. That is, until he is about to die, and he gives Harry a teardrop full of memories. That's when the audience finally gets some insight into his character. The long and the short of it is that Snape was deeply in love with Harry's mother pretty much his entire life, and his decision to turn against Voldemort was when he killed Lily. No, Snape isn't a hero. But he's certainly a tragic figure, and deserves as much sympathy as he does censure.