How to write a simpsons script

In the fallout of comedian Hari Kondabolu’s documentary The Problem With Apu , and the weirdly defensive response from The Simpsons, producer Adi Shankar wants to make a woke Simpsons episode about Apu. To get the script, he’s running a screenwriting contest . If you agree with Shankar and Kondabolu that Apu is a gross stereotype, then check out the contest rules:

We are looking for a screenplay centering on the character “Apu” set in the world and canon of The Simpsons that takes the character of Apu and in a clever way subverts him, pivots him, intelligently writes him out, or evolves him in a way that takes a mean spirited mockery and transforms him into a kernel of truth wrapped in funny insight aka actual satire.

This contest is open to people of all ethnicities and cultures, however, if you don’t have any experience with Indian culture in America then you may not have the perspective and experience to write well on this topic.

The contest will be judged by a panel of South Asians and other minorities who work in entertainment. The submission deadline is June 30, and there’s no fee.

Shankar, while an experienced producer for film and Netflix, doesn’t actually work for The Simpsons or for Fox, but he doesn’t need to. While he plans to take the winning script to the show’s writers and producers, if and when they reject it, he says he’ll make the episode himself.

He’s done this before—his 2015 “bootleg” Power Rangers episode got 21 million views on YouTube. Add all the press attention around the contest, and Shankar’s unofficial episode will make a bigger splash than a typical season 29 episode of the real show.

The “Your Fave Is Problematic” Reading List

In tragically familiar news, a powerful man in entertainment was recently revealed to be a scumbag.

After writing 59 episodes during the golden years of ”The Simpsons,“ Swartzwelder discusses his process in a rare interview

Hardcore “Simpsons” fans know the name John Swartzwelder, the man who wrote dozens of classic episodes of the show during its golden years. Now he’s sharing the secret of his phenomenal success… and would you believe it involves comparing himself to a “crappy little elf”?

The legendary scribe is responsible for some of the most memorable episodes of “The Simpsons,” like the one where Johnny Carson juggled a car while singing opera on Krusty the Klown’s comeback special, and another where Ken Griffey Jr. took a spoonful of Mr. Burns’ brain tonic and said, “It’s like there’s a party in my mouth, and everyone’s invited!” He’s also the man behind Frank Grimes and the show’s darkest episode, “Homer’s Enemy.”

In an extremely rare interview with The New Yorker, Swartzwelder opened up about his influences and his long career leading up to “The Simpsons.” But his wit truly came forward when he described his process for writing a “Simpsons” episode.

“I always write my scripts all the way through as fast as I can, the first day, if possible, putting in crap jokes and pattern dialogue,” he explained. “Then the next day, when I get up, the script’s been written. It’s lousy, but it’s a script. The hard part is done.

“It’s like a crappy little elf has snuck into my office and badly done all my work for me, and then left with a tip of his crappy hat. All I have to do from that point on is fix it. So, I’ve taken a very hard job, writing, and turned it into an easy one, rewriting, overnight.”

Swartzwelder said he highly recommends that writers use the same process to get the best out of their work, “and be sure to send me a small royalty every time you do it,” he added.

Since leaving “The Simpsons” in 2003, Swartzwelder has spent several years self-publishing a series of detective novels that echo the kind of absurd, where-did-that-joke-come-from humor that he became known for in “The Simpsons.” Some of the titles hint at their wackiness: “The Time Machine Did It,” “The Spy With No Pants” and “The Squirrel Who Saved Practically Everybody,” to name but a few.

All of Swartzwelder’s episodes, along with the rest of “The Simpsons,” can be streamed on Disney+.

This article describes how to create, edit, run, and save scripts in the Script Pane.

How to create and run scripts

You can open and edit Windows PowerShell files in the Script Pane. Specific file types of interest in Windows PowerShell are script files ( .ps1 ), script data files ( .psd1 ), and script module files ( .psm1 ). These file types are syntax colored in the Script Pane editor. Other common file types you may open in the Script Pane are configuration files ( .ps1xml ), XML files, and text files.

The Windows PowerShell execution policy determines whether you can run scripts and load Windows PowerShell profiles and configuration files. The default execution policy, Restricted, prevents all scripts from running, and prevents loading profiles. To change the execution policy to allow profiles to load and be used, see Set-ExecutionPolicy and about_Signing.

To create a new script file

On the toolbar, click New, or on the File menu, click New. The created file appears in a new file tab under the current PowerShell tab. Remember that the PowerShell tabs are only visible when there are more than one. By default a file of type script ( .ps1 ) is created, but it can be saved with a new name and extension. Multiple script files can be created in the same PowerShell tab.

