The Shakespeare Code was the second episode of the third series of Doctor Who - New Fun!
While eating fish and chips one day, The Doctor admits his terrible secret to Martha: he's never cared for the Harry Potter series of books. Martha comforts him, telling him she never did either. Together they hatch a scheme to give some of the book's writing to Shakespeare in the past to use in a play, hoping to prevent Just Kidding Rowlins from ever becoming famous. Back in the past, they meet The Bard and hand over the writing to put into one of his scripts, but instead it sends some alien witches back into a crystal ball and the only copy of the script is lost forever. Shakespeare makes a pass at the Doctor, the Doctor makes a joke about it and viewers everywhere made a grab for the tv remote just as the "virgin queen" Elizabeth I shows up mad at the Doctor for giving her the clap. Oh god were we getting tired of David bloody Tennant by then! Martha is in full "DOCTOR OMG <3<3<3" mode.
The production budgeted close to £16 million to build a life-sized reproduction of the Globe Theatre where the real Shakespeare's plays were originally produced during his life time, but Rusty T Dalek (the 'T' stands for 'The') was so upset when he found Tennant was still banging Rose behind his back that he angrily burned it to the ground before filming had begun. Most of the scenes set in the Globe Theatre for this story were shot on a BBC stage barely five feet wide.
David Tennant later was originally cast to play "Farty Crouch Jr." in the Harry Potter movie Harry Potter And The Flaming Crock until J.K. Rollings saw The Shakespeare Cod episode of Doctor Who. She was furious and erased him from Harry Potter forever. The part was recast with an unknown actor named David John MacDonald.