A good villain is hard to find. To create a truly wicked character, one dastardly enough to be loathsome but complex enough to fascinate, is among the most challenging tasks a writer faces. To slowly twist readers or viewers around until they sympathize with the very same character is a feat only for the foolhardy or the brilliant.

This is the genius of the character Stringer Bell in HBO’s Baltimore crime drama “The Wire.” The cold-blooded drug lieutenant tries to go straight without any tear-jerking change of heart or mystical conversion experience. He plays by the rules of the drug game until he has the resources to try his hand as a business owner and property developer. When violence and ignorance seal off his escape from the world where he made his start, it is tragic despite his own ugly transgressions.

That Stringer Bell barely stood out in the complex ensemble last season is a tribute to the creators of the program. Their Baltimore teems with life, from the lookout kids in the drug trade up to City Hall, with the flawed cops stuck in between, taking abuse from either end. If Charles Dickens were alive today, he would watch “The Wire,” unless, that is, he was already writing for it.

The pay-cable television series is the closest that moving pictures have come so far to the depth and nuance of the novel. Feature films are far too brief, akin to a good short story. The network schedule has traditionally been so long — requiring nearly twice as many episodes as HBO — that it skews strongly toward the formulaic.