To open an existing script

On the toolbar, click Open, or on the File menu, click Open. In the Open dialog box, select the file you want to open. The opened file appears in a new tab.

To close a script tab

Click the Close icon (X) of the file tab you want to close or select the File menu and click Close.

If the file has been altered since it was last saved, you’re prompted to save or discard it.

To display the file path

On the file tab, point to the file name. The fully qualified path to the script file appears in a tooltip.

To run a script

On the toolbar, click Run Script, or on the File menu, click Run.

To run a portion of a script

  1. In the Script Pane, select a portion of a script.
  2. On the File menu, click Run Selection, or on the toolbar, click Run Selection.

To stop a running script

There are several ways to stop a running script.

  • Click Stop Operation on the toolbar
  • Press CTRL + BREAK
  • Select the File menu and click Stop Operation.

Pressing CTRL + C also works unless some text is currently selected, in which case CTRL + C maps to the copy function for the selected text.

How to write and edit text in the Script Pane

You can copy, cut, paste, find, and replace text in the Script Pane. You can also undo and redo the last action you just performed. The keyboard shortcuts for these actions are the same shortcuts used for all Windows applications.

To enter text in the Script Pane

  1. Move the cursor to the Script Pane by clicking anywhere in the Script Pane, or by clicking Go to Script Pane in the View menu.
  2. Create a script. Syntax coloring and tab completion provide a richer editing experience in Windows PowerShell ISE.
  3. See How to Use Tab Completion in the Script Pane and Console Pane for details about using the tab completion feature to help in typing.

To find text in the Script Pane

  1. To find text anywhere, press CTRL + F or, on the Edit menu, click Find in Script.
  2. To find text after the cursor, press F3 or, on the Edit menu, click Find Next in Script.
  3. To find text before the cursor, press SHIFT + F3 or, on the Edit menu, click Find Previous in Script.

To find and replace text in the Script Pane

Press CTRL + H or, on the Edit menu, click Replace in Script. Enter the text you want to find and the replacement text, then press ENTER .

To go to a particular line of text in the Script Pane

In the Script Pane, press CTRL + G or, on the Edit menu, click Go to Line.

Enter a line number.

To copy text in the Script Pane

In the Script Pane, select the text that you want to copy.

Press CTRL + C or, on the toolbar, click the Copy icon, or on the Edit menu, click Copy.

To cut text in the Script Pane

  1. In the Script Pane, select the text that you want to cut.
  2. Press CTRL + X or, on the toolbar, click the Cut icon, or on the Edit menu, click Cut.

To paste text into the Script Pane

Press CTRL + V or, on the toolbar, click the Paste icon, or on the Edit menu, click Paste.

To undo an action in the Script Pane

Press CTRL + Z or, on the toolbar, click the Undo icon, or on the Edit menu, click Undo.

To redo an action in the Script Pane

Press CTRL + Y or, on the toolbar, click the Redo icon, or on the Edit menu, click Redo.

How to save a script

An asterisk appears next to the script name to mark a file that hasn’t been saved since it was changed. The asterisk disappears when the file is saved.

To save a script

Press CTRL + S or, on the toolbar, click the Save icon, or on the File menu, click Save.

To save and name a script

  1. On the File menu, click Save As. The Save As dialog box will appear.
  2. In the File name box, enter a name for the file.
  3. In the Save as type box, select a file type. For example, in the Save as type box, select ‘PowerShell Scripts ( *.ps1 )’.
  4. Click Save.

To save a script in ASCII encoding

By default, Windows PowerShell ISE saves new script files ( .ps1 ), script data files ( .psd1 ), and script module files ( .psm1 ) as Unicode (BigEndianUnicode) by default. To save a script in another encoding, such as ASCII (ANSI), use the Save or SaveAs methods on the $psISE.CurrentFile object.

The following command saves a new script as MyScript.ps1 with ASCII encoding.

The following command replaces the current script file with a file with the same name, but with ASCII encoding.

The following command gets the encoding of the current file.

Windows PowerShell ISE supports the following encoding options: ASCII, BigEndianUnicode, Unicode, UTF32, UTF7, UTF8, and Default. The value of the Default option varies with the system.

Windows PowerShell ISE doesn’t change the encoding of script files when you use the Save or Save As commands.

Susan Kouguell is an award-winning screenwriter, filmmaker, and chairperson of the screenplay and post-production consulting company Su-City Pictures East She is the author of The Savvy Screenwriter: How to Sell Your Screenplay (and Yourself ). Follow Susan on Twitter: @SKouguell

