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 human activity
- it's called code because what we write is not what the computer reads
- to a computer, it's all ones and zeros; to us, it's words (and numerals and punctuation)
What is coding NOT?
- coding is not mathematical
- some logic
- mostly just counting
- coding is not solitary
- most coding happens in a team
- pair programming is awesome
- 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
- "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)
- 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 today?
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
- Promote yourself to TA
The best way to learn is to teach.
- Latin proverb
a text editor
- VS Code from Microsoft https://code.visualstudio.com
- Note: Microsoft Word is not a text editor
- a live node.js installation
- visit https://nodejs.org/ for more instructions
- version 9.2 is preferred, others are probably fine too
node -vin terminal to check
Please stop right now and check
- If you do not have these, RAISE YOUR HAND