The Shakespeare Code (TV story)

The Shakespeare Code was the second episode of the third series of Doctor Who. It saw the first televised appearance of William Shakespeare since a cameo in 1965's The Chase. This was one of the most costly stories ever produced, with large expenditures on costumes and sets.

Gareth Roberts was well known as a fan of Shakespeare, indeed, he had included him as a character in A Groatsworth of Wit, a Ninth Doctor comic strip. This meant he had some background knowledge of the two plays Shakespeare was alleged to have written which form the basis of this story's plot. The Carrionites were also derived from the Bard's work, specifically the witches in Macbeth. Further knowledge can be seen in the many references to Shakespeare's works, notably Sycorax from The Tempest.

Synopsis
The Doctor takes Martha to Elizabethan England, where William Shakespeare is under the control of deadly, witch-like creatures.

Plot
London, 1599. A young woman is serenaded from her balcony by a lute-playing suitor, Wiggins. She bids him enter the house, but to his shock he finds it full of witching artefacts. The woman, Lilith, kisses Wiggins — but, on pulling away, he finds her transformed into a wrinkled hag. She introduces her two "mothers", Mother Doomfinger and Mother Bloodtide, who appear, cackling, and lunge at the screaming youth, apparently devouring him.

Meanwhile, the TARDIS has just landed nearby. Martha questions whether it is safe to walk around in the past, citing such familiar time travel concepts as the Grandfather paradox and a reference to the Ray Bradbury short story "A Sound of Thunder". She also worries about her reception as a black woman in a time when slavery still exists but the Doctor tells her not to worry, as he isn't even human and Elizabethan England is far more tolerant and similar to the 21st century than she might think. He declares that they have arrived in London in 1599 and takes her to a performance at the Globe Theatre. At the end of the play, Love's Labour's Lost, Shakespeare announces that there will soon be a sequel called Love's Labour's Won. Lilith, using a poppet, influences Shakespeare to declare, rashly, that the new play will premiere the following evening. Martha asks why she has never heard of Love's Labour's Won. The Doctor knows of the lost play and, curious, decides to find out more about why it was never published — and extends Martha's "one trip".

The two go to The Elephant, the inn where William Shakespeare is staying. They chat with the playwright, who intends to finish writing the final scene of Love Labour's Won that night. An instantly beguiled Shakespeare ("Hey nonny nonny!") tries to woo Martha, describing her as "a queen of Afric" or a "Blackamoor lady", which she finds slightly offensive. The Doctor claims she comes from "Freedonia" to explain her strange clothing and modern attitudes. Shakespeare sees past the Doctor's psychic paper, which the Doctor cites as proof of the man's genius.

Lynley, Master of the Revels, demands to see the script before he allows the play to proceed. When Shakespeare offers to show him the finished script in the morning, the official leaves proclaiming that this slight means he will ensure the play will never be performed. The three 'witches' watch the scene in a cauldron. Lilith, who works at the inn, secretly takes some of Lynley's hair and makes another poppet, which she plunges into a bucket of water. The Doctor, Martha and Shakespeare hear a commotion in the street and run out, where they witness Lynley vomiting water. Lilith stabs the doll in the chest, and Lynley collapses, dead. The Doctor calmly announces that Lynley has died of an imbalance of the humours, and privately tells Martha that any other explanation would lead to panic about witchcraft. When Martha asks what did kill Lynley, the Doctor responds, "Witchcraft".

Martha and the Doctor stay overnight at the inn. The Doctor gives a disgruntled Martha mixed signals by casually sharing a bed with her only to then openly bemoan the lack of Rose's insight. Meanwhile, Lilith entrances Shakespeare and, using a marionette, compels him to write a strange concluding paragraph to Love's Labour's Won. She is discovered by the landlady (also the Bard's lover), whom she frightens to death. On hearing another scream, the Doctor runs in and finds the body. Through the window, Martha sees a witch fly away on a broomstick.

In the morning the Doctor, Martha and Shakespeare proceed to the Globe Theatre, where the Doctor asks why the theatre is tetradecagal. Shakespeare replies that the architect thought it would make sound carry well and mentions that he eventually went mad and talked of witches. The three then visit the architect, Peter Streete, in Bedlam Asylum where patients are whipped to entertain the gentry: Martha is disgusted at such a practice, but Shakespeare defends it, saying that fear of the place helped "set him right". When Martha enquires further, the Doctor explains that Shakespeare fell into depression for a time after the death of his son. The Doctor helps Streete to emerge from his catatonia for long enough to reveal that the witches dictated the Globe's design to him. He also tells the Doctor that the witches were based in All Hallows Street.