When film industry folks start reading a screenplay they want to quickly enter the world screenwriters have created with a complete understanding of how it looks and feels, and be able to visualize how the characters relate to each other in their specific environments.

How do you create that awesome wonder that prompts a reader to turn the page with baited breath?

Let’s turn to two experts for some advice.

Recently at Purchase College, SUNY, Oscar-winning animation director Chris Wedge was interviewed at an event by Iris Cahn, Professor of Film, School of Film and Media Studies at Purchase.

Wedge wrote and directed Bunny, (Academy Award for Best Animated Short Film) Ice Age (nominated for Best Animated Feature Film) and Robots. He was executive producer of Ice Age: The Meltdown, Dr. Seuss’ Horton Hears a Who!, Rio, Ice Age: Dawn of the Dinosaurs, and Ice Age: Continental Drift. He directed Epic (2013) and recently completed his first live action/hybrid film Monster Trucks due in 2016.

Creating a World

CHRIS WEDGE: “I go backwards. Many filmmakers will start with a story or book or script — something that’s written. I always start with the world because in animation it’s primarily a visual medium. There are not many words there. I’m always on the prowl for a place to go in animation, a place somebody else hasn’t put their mark on, a place to give an audience a new experience based on the place. I want to tell a story there that you can’t tell any other way.

“The stories I like to get to are the ones where the truths come out of every real story. I always found — even in whatever trials life brings you — help comes from unexpected places; I always find in that kind of realization that you have more support than you know.”

Audiences watch characters. That’s the part where all the writing has to happen.”

For more insights and advice from Chris Wedge visit his website.

How to write a simpsons script

In two-time Academy Award-winning writer and director Andrew Stanton’s TED talk, Stanton discusses writing and storytelling, knowing the spine of your story, and the importance of the audience caring about your story and characters.

ANDREW STANTON: “Storytelling is joke telling. It’s knowing your punchline, your ending, knowing that everything you’re saying, from the first sentence to the last, is leading to a singular goal, and ideally confirming some truth that deepens our understandings of who we are as human beings. We all love stories. We’re born for them. Stories affirm who we are. We all want affirmations that our lives have meaning. And nothing does a greater affirmation than when we connect through stories. It can cross the barriers of time, past, present and future, and allow us to experience the similarities between ourselves and through others, real and imagined.”

Read the transcript here.

Watch animated films that share your sensibility of the worlds that you are interested in creating. Note how the worlds are revealed. And then watch even more animated films.

Check out all of Susan’s Upcoming Classes!

How to write a simpsons script

Susan Kouguell, award-winning screenwriter and filmmaker, is a senior contributing editor for Script Magazine, and is the author of The Savvy Screenwriter: How to Sell Your Screenplay (and Yourself) Without Selling Out! and Savvy Characters Sell Screenplays!: A comprehensive guide to crafting winning characters with film analyses and screenwriting exercises. As chairperson of Su-City Pictures East, LLC, a motion picture consulting company founded in 1990, Kouguell works as a script doctor and post-production consultant with over 1,000 writers, filmmakers, executives and studios worldwide. Her extensive background includes work as story analyst and story editor for many studios, including Miramax, Paramount, and Viacom, acquisitions consultant for Warner Bros., writer on voice-over narrations for Miramax, associate producer on two features, and over a dozen feature writing assignments for independent companies. Susan teaches screenwriting at SUNY College at Purchase and is a visiting assistant professor at Pratt Institute. Her short films are in the Museum of Modern Art’s permanent collection and archives and were included in the Whitney Museum’s Biennial. Follow Susan on Twitter: @SKouguell, Facebook, and Instagram @slkfilms

The first step is often the hardest, but don’t let that stop you. If you’ve ever wanted to learn how to write a shell script but didn’t know where to start, this is your lucky day.

If this is your first time writing a script, don’t worry — shell scripting is not that complicated. That is, you can do some complicated things with shell scripts, but you can get there over time. If you know how to run commands at the command line, you can learn to write simple scripts in just 10 minutes. All you need is a text editor and an idea of what you want to do. Start small and use scripts to automate small tasks. Over time you can build on what you know and wind up doing more and more with scripts.

Starting Off

Each script starts with a “shebang” and the path to the shell that you want the script to use, like so:

