The Social Network: How to make a sensational film about coding Facebook, by Aaron Sorkin

The Social Network is immensely unflattering for Mark Zuckerberg. Aaron 'West Wing' Sorkin and David 'Fight Club' Fincher have achieved a remarkable thing - an exhilarating, analytical and witty film about coding a website. But the drama is almost entirely spun out of Zuckerberg himself; his tactlessness and insensitivity around women, his obstinate and arrogant attitude to any authority figures, his precociousness and his curious mix of naivety and fierce ambition.

It's a fascinating film for anyone as obsessed by the Facebook phenomenon as we all are, and a big geek thrill to see tech culture finally done some justice by Hollywood. And would it stand up as a film on its own merits? Absolutely.

If Zuckerberg is an awkward genius, few of the other characters in the film are any more complimentary. Co-founder Eduardo Saverin is loyal but rather wet and non-committal, Napster co-founder Sean Parker is opportunistic and obnoxious and the Winklevoss twins, who claimed Zuckerberg stole their idea, are a delightful Tweedledum and Tweedledee - as styled by Calvin Klein. Discussing whether to beat their revenge out of him, Tyler says: "Well I'm 6'5", 220 and there's two of me."

Bar a sympathetic lawyer and a jilted girlfriend, women come off pretty badly. Two early-stage Facebook groupies are given short shrift when Zuck hands out jobs to his friends, and elsewhere women are seen on the periphery smoking bongs and offering up their chests as coke platters. The implications of Facebook's impact on our attitudes to privacy and friendship are touched on, but fleetingly. It's no small irony that a character with limited social skills builds a site that will redefine social relationships for half a billion people, and that's the kernel of the film.

There's a considerable amount of skill in putting pacey, engaging dialogue around scene after scene of legal negotiations and site coding which Sorkin does supremely well with well-crafted flashbacks and some unpredictable and eccentric behaviour from Zuckerberg, the boy genius. Jesse Eisenberg, who plays Zuck, apparently researched Asperger's in building up his role; in the opening scene, Zuck's inarticulate, obtuse insensitivity to his girlfriend almost seems to take that characterisation too far.

There was a moment - after a series of scenes where the 'Winklevi', as Zuck calls them, are becomingly increasingly angry - where the intensity of the plot seems to waver a little, as if there's been too much shouting for too long. But the film finds more pace and scope in the nightclubs of San Francisco, student parties of Harvard and some deliciously claustrophobic camerawork at the Henley Regatta.

By the end, it's hard not to sympathise with Zuck as the story is punctuated by scenes of him wired in and coding, seemingly isolated and overwhelmed by the phenomenon around him. He is portrayed as ruthlessly focused on creating that phenomenon, but by the end he seems less malicious - especially about the breakdown in his relationship with best friend Eduardo Saverin - and more naive. He's perversely likeable. As his lawyer says to him towards the end: "Every creation myth needs a devil."

Facebook investor Peter Thiel told a conference in San Francisco last night that even at $30bn, the site is still undervalued. While most of us will never know how close The Social Network is to the real deal, it will come to define Facebook and Mark Zuckerberg for a very long time to come. And as for Facebook's bottom line - myth building this good is only going to push that up.