Intro
You may have never programmed before. Now you will.
What is code?
In general, code is something that stands for something else.
In computers, code is a series of instructions that tell a computer what to do.
What is coding NOT?
- coding is not mathematical
- some logic (if / then / and / or / etc.)
- mostly just counting ("do this 10 times")
- coding is not solitary
- most coding happens in a team
- all professional coding happens with clients / users / designers / managers etc.
- coding is not about finding the right answer
- there's always more than one way to do it
- every solution has tradeoffs
- there is always a better way, and never a perfect way
- often the hardest part of coding is defining the problem, not solving it
"The only perfect program is an empty file." - Alex
A Program Is Like A Recipe
- a recipe is a collection of ingredients and instructions
- a program is a collection of data and code
When you are writing code, you are not baking cookies, you are writing a recipe for how to make cookies.
(recipe from popcornpottery.com)
Programmatic Thinking
Throughout this course one of the most important skills you will learn is how to think like a programmer.
Computers are weird, and very literal. Here are a few things to keep in mind when working with them:
- Computers are very fast, but not very smart. They will only ever do exactly what you tell them to
- Computers are really bad at being random. There's always a pattern, though it's not always obvious
- When you run into a bug, try and replicate it. If you know the actions that break your code it's easier to guard against them
- Getting a different error is good. It means you're making progress so don't get discouraged!
- Build things for fun, and to learn
Errors Are Awesome
- Don't be afraid of errors
- Your computer is trying to help you fix your program
- It's just really bad at communicating
If your code is a two-year-old child, then an error is a temper tantrum.
(It can take effort to figure out the underlying reason why they're upset and fix it.)
- It's not all gibberish
- Try to read it -- really try! -- and pull out the pearls from the pig slop
See also: What went wrong? from MDN
What will we learn?
In this class, you will learn about:
- The command line and why we use it
- Strings, Arrays, Variables, Objects, Loops, Files
- How to run your code interactively or from a file
- How to make a very simple website run on your own computer
Follow along online! Put a browser pointed at this site on one side of your screen, and Terminal on the other.
What if I know some of this already?
- Pair up
- Help your partner, help your neighbor
- Docendo discimus ("By Teaching We Learn")
- Promote yourself to TA
The best way to learn is to teach.
- Latin proverb
Technical requirements
See the Installfest project for more instructions.
Software: