Using JavaScript To Write Doctor Who Plots

It's a nifty if simple piece of programming and a nastily-pointed comment on Matt Smith-era Doctor Who. This site uses a claimed 'six lines of JavaScript' to generate pseudo-random Who episode descriptions "indistinguishable from the current series", complete with random celebrity cameos.

The actual source code isn't provided, but the page seems to assemble random combinations from a pre-set list of plotlines, villains and celebrities. An amusing reminder of how you can while away time as a programmer while upsetting cult TV fans. Presumably the coders might be pleased with the news that Smith is leaving the role this year, though since show runner Steven Moffat remains, whether the plotting approach will change is an open question.

Us Vs Them Vs Who


    The source code is at

    The 'plots' consist of a random place of arrival, destination, menace, team, verb, villain, a resolution, a special guest and a role.

    There is 322 lines of code, but the work of generating the text is done with only 6 lines.

    Do we have to do your homework for you @angus?

    Last edited 02/06/13 8:30 am

      It's (as stated) javascript... I don't understand how it could *not* be provided (unless there was the implication of it being obfuscated... which it obviously is not).

    Addendum: Smith makes a great Doctor, but the scripts have been written by monkeys lately.

    I like Doctor Who as it is now and I don't think the writing is much of a problem (the Moffat episodes are my favourites and, while I loved RTD's other non-Who stuff, I prefer him as the EP). I just wish they'd get rid of the small season/big production format and go back to decent-length arcs like in the old old Doctor episodes.

    I think Moffat's running has improved - I only found one episode this "season" to be a complete dud - but I still preferred stories where he was writer and RTD was the showrunner.

    In all fairness, though, I just swapped out 'Clara' for 'Jo', and the generator seemed even more accurate in its predictions. 'Leela' too, except for the "previously unseen function of her mobile phone" saving the day. I'm assuming it's just being particularly cruel about K-9.

Join the discussion!

Trending Stories Right Now