Creative Coding

ART 2210 Creative Coding is an applied course that focuses on creating internet based projects that impact media and culture. Students will learn current web design and development workflows with an emphasis on networked interaction and visualization. Current trends in online media will be examined with special attention paid to how projects can exist on multiple platforms such as mobile phones, tablets, and desktop computers. Through in-class exercises, projects, critique, hands-on workshops, readings and discussion we will explore the role of the digital artist/designer in a constantly evolving digital landscape. Students will develop an understanding of web technologies in order to implement creative systems.

Materials

2024 Assignments

2019 Assignments

2016 Assignments

Procedures

Video Guide

The following assumes a few things

  1. First, make sure that you have Git installed. This can be downloaded from here: https://git-scm.com.
  2. Second, make sure that you have a useful text editor you can code in like Visual Studio Code, https://code.visualstudio.com.

To work on your HW

  1. Click the assignment invite button on this page to have GitHub automatically create a repo for you. Note the repository URL given to you here.
  2. Open Terminal (Mac) or Git Bash (Windows).
  3. cd /to/where/you/store/your/classwork For instance, a “Creative Coiding” folder inside “(My) Documents” would work well.
  4. git clone <repository url> The URL here should be for the repo GitHub made for you in the first step.
  5. ls to get the names of the files in this folder
  6. cd /to/the/name/of/your/repo You can see what your repo is called from the output of the previous command.
  7. Now you’re ready to set up your p5.js project! Proceed to the next section for instructions.

Set up a p5.js project (in Terminal)

  1. Open the repo folder in your text editor with File > Open or by using something like code . in terminal if you’re using VS Code and have command line capabilities installed.
  2. Use touch index.html in terminal to create an empty index.html file or use your file editor to make a new file named index.html.
  3. Use touch sketch.js in terminal to create an empty sketch.js file or use your file editor to make a new file named sketch.js.
  4. In terminal use curl -L https://github.com/processing/p5.js/releases/latest/download/p5.min.js to download p5.js to your project folder.
  5. Now you should have a folder on your computer with files named index.html, sketch.js, and p5.min.js. See the “Scaffold” section below for a basic struture for the first 2 files.
  6. Now you’re ready to start coding!

Set up a p5.js project (in VS Code)

Video coming soon.

To upload or make changes to your code on GitHub

  1. git add -A This lets GitHub know you want all your files to be added. If you’re already run this before and there isn’t anything new you don’t have to run it again.
  2. git commit -am "your message here" This creates a snapshot of the changes you’ve made along with a message describing them.
  3. git push This uploads your code to GitHub.
  4. Your code is now online. Use git config --get remote.origin.url to see your repos URL.

To create a website from your GitHub code

  1. Go to your GitHub repo website.
  2. Click Settings and scroll down to GitHub Pages.
  3. Under source choose your master branch.
  4. Visit your website at: http://lsudigitalart.github.io/<your repo name>

Notes

Troubleshooting

If VS Code or Git throws an error that says “Make sure to configure your user.name and user.email in Git.” open terminal in your assignment directory and put in the following git config commands separately pressing enter after each one. Make sure to use your LSU email address.

Helpful Bash Commands

Helpful Git Commands

Start a server

Mac

  1. Open Terminal
  2. cd into your sketch directory
  3. Type python -m SimpleHTTPServer
  4. Visit your site at http://localhost:8000

Windows

  1. Download and Install Python 2 from python.org
  2. cd into your sketch directory
  3. Open command prompt or git bash and type C:/Python27/python.exe -m SimpleHTTPServer
  4. Visit your site at http://localhost:8000

Scaffold

Empty Example of index.html

<!doctype html>
<html>
  <head>
    <title>Assignment ## - First Name Last Initial</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.min.js"></script>
    <script src="sketch.js"></script>
  </head>
  <body>
  </body>
</html>

Empty Example of sketch.js

function setup() {
  // Put things you want to run once in here. 
}

function draw() {
  // Put things you want to over and over here. 
}

Download Scaffold

Plain
Pretty much the basics.

curl -L https://github.com/fredeerock/p5js_starter/archive/master.zip | tar xz --strip=1

Featured
This has a VS Code debugging config as well as a bit more starter code.

curl -L https://github.com/fredeerock/p5js_starter/archive/debug.zip | tar xz --strip=1

Resources

Course Specific

Processing

JavaScript

Git

HTML

Terminal

Some Creative Coders (2016)

Inspiration