"It's a bit odd going from having an audience laugh to doing everything in silence… you do a joke and there's nothing there. It's weird." Jack Whitehall is describing the difference between live stand-up and acting in a sitcom – his own sitcom, as it happens. His self-penned BBC3 comedy Bad Education finds Whitehall diversifying yet again. It was only last autumn after all that he made his acting debut in Channel 4's Fresh Meat – a well-received turn as cocky but vulnerable ex-public schoolboy "JP" that he will be reprising when Sam Bain and Jesse Armstrong's campus comedy drama returns in October. But now he's writing his own scripts.
In Bad Education, Whitehall plays newly qualified teacher Alfie, closer in age and spirit to the pupils in his classroom than to his fellow pedagogues in the staff room, and determinedly "down with the kids". The script is broad but well honed and has attracted an impressive cast that includes Sarah Solemani (Becky from Him & Her), Gavin & Stacey's Mathew Horne and Michelle Gomez of Green Wing fabulousness.
But anyone thinking that Whitehall, just 24 last month, is getting ahead of himself by writing a six-part comedy, the fact is that Bad Education has been three years in the preparation – almost longer than Whitehall has been a household name. "It's been a very gradual process," he agrees. "I've had loads of great people who were involved in the development of the script." These included Jeremy Dyson (the non-performing member of The League of Gentleman and script editor on a whole raft of recent sitcoms, including Grandma's House, Dead Boss and Kathy Burke's Walking and Talking) and Annie Griffin, the Glasgow-based American writer of legendary Channel 4 sitcom The Book Group (which also starred Michelle Gomez) and, more recently, a director on Fresh Meat.
"Alfie is obviously a bit immature – a bit of a man-child, so I think that's a heightened version of myself," Whitehall says of his character, before having second thoughts about such self-denigration. "But I don't know – it's for other people to judge." And suddenly he does look very young, albeit in a tired way, having taken the day off from filming the second series of Fresh Meat in Manchester for this publicity day in London.
Abbey Grove is supposedly an inner-city comprehensive, and Bad Education was filmed at the recently vacated premises of the Roman Catholic Salesian College in south London where Alfred Hitchcock once went to school. "Which is obviously quite a lot of pressure on our director," quips Whitehall, who faces down the irony of a privately educated comedian writing about a state school with a gag: "My own schooldays (at Marlborough College) were very normal – where we did the normal things like polo and fox hunting. But you all experience the same things whatever school you go to. We had terrible school dinners as well, this one time they served red wine with the fish course...
"But, no," he says, dropping the stand-up act. "I was always very conscious that it's set in a state school and I went to a private school. The priority was to make it as funny as possible. What we did is we went in to state schools and talked to a lot of people who worked in them and made sure there were no glaring errors. So there won't be any references to the beagling lodge or anything like that..."
Whitehall's research was suitably unconventional, including standing in front of classes and asking the pupils to hurl insults at him. "They were really quick to do that," he says. "That was really useful in trying to make the script more authentic. And one afternoon we met a boy who'd been asked to leave his class, and he was amazing. He was really aggressive. 'What is Jack Whitehall doing in our school?', that kind of thing. And I stood there with a pad and just asked questions".
The resulting script was funny enough to lure Mathew Horne, who gives a wonderfully deranged performance in a shocking wig as Fraser, the head teacher. "He was a more overtly comic character than I'd done before," says Horne, "so it was kind of a challenge and it made me laugh." Alfie and Fraser compete for Miss Gulliver, the naively enthusiastic biology teacher played by Him & Her's Sarah Solemani (both of whose parents happened to be teachers). "She's the older woman, which is interesting to play at 28," says Solemani wryly." A lot of comedy comes from teaching about sexual organs. I think we've worked out that most of her lines involve sexual organs. I like the idea of doing something a bit broader… I'm a big fan of School of Rock and it really reminded me of that ".
Whitehall wrote the stern deputy head, Miss Pickwell, with Michelle Gomez in mind, although Gomez was unavailable (living in America where husband Jack Davenport's TV career has been taking off) at the read-through stage. "Then we got to recording the series, we got to ask her again and amazingly she had time to come over and film it," says Whitehall. "I was quite scared because she's quite steely-eyed. I'm still scared of her, but in a loving way.
Whitehall's mother – actress Hilary Whitehall – was more readily available, and appears in the third episode as "an angry Daily Mail-reading parent". Whitehall's father is the former actor's agent Michael Whitehall, who once represented Colin Firth and Judi Dench.
Much has been made of his privileged upbringing, and Whitehall certainly seems to do nothing to avoid typecasting. "Maybe someone will offer me a job as like a Danny Dyer character," he says. "Perhaps what I should do to avoid getting typecast (is to) write myself a part. A chimney sweep or something," he adds, before pausing for thought. "A chimney sweep?" he laughs. "That's the poshest answer I could possibly have given".
'Bad Education' starts on Tuesday 14 August at 10pm on BBC3