It is surely my fault that I held out the hope, however slight, that Bad Teacher would end up being an okay movie. Certainly, nobody that I ever discussed it with - and some of these are people that I would politely describe as having aggressively indiscriminate tastes when it comes to R-rated comedies - saw anything much to be optimistic about the ads, but sometimes we allow ourselves to be distracted by the shiny, though at this removed I don't quite remember what I thought the shiny was.

Bad Teacher finds Cameron Diaz playing Elizabeth Halsey, a 7th-grade teacher at the fictional John Adams Middle School in Chicago, who hates her job. At the film's beginning, she has just been dumped by her rich milksop fiancé, on the grounds that she was only marrying him for his money - a fair charge since it is absolutely true - and thus forced into a second year of doing the absolute minimum necessary to squeak by, though how the behavior we see her demonstrate is even the "absolute minimum" is a little tricky to figure out, given that she mostly does nothing but screen pictures like Stand and Deliver and Dangerous Minds for her charges, while she sleeps off hangovers.

There comes a moment at which the school is blessed by the arrival of a hunky, wealthy substitute, Scott Delacorte (Justin Timberlake), and on the thin evidence that a photo of his ex-girlfriend shows her to have massive breasts, Elizabeth decides that she can win his affections if she gets a boob job. This requires a massive influx of cash, and a comparable number of odd jobs, though what turns out to be the best of all possible money-making schemes involves winning a state-wide contest for test scores, and that will involve - gasp! - Elizabeth actually doing her job, and not just that, but doing it well. Will she learn the value of being a good teacher while doing this? Will she discover that the insipidly cheery Scott is better suited to the obnoxiously peppy Amy Squirrel (Lucy Punch), who teaches across the hall? Will she find that she's a much better fit for the sardonic pothead gym teacher Russell (Jason Segel)? Will she start acting with even a modicum of respect for her remarkably loyal punching-bag/co-worker Lynn (Phyllis Smith)? That these questions even come up in an American movie is pretty much all the evidence one needs to guess at the answer, and I was bold enough to daydream that there might be a French version of Bad Teacher in which Elizabeth ends up drunk and miserable and alone (in a funny way) - or better yet, that she gets everything she wants and is encouraged to be even more superficial and mercenary in all her dealings (in a funny way) - but a syrupy dénouement that doesn't completely fit the mood set up by the first two-thirds of the movie isn't at all the biggest of Bad Teacher's sins; just a petty grievance I had.

Nosir, the biggest of Bad Teacher's sins is that it doesn't do nearly enough to invest us in the characters or the situation. Okay, so even that's not so: it's biggest sin is that it's not very funny. Cameron Diaz, who is obviously having fun playing against type as a desperately cynical woman with a gutter-dirty mouth, doesn't put any effort into her characterisation beyond that level. So if your idea of great comic cinema is watching a smoking-hot 38-year-old woman saying "tits" and talking about blowjobs for 92 minutes, well, why in the heck are you reading this review when you could be at Bad Teacher right this second. For those of us who want more from our comedy - like anything at all besides the words "tits" and "blowjob" - Bad Teacher offers few compensations. Few not being the same thing as none at all - Punch is absolutely delightful to watch as a woman whose maddeningly cheerful façade is the only thing she has in place of a personality, moving heaven and earth to make sure that façade doesn't ever crack, and Smith does a lot of good straight work in a role that is, by all rights, completely unplayable - but Diaz is brutally boring, and Timberlake has never been this bad, not even in the gruesome The Love Guru.

But back to the main point, which is that the film's main other problem is that it never gives us the hook. There's not a single likable character, except for maybe Russell, and then only if you enjoy men who continue to sexually harass co-workers after being told several times to stop it (which, to be fair, puts you in the same place as screenwriters Gene Stupnitsky and Lee Eisenberg, who cut their bad comedy teeth on Year One): Elizabeth is a (theoretically) charismatic bitch who we aren't supposed to like or identify with; Lynn is too much of a punching bag, Amy is just unpleasant. One does not need to like characters in a comedy or any other film, of course; but it helps if any of those characters have something about them that we respond to on any level, and barring that, they could occupy a world that seems to have some connection to our own. Even if the movie did a good job of establishing its own highly unrealistic world, that would be something. But the behavior exhibited by each and every character is so indifferently anti-human, there's simply no good way to grab onto the material and say, "yes, that is the part that is savage and cutting and true". Some of the gags land: some are even laugh-out-loud funny. But for the most part, they're just unpleasant and cringe-inducing, except we're not so invested in the characters that their humiliation affects us much at all.

And as a direct result, the characters' eventual fates, rehabilitated or otherwise, don't matter to us, which is a hard thing coming on top of the bland artifice and contrivance of the third act. The film bets everything on its attitude, and commits to it: Diaz curses up a storm and director Jake Kasdan (who is at least capable of better work than he displays here) doesn't undercut any of the surliness of the material, and all in all it's clear that everyone was very proud of how snotty and playfully wicked they've been. But it's an attitude divorced from any insight or even coherence, mere posturing at best, and it's simply not enough to build a whole movie on. Its black heart is in the right place, but Bad Teacher is too far up its own ass to be more than intermittently amusing.