The witches observe this interview through their cauldron. Doomfinger teleports to the cell and kills Peter with a touch. She threatens the other three but the Doctor works out who the 'witches' really are. He names the creature as a Carrionite, which causes her to disappear. The Doctor explains that the Carrionites produce their "magic" through an ancient science based on the power of words.

Back at the Elephant, the Doctor deduces that the Carrionites intend to use the words of a genius — Shakespeare — to break their species out of eternal imprisonment when Love's Labour's Won is performed. The Doctor tells Shakespeare to stop the play whilst he and Martha go to All Hallows Street to thwart the witches. Shakespeare bursts on to the Globe's stage to make the announcement, but two of the Carrionites are already there and use one of their dolls to render him unconscious. The actors — thinking Shakespeare has passed out drunk — carry the playwright off stage and the performance proceeds.

The Doctor and Martha reach All Hallows Street and confront Lilith, who is expecting them. She confirms the Doctor's suspicions: the three Carrionites hope to gain entry for the rest of their species, eliminate the humans, begin a new empire on Earth and spread out from there. Martha, mimicking the Doctor's actions at Bedlam, tries to neutralise her by speaking the name Carrionite, but Lilith mocks her, since naming only works once. Instead, she names Martha Jones, rendering her unconscious.

Lilith tries to do the same to the Doctor, but it fails to affect him, as she is unable to discover his real name. She attempts to weaken him by naming "Rose", but he assures her that that name keeps him fighting and demands to know how the Carrionites came to be on Earth. Lilith explains that the Eternals found the correct word to banish the Carrionites into darkness, but the three were able to escape using the power of Shakespeare's grief over his son — the grief of a genius — and intend to free the others. She then feigns an attempt at seduction, which brings her close enough to the Doctor to steal a lock of his hair. Taking flight through the window, she attaches the hair to a doll — which the Doctor explains is essentially a DNA replication module — and stabs it in the heart, whereupon the Doctor collapses. Assuming that he is dead, Lilith flies to the Globe. Martha wakes, and helps the Doctor restart his left heart before the duo race to the Globe.

The actors have already spoken the last lines of the play, a series of directions and instructions that have opened a portal allowing the Carrionites back into the universe. The Doctor tells Shakespeare that only he can find the words to close the portal. Shakespeare improvises a short rhyming stanza but is stuck for a final word. Martha comes up with "Expelliarmus" (a magic word coined by author J.K. Rowling in her Harry Potter books) and the Carrionites — together with all the extant copies of Love's Labour's Won — are sucked back through the closing portal. Martha, Shakespeare and the actors from the play are left to take the applause of the audience who believe it all to be special effects. The Doctor meanwhile finds the three 'witches' trapped, screaming in their own crystal ball and appropriates it for safe keeping in a "dark attic" of the TARDIS.

In the morning, Shakespeare flirts once more with Martha...and with the Doctor. He reveals his deduction that the Doctor is not of the Earth and that Martha is from the future, once again proving his genius. For his "Dark Lady", he produces the sonnet, "Shall I compare thee to a summer's day?" in her honour, but is interrupted when two of his actors burst in, heralding the arrival of the Queen. Queen Elizabeth enters, recognises the Doctor as her "sworn enemy" and declares, "Off with his head!" The Doctor is surprised at her outburst, since he says he has not yet met the Queen, but comments that he is looking forward to finding out what he will do to offend her. He and Martha flee to the TARDIS, slamming the door just as an arrow embeds itself in the TARDIS' exterior before dematerialisation.

Cast

 * The Doctor — David Tennant
 * Martha Jones — Freema Agyeman
 * William Shakespeare — Dean Lennox Kelly
 * Lilith - Christina Cole
 * Wiggins - Sam Marks
 * Doomfinger - Amanda Lawrence
 * Bloodtide - Linda Clarke
 * Richard Burbage - Jalaal Hartley
 * Will Kempe - David Westhead
 * Dolly Bailey - Andree Bernard
 * Lynley - Chris Larkin
 * Jailer - Stephen Marcus
 * Peter Streete - Matt King
 * Preacher - Robert Demeger
 * Queen Elizabeth - Angela Pleasence

