UAL CCI: Introduction to Creative Computing Intensive 2022: 🛠: Workshop 1: what Git and GitHub are, signing up to GitHub, using editor.p5js.org, Where to find information about other ways of running p5.js, duplicating a p5.js example on editor.p5js.org.
Back to slide index.
By the end of this workshop, we'll have learnt about:
- What Git and GitHub are
- Signing up to GitHub - the best place to find and share code
- Using editor.p5js.org with your GitHub login - this is the way we will make code for the rest of the week
- Where to find information about other ways of running p5.js
- Duplicating a p5js example on editor.p5js.org
Before we start, I wanted to share a lovely analogy that Rocio suggested for what we are doing in this workshop: "we are setting up tools to get coding or get started with resources to find code, just like gathering materials you might need for other crafts like painting". I hope that's helpful!
Signing up to GitHub - the best place to find and share code
GitHub is a website that enables you to use
Git to store, edit and share all your code with other developers around the world. Git is software for tracking changes to and sharing those changes with other programmers.Git is open source, while GitHub is owned by Microsoft. Both are free to use. Github is the industry standard website for programmers - employers may look at your GitHub to see what kind of code you write and how you help others. It's the first place I go to find code to use in my own work.
Sign up to GitHub here:
https://github.com/signup - please use a non university email address to do this, so you can keep logging in after you've graduated. Pick a username that you wouldn't be embarassed to apply for a job with! I'll give you 5 minutes to do this.
Using editor.p5js.org with your GitHub login - this is the way we will make code for the rest of the week
🥁 Drum roll please! This is the website we are going to be using to make creative code for the rest of the week!
The easiest way of coding with p5.js is to use the amazing online editor that p5.js itself provides:
https://editor.p5js.org. It's totally free and you can log into it with your GitHub login.
Second, give it a try yourself!
Now I'd like to take a moment to go over the structure of a p5.js sketch - showing how a webpage (index.html) combines with some javascript code (sketch.js) and a stylesheet (style.css) to make a complete program that runs on the web. Let's also talk about what a library, console and server are - a good place to bookmark for all of this information is the
JavaScript basics tutorial on the p5.js GitHub wiki, which is like a Wikipedia, but just for p5.js.
Finally, I'd like you to pick a
p5.js example (maybe pick one of the examples from Hello p5 in the bottom right hand corner?) and try it on the
p5.js web editor (don't forget to check the File > Examples menu!), and I'll also show you some very useful things in the p5.js editor:
errors, the console and
comments too. A few "Coding Train" links there, all from the BRILLLIANT AND HIGHLY RECOMMENDED
Code! Programming with p5.js for beginners playlist, if you want to go into more detail. So let's start by me demonstrating how to run an example on editor.p5js.org, and show the console, errors and comments, before you pick an example for yourselves to try.