The “#!” combo is called a shebang by most Unix geeks. This is used by the shell to decide which interpreter to run the rest of the script, and ignored by the shell that actually runs the script. Confused? Scripts can be written for all kinds of interpreters — bash, tsch, zsh, or other shells, or for Perl, Python, and so on. You could even omit that line if you wanted to run the script by sourcing it at the shell, but let’s save ourselves some trouble and add it to allow scripts to be run non-interactively.

What’s next? You might want to include a comment or two about what the script is for. Preface comments with the hash (#) character:

Let’s say you want to run an rsync command from the script, rather than typing it each time. Just add the rsync command to the script that you want to use:

Save your file, and then make sure that it’s set executable. You can do this using the chmod utility, which changes a file’s mode. To set it so that a script is executable by you and not the rest of the users on a system, use “chmod 700 scriptname” — this will let you read, write, and execute (run) the script — but only your user. To see the results, run ls -lh scriptname and you’ll see something like this:

The first column of rights, rwx, shows that the owner of the file (jzb) has read, write, and execute permissions. The other columns with a dash show that other users have no rights for that file at all.

Variables

The above script is useful, but it has hard-coded paths. That might not be a problem, but if you want to write longer scripts that reference paths often, you probably want to utilize variables. Here’s a quick sample:

There’s not a lot of benefit if you only reference the directories once, but if they’re used multiple times, it’s much easier to change them in one location than changing them throughout a script.

Taking Input

Non-interactive scripts are useful, but what if you need to give the script new information each time it’s run? For instance, what if you want to write a script to modify a file? One thing you can do is take an argument from the command line. So, for instance, when you run “script foo” the script will take the name of the first argument (foo):

Here bash will read the command line and echo (print) the first argument — that is, the first string after the command itself.

You can also use read to accept user input. Let’s say you want to prompt a user for input:

That script will wait for the user to type in their name (or any other input, for that matter) and use it as the variable $name. Pretty simple, yeah? Let’s put all this together into a script that might be useful. Let’s say you want to have a script that will back up a directory you specify on the command line to a remote host:

That script will read in the input from the command line and substitute it as the destination directory at the target system, as well as the local directory that will be synced. It might look a bit complex as a final script, but each of the bits that you need to know to put it together are pretty simple. A little trial and error and you’ll be creating useful scripts of your own.

Of course, this is just scraping the surface of bash scripting. If you’re interested in learning more, be sure to check out the Bash Guide for Beginners.

A script module is any valid PowerShell script saved in a .psm1 extension. This extension allows the PowerShell engine to use rules and module cmdlets on your file. Most of these capabilities are there to help you install your code on other systems, as well as manage scoping. You can also use a module manifest file, which describes more complex installations and solutions.

Writing a PowerShell script module

To create a script module, save a valid PowerShell script to a .psm1 file. The script and the directory where it’s stored must use the same name. For example, a script named MyPsScript.psm1 is stored in a directory named MyPsScript .

The module’s directory needs to be in a path specified in $env:PSModulePath . The module’s directory can contain any resources that are needed to run the script, and a module manifest file that describes to PowerShell how your module works.

Create a basic PowerShell module

The following steps describe how to create a PowerShell module.

Save a PowerShell script with a .psm1 extension. Use the same name for the script and the directory where the script is saved.

Saving a script with the .psm1 extension means that you can use the module cmdlets, such as Import-Module. The module cmdlets exist primarily so that you can import and export your code onto other user’s systems. The alternate solution would be to load your code on other systems and then dot-source it into active memory, which isn’t a scalable solution. For more information, see Understanding a Windows PowerShell Module. By default, when users import your .psm1 file, all functions in your script are accessible, but variables aren’t.

An example PowerShell script, entitled Show-Calendar , is available at the end of this article.

To control user access to certain functions or variables, call Export-ModuleMember at the end of your script.

The example code at the bottom of the article has only one function, which by default would be exposed. However, it’s recommended you explicitly call out which functions you wish to expose, as described in the following code:

You can restrict what’s imported using a module manifest. For more information, see Importing a PowerShell Module and How to Write a PowerShell Module Manifest.

If you have modules that your own module needs to load, you can use Import-Module , at the top of your module.

The Import-Module cmdlet imports a targeted module onto a system, and can be used at a later point in the procedure to install your own module. The sample code at the bottom of this article doesn’t use any import modules. But if it did, they would be listed at the top of the file, as shown in the following code:

To describe your module to the PowerShell Help system, you can either use standard help comments inside the file, or create an additional Help file.

The code sample at the bottom of this article includes the help information in the comments. You could also write expanded XML files that contain additional help content. For more information, see Writing Help for Windows PowerShell Modules.

If you have additional modules, XML files, or other content you want to package with your module, you can use a module manifest.

A module manifest is a file that contains the names of other modules, directory layouts, versioning numbers, author data, and other pieces of information. PowerShell uses the module manifest file to organize and deploy your solution. For more information, see How to write a PowerShell module manifest.

To install and run your module, save the module to one of the appropriate PowerShell paths, and use Import-Module .

The paths where you can install your module are located in the $env:PSModulePath global variable. For example, a common path to save a module on a system would be %SystemRoot%/users/ /Documents/PowerShell/Modules/ . Be sure to create a directory for your module that uses the same name as the script module, even if it’s only a single .psm1 file. If you didn’t save your module to one of these paths, you would have to specify the module’s location in the Import-Module command. Otherwise, PowerShell wouldn’t be able to find the module.

Starting with PowerShell 3.0, if you’ve placed your module in one of the PowerShell module paths, you don’t need to explicitly import it. Your module is automatically loaded when a user calls your function. For more information about the module path, see Importing a PowerShell Module and Modifying the PSModulePath Installation Path.

To remove a module from active service in the current PowerShell session, use Remove-Module.

Remove-Module removes a module from the current PowerShell session, but doesn’t uninstall the module or delete the module’s files.

Show-Calendar code example

The following example is a script module that contains a single function named Show-Calendar . This function displays a visual representation of a calendar. The sample contains the PowerShell Help strings for the synopsis, description, parameter values, and code. When the module is imported, the Export-ModuleMember command ensures that the Show-Calendar function is exported as a module member.

How to write a simpsons script

Legendary comedy writer John Swartzwelder, famous for his prolific work on The Simpsons and considered one of the greatest comedy minds of all time, is also famously reclusive—but after decades of silence, Swartzwelder has finally given an interview to Mike Sacks in The New Yorker. The wide-ranging interview, worth reading in its entirety, gives us insight into Swartzwelder’s early years, comedic influences, and his stints on The Simpsons and Saturday Night Live—and Swartzwelder also lets readers in on an element of his writing process that allowed him to be as productive as possible during his Simpsons years:

I do have a trick that makes things easier for me. Since writing is very hard and rewriting is comparatively easy and rather fun, I always write my scripts all the way through as fast as I can, the first day, if possible, putting in crap jokes and pattern dialogue—’Homer, I don’t want you to do that.’ ‘Then I won’t do it.’ Then the next day, when I get up, the script’s been written. It’s lousy, but it’s a script. The hard part is done. It’s like a crappy little elf has snuck into my office and badly done all my work for me, and then left with a tip of his crappy hat. All I have to do from that point on is fix it. So I’ve taken a very hard job, writing, and turned it into an easy one, rewriting, overnight. I advise all writers to do their scripts and other writing this way. And be sure to send me a small royalty every time you do it.

It’s good advice: even though it’s difficult to push through a draft without “inspiration” exciting you, getting the scaffolding down frees you up to play without the stress of figuring everything out at once. And if you get stuck, you can always self-soothe with an episode of The Simpsons.

“Eat my shorts!” says Judd Apatow’s 23-year-old self.

Before he became the executive producer on television’s Freaks and Geeks or catapulted Steve Carell onto the world stage with The 40-Year-Old Virgin, Apatow wrote a spec for one of his favorite shows: The Simpsons.

Specs are rarely purchased and make it to air. What is even more unheard of is a spec being purchased 22-years after it was written. But EW reports that in a recent conversation with Conan O’Brien on the web series Serious Jibber-Jabber, Apatow told the talk show host/former Simpsons writer that the show’s producers had approached him about the spec after they heard him discuss it publicly.

How to write a simpsons script

Apatow wrote the script (in which “Homer is hypnotized into thinking that he’s 10-years-old again and winds up as best friends with Bart”) during the early days of the series. When Simpsons executive producer Al Jean heard Apatow discuss the concept at a screening of the director’s upcoming comedy This is 40 he thought, ‘Well, we’re always looking for good shows and good writers.’”

Have you watched The Simpsons?

“I sent word to him: ‘If you’re interested, we’ll buy it,’” Jean says. “I think he had to find it — it was in one of his boxes.”

The Simpsons producer offers the following advice to aspiring writers:

“For people who want to know how to write a freelance Simpsons episode: Just do it, then have a megamilliondollar movie career and we’ll buy the spec.”

He, jokingly, says he’d be happy to take Apatow on in a staff position as well…if this episode works out. “And Conan can come back anytime he wants,” Jean adds.

Apatow’s The Simpsons episode will air next season.