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?
- coding (aka programming or software development) is a creative, human activity
- coding does not mean "cracking the code" or "deciphering" -- it's not a mystery or a secret, at least no more than any other language
- the words (and numerals and punctuation) we write are translated into long strings of ones and zeros
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
What is coding?
- coding is fun!
- coding is frustrating!
- coding is creative!
- coding is communication
- between you and a computer
- between you and other coders
- between you and future you
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)
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
- Every program is written in a LANGUAGE
- like Java or Python or C or Fortran
- even HTML and CSS and SQL are languages
- every computer language has a silly name
- Computer languages are very specific compared to natural languages
- Different languages are useful in different areas, but there is a lot of overlap
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
See the Installfest project for more instructions.
- a text editor - VS Code from Microsoft https://code.visualstudio.com
- Git - version 2.x
- Sign up for an account at https://github.com/
- Sign up for an account at https://signup.heroku.com
- Install the Heroku Command Line Interface (CLI) at https://devcenter.heroku.com/articles/heroku-cli
- MongoDB, and Compass
Please stop right now and check
- If you do not have these, RAISE YOUR HAND