Tech Talk

Learn Recursion from 'The Good Place'

Dec. 19, 2017

Learn Recursion from 'The Good Place'

It's no surprise that NBC's 'The Good Place' was just renewed for it's third season; Kristen
Bell is so forkin' funny and this whole "Good Place/ Bad Place" twist needs some further explanation. But we're not here to talk theories or spoilers, rather, we're looking at the shows major plot line and translating it into code, specifically a process known as 'recursion'.

Recursion is a computer science method used in many programming languages, in which a function can call itself.

While her blog postdoes have spoilers- Carol Scott breaks this down step by step for you in her piece, "How 'The Good Place' Is A Great Example of Recursion." We'll do a quick synopsis below, but you really should check out the full version on her blog!

There are many times in the show where Michael (Ted Danson), the Head Demon, chooses to 'reboot' The Good Place after something "bad" happens, hoping to wipe the many characters' memories.

When translated to JavaScript, a function is written so whenever The Good Place is called to be rebooted, each characters knowledge/deduction capacity multiplies together, and then the entire function reboots itself once again.

This process would continue in perfect harmony for eternity, however, everyone's favorite character, Janet (D'Arcy Carden) changes things.

Every time Janet is rebooted, she becomes more intuitive, unlike the other characters who maintain the same knowledge/ deduction capacity, which means Janet serves as a multiplier for the other characters.

This means, no matter how many times the other characters are rebooted, each new reboot produces a new Janet. (In computer science terms, you would say Janet is what makes the recursive change its state.)

(Janet + 1)

(Janet + 1)+1

I know we're all dying to see how how this function show ends - but we'll have to wait until January to find out!
You may also like View more articles
Open jobs See all jobs
Author