---
description: How can memes be created by code?
---

# Unit 3 Final Project: Random Meme Generator

### Teacher Notes and Overview

As the course progresses and students gain the skills to explore and create independently, the work becomes less and less lesson-focused and more and more project-focused. There have been _a lot_ of mini-projects over the course of this Unit; the goal of this project is to combine many of the skills students have been practicing somewhat discretely together into one program. However, if you feel that it is difficult to go from mini-project into final project, you are of course welcome to skip or alter this project to fit the needs of your classroom.

**To begin this project, you may want to have students think about the following:**

1. What is a meme?&#x20;
2. What purpose do they serve?&#x20;
3. How can memes support free expression?

As a class, you may want to review this [history of memes](https://www.nytimes.com/2022/01/26/crosswords/what-is-a-meme.html) or this video on [how memes shape politics.](https://www.youtube.com/watch?v=DazKys0gpHU\&ab_channel=HuffPost)

**NB:** _As students try to get many images that can be different sizes to show up nicely on their canvas,_ [_consider sharing this resource on making images display proportionally._](https://editor.p5js.org/L05/sketches/o1a4f6XpE)

### Prompt

In this project, you will create a random meme generator using the [macro image meme format](https://knowyourmeme.com/memes/image-macros)! This is your opportunity to make your peers and teacher laugh so get creative and silly (while staying classroom appropriate) with this project.

<figure><img src="https://935178314-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtUpfie3pkg7cJrwQEthi%2Fuploads%2FKfTYcikMD84AsF5tgBRg%2Fimage.png?alt=media&#x26;token=d9ba8acd-0a18-4dce-badb-41037952c8bc" alt=""><figcaption><p>Four differently commonly used meme images.</p></figcaption></figure>

#### Requirements

Create a random meme generator: pick a collection of images and a collection of phrases from an array. Each time you run your sketch, it should select one random image and one random text from the appropriate arrays, creating a (potential) meme displayed on the canvas. You have the option to either use objects to keep certain captions/fonts/images together, or simply organize in arrays and let chaos reign.

Think about what phrases and images you may want to pair togteher, as well as what font sizes and colors work best.

#### Your Sketch Should Have:

* A random() function&#x20;
* At least 5:
  * &#x20;images stored in an array&#x20;
  * phrases or strings stored in an array
  * font sizes stored in an array
  * font colors stored in an array
* A data structure to organize your program. (This could be arrays, objects, an array of objects, etc.)
* A button that will 'reroll' your meme (choose new random values for all the changing parts)
* The text has to show up on top of the image.
* Where possible/necessary, utilize functions to simplify your code
* Include any other relevant or necessary skills you have learned so far this year

#### Suggested Steps:

1. **Gather resources.** Find all of your images/phrases/colors/sizes and write out the captions you plan to use.
2. **Load into program.** Get your images in your program. Then, make data structures (most likely arrays) that will hold all the image variables, all the font sizes/colors, all the captions, etc.
3. **Use the information from your data structure to get the image and styled caption on the screen.** Adjust as needed!
4. **Incorporate random choice and run the program - make any tweaks/changes.** Lather/rinse/repeat this step until you have it working as intended!

### Suggested Duration

3- 6 45-minute periods, depending on the pace of your class and the level of challenge your students attempt.

### Sample Output

<figure><img src="https://935178314-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtUpfie3pkg7cJrwQEthi%2Fuploads%2F5q5tAZgEXrDQ070Ciqg0%2Fimage.png?alt=media&#x26;token=acc4d344-a7fe-459a-8c3f-cb2d610443e2" alt=""><figcaption><p>Sample Meme</p></figcaption></figure>

### **Culturally Responsive Best Practices**

Within this design-based challenge, there are many prompts you can give students to make the project seem more relevant to them and the cultures of communities that they are a part of. _(Please recall that communities can refer to a lot of things, including just the culture of being a teen, a Minecraft player, or a KPop fan - be mindful that you are allowing students to explore choice in their creations in a way that is authentic to them!)_

**Possible CR-SE Prompts:**

1. Program a meme generator that outputs memes that are funny and relevant to your culture and lived experience. Use meme formats currently relevant on the internet
2. Focus your memes around a single theme or format that are funny and informative, teaching the user about something specific to your culture or lived experience.
3. Output memes that draw attention to/inform about a specific cultural or social justice issue.
4. META MEMES: Learn about the role memes play in popular culture. Create memes that will engage the viewer and teach them about the role memes play in our world, including stages like recent elections.. (Resources: [1](https://yp.scmp.com/news/features/article/107044/why-do-memes-matter-look-good-dank-and-viral) | [2](https://academic.oup.com/jcmc/article/18/3/362/4067545) | [3](https://www.theguardian.com/us-news/2016/nov/04/political-memes-2016-election-hillary-clinton-donald-trump) or do a quick google search of your own!)

### **Extensions**

As we get further and further into the course, the extensions become more about how students choose to challenge themselves by using the reference sheet and generalizing learned skills to do something new.&#x20;
