The hero of this tale, Greg Heffley (Zachary Gordon), is a self-centered, lazy, but, ultimately, affable kid who is gimlet-eyed when it comes to the pecking order of middle school. Greg’s most endearing quality is his Charlie Brown terminal loserdom: No matter how hard he tries to move up the middle school cool hierarchy, life keeps bitch-slapping him back into the geek ranks. The movie is funny, endearing, and true enough to the life-is-pain spirit of the graphic novel series on which the film is based to appease kids anxious to see their own experiences mirrored back at them and to cut through the obfuscating haze of nostalgia to remind their parents of the real, but not always pleasant, sensations of middle-school. The sensibility of Diary of a Wimpy Kid is like a scrubbed-down and shiny There’s Something About Mary or The 40-Year-Old Virgin. There are moments of abject humiliation, bathroom comedy, and the ingestion of rank dairy products. But, as is often the case in the foul-mouthed Apatow canon, for the most part, a core of sweetness prevails.