Culture

 * There are numerous Harry Potter mentions and references; "Expelliarmus", as well as "Wait till you read book seven, I cried." (The episode was broadcast roughly three months before the book was released.) David Tennant also had a role in the fourth Harry Potter film.
 * The Doctor uses the 1980s film Back to the Future to explain the mechanics of the infinite temporal flux in relation to time travel to Martha.
 * The Doctor quotes a line from Dylan Thomas' poem "Do Not Go Gentle Into That Good Night".
 * In attempting to explain Martha to Shakespeare, the Doctor claims that she comes from Freedonia, a country featured in the Marx Brothers film Duck Soup.
 * Near the climax, the Doctor admonishes Shakespeare that "We can have a good flirt later." Shakespeare coyly replies, "Is that a promise?" the Doctor, shocked, says "And 57 academics just punched the air." This is reference to current academic theories that claim that many of Shakespeare's sonnets were penned as love sonnets to a man, and that Shakespeare himself was either bisexual or homosexual.
 * David Tennant went on to play the title character in the Royal Shakespeare Production of Hamlet following his role as the Doctor, reciting the famous "To be, or not to be?" monologue.
 * Shakespeare's attraction to Martha, and referring to her as "The Dark Lady" seems to be a reference to Shakespeare's lust for black women, also referenced in Anthony Burgess' novel Nothing Like the Sun.

Story notes

 * The episode bears some similarities to the previous Gareth Roberts' penned comic story featuring Shakespeare and the Ninth Doctor, A Groatsworth of Wit which may have provided some of the inspiration for this episode.
 * The title appears to be a play on The Da Vinci Code, which is also a story based around a well-known figure of the Renaissance.


 * This was the second appearance of a famous writer in the newer series (the first being Charles Dickens in the episode The Unquiet Dead)


 * This episode's working title was 'Theatre of Doom' and 'Love's Labours Won'


 * Freedonia is a fictional country from the comedy film Duck Soup.


 * Shakespeare did use the word Sycorax in his play The Tempest.
 * Shakespeare referred to Martha as the "Dark Lady," the mysterious subject (though perhaps allegorical) of many of his sonnets.
 * The story plays on the speculation around Shakespeare's Love's Labour's Won, a possible 'lost play' or alternate title for an existent play.
 * The Story has Elizabeth I mentioning that she swore to have the Doctor killed, this probably has something to do with the Doctor mentioning she could no longer be called the Virgin Queen in DW: The End of Time.
 * Lilith's name is a probable reference to the mythical "first wife of Adam" in Christian and Jewish folklore.

Ratings

 * 7.22 million viewers - BARB final ratings
 * 6.8 million viewers - Overnight ratings
 * 1.039 million viewers - BBC3 Repeat ratings

Myths
to be added

Filming locations

 * Ford's Hospital, Greyfriar's Lane, Coventry
 * Lord Leycester Hospital, Warwick
 * Newport Indoor Market (Basement), Newport
 * Chelesmore Manor House, Greyfriar's Lane, Coventry
 * Shakespeare's Globe, Southwark, London
 * BBC Studios, Upper Boat, Tonteg Road, Treforest Industrial Estate, Pontypridd
 * Stageworks, Unit H1, Colchester Industrial Estate, Colchester Avenue, Penylan, Cardiff
 * Black Horse Ltd, St William House, Tresillian Terrace, Cardiff

Production errors

 * When The Doctor and Martha are in their bedroom, there are many candles lit. Later, when Martha blows out one candle, the whole room goes black.

Continuity

 * Shakespeare has previously appeared: as a young boy in BFA: The Time of the Daleks, on the Space Time Visualiser in DW: The Chase, as an older man (who hitches a ride aboard the TARDIS) in BFA: The Kingmaker and MA: The Empire of Glass.
 * The Doctor also mind reads in DW: The Girl in the Fireplace and DW: Fear Her.
 * The arrow that is shot onto the TARDIS mimics similar occurrences in DW: An Unearthly Child and DW: Silver Nemesis.
 * The arrow shot into the TARDIS is still there in the next episode and is removed by the Doctor after materialising. (DW: Gridlock)
 * Queen Elizabeth's anger at the Doctor is given a possible explanation later in DW: The End of Time, when the Doctor indicates that he had married her and then left unexpectedly, during an event that was later in his timeline but possibly earlier for her.
 * The Doctor also mentioned meeting Queen Elizabeth in DW: The Mind of Evil.
 * Lilith's name is only said once throughout the whole episode. It is only said in the beginning when the young man tells Lilith that her house is foul. Her name is not even said by Bloodtide or Doomfinger or even by Lilith herself.
 * The Doctor claims that Martha is a citizen of the nation of "Freedonia". Freedonia was the name of a planet in PDA: Warmonger.
 * The Doctor again takes the title of "Sir Doctor of TARDIS" (DW: Tooth and Claw)

Timeline

 * This story takes place after DW: Smith and Jones
 * This story takes place before DW: Gridlock

Home video releases

 * Released alongside Smith and Jones and Gridlock.
 * It is also included in the Series 3 DVD boxset.