SlideShare a Scribd company logo
introduction to programming
WHAT’S THIS ALL ABOUT?
Who: Alex Pearson
Director of Curriculum & Instruction
Claim Academy
What: A step-by-step intro to your first website and
JavaScript program
Overview of Programming
Intro to HTML/CSS
Intro to JavaScript/JQuery
Why: to get you excited about programming!
GOALS OF THIS COURSE:
Get excited! Have fun! Get hype!
Learn about software development.
What is programming?
What does a programmer do?
Learn (a little) about the Web.
What is “the internet”?
How do I make it do what I want?
Build your first website and program.
How do I use HTML/CSS?
How do I use JavaScript/JQuery?
THINGS NEEDED FOR CLASS:
Computer: Mac, Windows, or Linux
Sorry, no Chromebooks
Preferred: >2GB of RAM
Wi-Fi: Connection information below
Name: Claim
Password: Claimhome
Brackets: A free text-editor from Adobe
Download link: http://brackets.io
Browser: Chrome, Firefox, Safari, Opera
Please no Internet Explorer. Ever.
THINGS NEEDED FOR CLASS 2:
Template Files .zip: download online
https://github.com/NAlexPear/Intro-Class/tree/class-
download
Click “Download .zip” in the right sidebar
Extracted Template Files: wherever you’d like
Don’t forget where you put that file!
Open Project in Brackets: File > Open Folder
Make sure you have ‘css’, ‘js’, ‘images’ directories,
and an index.html file (+ some other stuff)
Live Preview: Set up your live preview
Display ‘index.html’, then click the lightning bolt
QUICK BREATHER (5 minutes)
Everything ready to go?
1) Introduce yourself to one of the people sitting
next to you
2) Ask them what kind of laptop they have & why.
3) Ask them what experience they have with
programming, IT, or computers.
4) Introduce your new friend to someone else.
EXERCISE 1: AM I PROGRAMMING?
To the editor! (brackets)
EXERCISE 1: AM I PROGRAMMING?
...not yet
WHAT IS PROGRAMMING?
The “verbs” of the computer world
2 + 3
var doThis = function(){ thing to do };
Where is programming used? At every “level”
Hardware/Architecture (1000110011)
Between hardware and an OS (Assembly)
Within an OS (terminals, source code)
On top of OS (programs, virtual machines)
-including in browsers! (just not HTML/CSS)
What did we just do with HTML/CSS, then?
WHAT IS THE WEB?
The “web” is a (series of) connection(s):
Users->browsers->the “Internet”->servers
...all communicating via Transfer Protocols (e.g.
HTTP and HTTPS)
USERS BROWSERS INTERNET
SERVERS
ENOUGH TALK, LET’S TYPE
HTML: “Hyper Text Markup Language”
DOM: “Document Object Model”
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<link
rel=”stylesheet”>
<script></script>
</head>
<body>
<div>
<h1></h1>
</div>
<div>
<p></p>
</div>
</body>
DOCUMENT
HTML
head
METADATA
body
div
VISIBLE
div
STUFF
QUICK BREATHER (5 minutes)
Anything need to be reviewed?
1) Ask your neighbor any questions you have so
far!
a) if you can’t answer them yet, ask me!
2) Tell your neighbor how much you love HTML
and CSS (and what you’d like to learn about
next)
3) Get everything ready for JavaScript!
WE GET TO PROGRAM! (finally)
To the editor! (Chrome)
JAVASCRIPT BUILDING
BLOCKS
Data types:
- number
- string (“hello world”)
- boolean (TRUE/FALSE)
Operators 1: assignment
- variables: =, +=, -=, *=, /=, %=
Operators 2: data-type specific
- numbers: +, -, *, /, %, ++, --
- strings: +, +=
- comparison (boolean): ===, !==, >, <, >=, <=,
&&, ||
JAVASCRIPT BUILDING BLOCKS 2
Methods: functions attached to Objects
- some are custom, some are built in!
- Ex: .length, toUpperCase
Functions: like variables, but for blocks of code
- methods are a kind of function
- you can create your own functions, too!
- you can save functions as a variable
var doSomething = function(parameters){
stuff to do;
};
BUILDING A CALCULATOR 1:
JQuery: extending JavaScript’s built-in methods
- interacts with the DOM
- makes ‘Events’ easier to implement
- integrates seamlessly with JavaScript
- $(‘html or css selectors here’).doSomething();
var calc = function(){};
$(document).ready(function(){
$(‘#button’).click(function(){
calc();
});
});
BUILDING A CALCULATOR 2:
Back to regular ol’ JavaScript:
- need to gather user input (prompt)
- build functions for each operation
- need to return answers from each function;
var calc = function(){
var num1 = //something
var num2 = //something
var add = function(num1, num2){
return num1+num2;
};
};
BUILDING A CALCULATOR 3:
Thinking about user interaction:
- how do we want the user to interact with these
functions?
- what are the limitations of this program?
- think about data types!
var operation = //something
if(operation === //something){
alert(//some function);
}else if (//something else){
alert(//some other function);
};
BREAKING OUR CALCULATOR:
Still thinking about users: how can we break it?
- What if users don’t know what numbers are?
- What if users don’t know what operations are
valid or supported?
- What is the data type of user input?
- How can we communicate errors to users?
var num1 = parseInt(input1,0);
if(isNaN(num1) === true || isNaN(num2) === true){
//tell the user that something is wrong
}else{
//carry on
};
CALCULATOR v2.0
Think about calculator.js v2.0: what could we add?
You did it!
Now what’s next?
THANKS, AND GOOD LUCK!
LinkedIn: https://www.linkedin.com/in/nalexpearson
email: alex@claimacademystl.com
twitter: @NAlexPear
GitHub: NAlexPear
Thanks for coding
with me today!
https://claimacademystl.com

More Related Content

What's hot

Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)
Rex Lorenzo
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
Sencha
 
Javascript and jQuery PennApps Tech Talk, Fall 2014
Javascript and jQuery PennApps Tech Talk, Fall 2014Javascript and jQuery PennApps Tech Talk, Fall 2014
Javascript and jQuery PennApps Tech Talk, Fall 2014
Kathy Zhou
 
Untangling6
Untangling6Untangling6
Untangling6
Derek Jacoby
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
Raymond Camden
 
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
ryanduff
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
andrewnacin
 
Automated browser testing
Automated browser testingAutomated browser testing
Automated browser testing
David Darke
 
Word press dreamweaver
Word press dreamweaverWord press dreamweaver
Word press dreamweaver
kmawk
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)
Clarence Ngoh
 
Weebly login
Weebly loginWeebly login
Weebly login
marvinmikkelson
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
Derek Jacoby
 
Take your drupal sites offline
Take your drupal sites offlineTake your drupal sites offline
Take your drupal sites offline
Chris Ward
 
Untangling spring week10
Untangling spring week10Untangling spring week10
Untangling spring week10
Derek Jacoby
 
Cutting the Fat
Cutting the FatCutting the Fat
Cutting the Fat
Codemotion
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10
Derek Jacoby
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
Derek Jacoby
 
SocketStream
SocketStreamSocketStream
SocketStream
Paul Jensen
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
houzman
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /Capybara
ShraddhaSF
 

What's hot (20)

Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)Behat & Automated Testing (Lightning Talk)
Behat & Automated Testing (Lightning Talk)
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Javascript and jQuery PennApps Tech Talk, Fall 2014
Javascript and jQuery PennApps Tech Talk, Fall 2014Javascript and jQuery PennApps Tech Talk, Fall 2014
Javascript and jQuery PennApps Tech Talk, Fall 2014
 
Untangling6
Untangling6Untangling6
Untangling6
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
 
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
 
Automated browser testing
Automated browser testingAutomated browser testing
Automated browser testing
 
Word press dreamweaver
Word press dreamweaverWord press dreamweaver
Word press dreamweaver
 
Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)Having Fun Building Web Applications (Day 1 Slides)
Having Fun Building Web Applications (Day 1 Slides)
 
Weebly login
Weebly loginWeebly login
Weebly login
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
Take your drupal sites offline
Take your drupal sites offlineTake your drupal sites offline
Take your drupal sites offline
 
Untangling spring week10
Untangling spring week10Untangling spring week10
Untangling spring week10
 
Cutting the Fat
Cutting the FatCutting the Fat
Cutting the Fat
 
Untangling the web10
Untangling the web10Untangling the web10
Untangling the web10
 
Untangling the web11
Untangling the web11Untangling the web11
Untangling the web11
 
SocketStream
SocketStreamSocketStream
SocketStream
 
WordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQLWordPress 2017 with VueJS and GraphQL
WordPress 2017 with VueJS and GraphQL
 
BDD / cucumber /Capybara
BDD / cucumber /CapybaraBDD / cucumber /Capybara
BDD / cucumber /Capybara
 

Viewers also liked

Digitalverkstan 2016
Digitalverkstan 2016Digitalverkstan 2016
Digitalverkstan 2016
Mattias Wahlberg
 
Intro to programming
Intro to programmingIntro to programming
Intro to programming
Arvin Buendia
 
Digitalkunskap framlar
Digitalkunskap framlarDigitalkunskap framlar
Digitalkunskap framlar
Mathias Mjörnheim
 
Tjejer kodar 100 - Dag 1- intro och setup
Tjejer kodar 100 - Dag 1- intro och setupTjejer kodar 100 - Dag 1- intro och setup
Tjejer kodar 100 - Dag 1- intro och setup
Emil Stenström
 
Introduktion till WordPress
Introduktion till WordPressIntroduktion till WordPress
Introduktion till WordPress
Olaf Lindström
 
Programmering en fråga om demokrati
Programmering en fråga om demokratiProgrammering en fråga om demokrati
Programmering en fråga om demokrati
mittlarande
 
Coding as a (second) Language
Coding as a (second) LanguageCoding as a (second) Language
Coding as a (second) Language
Kenneth Ronkowitz
 
An intro to programming
An intro to programmingAn intro to programming
An intro to programming
WolfFlight
 
Coding Club Introduction Poster
Coding Club Introduction PosterCoding Club Introduction Poster
Coding Club Introduction Poster
Angela DeHart
 
Coding, robots and drones in the es
Coding, robots and drones in the esCoding, robots and drones in the es
Coding, robots and drones in the es
Michael Boll
 
The year we learnt to code
The year we learnt to codeThe year we learnt to code
The year we learnt to code
Aurora Jove
 
Hotmail
HotmailHotmail
Hotmail
Ivo Monge
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
Adam Mukharil Bachtiar
 
Introduction To Programming
Introduction To ProgrammingIntroduction To Programming
Introduction To Programming
cwarren
 
Makerkultur i skolan
Makerkultur i skolan Makerkultur i skolan
Speaking 'Development Language' (Or, how to get your hands dirty with technic...
Speaking 'Development Language' (Or, how to get your hands dirty with technic...Speaking 'Development Language' (Or, how to get your hands dirty with technic...
Speaking 'Development Language' (Or, how to get your hands dirty with technic...
Julie Meloni
 
Things lab - introduction to programming
Things lab - introduction to programmingThings lab - introduction to programming
Things lab - introduction to programming
Things Lab
 
Scrtach jr
Scrtach jrScrtach jr
Scrtach jr
ctepay
 
Introduction to Programming (well, kind of.)
Introduction to Programming (well, kind of.)Introduction to Programming (well, kind of.)
Introduction to Programming (well, kind of.)
Julie Meloni
 
Intro to Programming
Intro to ProgrammingIntro to Programming
Intro to Programming
Jamal Sinclair O'Garro
 

Viewers also liked (20)

Digitalverkstan 2016
Digitalverkstan 2016Digitalverkstan 2016
Digitalverkstan 2016
 
Intro to programming
Intro to programmingIntro to programming
Intro to programming
 
Digitalkunskap framlar
Digitalkunskap framlarDigitalkunskap framlar
Digitalkunskap framlar
 
Tjejer kodar 100 - Dag 1- intro och setup
Tjejer kodar 100 - Dag 1- intro och setupTjejer kodar 100 - Dag 1- intro och setup
Tjejer kodar 100 - Dag 1- intro och setup
 
Introduktion till WordPress
Introduktion till WordPressIntroduktion till WordPress
Introduktion till WordPress
 
Programmering en fråga om demokrati
Programmering en fråga om demokratiProgrammering en fråga om demokrati
Programmering en fråga om demokrati
 
Coding as a (second) Language
Coding as a (second) LanguageCoding as a (second) Language
Coding as a (second) Language
 
An intro to programming
An intro to programmingAn intro to programming
An intro to programming
 
Coding Club Introduction Poster
Coding Club Introduction PosterCoding Club Introduction Poster
Coding Club Introduction Poster
 
Coding, robots and drones in the es
Coding, robots and drones in the esCoding, robots and drones in the es
Coding, robots and drones in the es
 
The year we learnt to code
The year we learnt to codeThe year we learnt to code
The year we learnt to code
 
Hotmail
HotmailHotmail
Hotmail
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
 
Introduction To Programming
Introduction To ProgrammingIntroduction To Programming
Introduction To Programming
 
Makerkultur i skolan
Makerkultur i skolan Makerkultur i skolan
Makerkultur i skolan
 
Speaking 'Development Language' (Or, how to get your hands dirty with technic...
Speaking 'Development Language' (Or, how to get your hands dirty with technic...Speaking 'Development Language' (Or, how to get your hands dirty with technic...
Speaking 'Development Language' (Or, how to get your hands dirty with technic...
 
Things lab - introduction to programming
Things lab - introduction to programmingThings lab - introduction to programming
Things lab - introduction to programming
 
Scrtach jr
Scrtach jrScrtach jr
Scrtach jr
 
Introduction to Programming (well, kind of.)
Introduction to Programming (well, kind of.)Introduction to Programming (well, kind of.)
Introduction to Programming (well, kind of.)
 
Intro to Programming
Intro to ProgrammingIntro to Programming
Intro to Programming
 

Similar to Claim Academy Intro to Programming

Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
Ulrich Krause
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
JAX London
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
William Myers
 
JavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScriptJavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScript
Laurence Svekis ✔
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
Rob Davarnia
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
Mikkel Flindt Heisterberg
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
Arjun Kumawat
 
Beyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 AppsBeyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 Apps
Marcos Caceres
 
Getting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent SourcingGetting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent Sourcing
Glenn Gutmacher
 
Become a webdeveloper - AKAICamp Beginner #1
Become a webdeveloper - AKAICamp Beginner #1Become a webdeveloper - AKAICamp Beginner #1
Become a webdeveloper - AKAICamp Beginner #1
Jacek Tomaszewski
 
Introduction To Rich Internet Applications
Introduction To Rich Internet ApplicationsIntroduction To Rich Internet Applications
Introduction To Rich Internet Applications
Abdelmonaim Remani
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe
Stefano Di Paola
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
AppUniverz Org
 
Html5
Html5Html5
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Andres Baravalle
 
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
Albert Mietus
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
Chris Schalk
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software Development
Zeeshan MIrza
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
hamzadamani7
 

Similar to Claim Academy Intro to Programming (20)

Electron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easyElectron - cross platform desktop applications made easy
Electron - cross platform desktop applications made easy
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
JavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScriptJavaScript guide 2020 Learn JavaScript
JavaScript guide 2020 Learn JavaScript
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
Beyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 AppsBeyond HTML: Tools for Building Web 2.0 Apps
Beyond HTML: Tools for Building Web 2.0 Apps
 
Getting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent SourcingGetting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent Sourcing
 
Become a webdeveloper - AKAICamp Beginner #1
Become a webdeveloper - AKAICamp Beginner #1Become a webdeveloper - AKAICamp Beginner #1
Become a webdeveloper - AKAICamp Beginner #1
 
Introduction To Rich Internet Applications
Introduction To Rich Internet ApplicationsIntroduction To Rich Internet Applications
Introduction To Rich Internet Applications
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 
Html5
Html5Html5
Html5
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software Development
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
 

Recently uploaded

Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 

Claim Academy Intro to Programming

  • 2. WHAT’S THIS ALL ABOUT? Who: Alex Pearson Director of Curriculum & Instruction Claim Academy What: A step-by-step intro to your first website and JavaScript program Overview of Programming Intro to HTML/CSS Intro to JavaScript/JQuery Why: to get you excited about programming!
  • 3. GOALS OF THIS COURSE: Get excited! Have fun! Get hype! Learn about software development. What is programming? What does a programmer do? Learn (a little) about the Web. What is “the internet”? How do I make it do what I want? Build your first website and program. How do I use HTML/CSS? How do I use JavaScript/JQuery?
  • 4. THINGS NEEDED FOR CLASS: Computer: Mac, Windows, or Linux Sorry, no Chromebooks Preferred: >2GB of RAM Wi-Fi: Connection information below Name: Claim Password: Claimhome Brackets: A free text-editor from Adobe Download link: http://brackets.io Browser: Chrome, Firefox, Safari, Opera Please no Internet Explorer. Ever.
  • 5. THINGS NEEDED FOR CLASS 2: Template Files .zip: download online https://github.com/NAlexPear/Intro-Class/tree/class- download Click “Download .zip” in the right sidebar Extracted Template Files: wherever you’d like Don’t forget where you put that file! Open Project in Brackets: File > Open Folder Make sure you have ‘css’, ‘js’, ‘images’ directories, and an index.html file (+ some other stuff) Live Preview: Set up your live preview Display ‘index.html’, then click the lightning bolt
  • 6. QUICK BREATHER (5 minutes) Everything ready to go? 1) Introduce yourself to one of the people sitting next to you 2) Ask them what kind of laptop they have & why. 3) Ask them what experience they have with programming, IT, or computers. 4) Introduce your new friend to someone else.
  • 7. EXERCISE 1: AM I PROGRAMMING? To the editor! (brackets)
  • 8. EXERCISE 1: AM I PROGRAMMING? ...not yet
  • 9. WHAT IS PROGRAMMING? The “verbs” of the computer world 2 + 3 var doThis = function(){ thing to do }; Where is programming used? At every “level” Hardware/Architecture (1000110011) Between hardware and an OS (Assembly) Within an OS (terminals, source code) On top of OS (programs, virtual machines) -including in browsers! (just not HTML/CSS) What did we just do with HTML/CSS, then?
  • 10. WHAT IS THE WEB? The “web” is a (series of) connection(s): Users->browsers->the “Internet”->servers ...all communicating via Transfer Protocols (e.g. HTTP and HTTPS) USERS BROWSERS INTERNET SERVERS
  • 11. ENOUGH TALK, LET’S TYPE HTML: “Hyper Text Markup Language” DOM: “Document Object Model” <!DOCTYPE HTML> <html> <head> <title></title> <link rel=”stylesheet”> <script></script> </head> <body> <div> <h1></h1> </div> <div> <p></p> </div> </body> DOCUMENT HTML head METADATA body div VISIBLE div STUFF
  • 12. QUICK BREATHER (5 minutes) Anything need to be reviewed? 1) Ask your neighbor any questions you have so far! a) if you can’t answer them yet, ask me! 2) Tell your neighbor how much you love HTML and CSS (and what you’d like to learn about next) 3) Get everything ready for JavaScript!
  • 13. WE GET TO PROGRAM! (finally) To the editor! (Chrome)
  • 14. JAVASCRIPT BUILDING BLOCKS Data types: - number - string (“hello world”) - boolean (TRUE/FALSE) Operators 1: assignment - variables: =, +=, -=, *=, /=, %= Operators 2: data-type specific - numbers: +, -, *, /, %, ++, -- - strings: +, += - comparison (boolean): ===, !==, >, <, >=, <=, &&, ||
  • 15. JAVASCRIPT BUILDING BLOCKS 2 Methods: functions attached to Objects - some are custom, some are built in! - Ex: .length, toUpperCase Functions: like variables, but for blocks of code - methods are a kind of function - you can create your own functions, too! - you can save functions as a variable var doSomething = function(parameters){ stuff to do; };
  • 16. BUILDING A CALCULATOR 1: JQuery: extending JavaScript’s built-in methods - interacts with the DOM - makes ‘Events’ easier to implement - integrates seamlessly with JavaScript - $(‘html or css selectors here’).doSomething(); var calc = function(){}; $(document).ready(function(){ $(‘#button’).click(function(){ calc(); }); });
  • 17. BUILDING A CALCULATOR 2: Back to regular ol’ JavaScript: - need to gather user input (prompt) - build functions for each operation - need to return answers from each function; var calc = function(){ var num1 = //something var num2 = //something var add = function(num1, num2){ return num1+num2; }; };
  • 18. BUILDING A CALCULATOR 3: Thinking about user interaction: - how do we want the user to interact with these functions? - what are the limitations of this program? - think about data types! var operation = //something if(operation === //something){ alert(//some function); }else if (//something else){ alert(//some other function); };
  • 19. BREAKING OUR CALCULATOR: Still thinking about users: how can we break it? - What if users don’t know what numbers are? - What if users don’t know what operations are valid or supported? - What is the data type of user input? - How can we communicate errors to users? var num1 = parseInt(input1,0); if(isNaN(num1) === true || isNaN(num2) === true){ //tell the user that something is wrong }else{ //carry on };
  • 20. CALCULATOR v2.0 Think about calculator.js v2.0: what could we add? You did it! Now what’s next?
  • 21. THANKS, AND GOOD LUCK! LinkedIn: https://www.linkedin.com/in/nalexpearson email: alex@claimacademystl.com twitter: @NAlexPear GitHub: NAlexPear Thanks for coding with me today! https://claimacademystl.com

Editor's Notes

  1. Hi everybody!
  2. take a look at index.html in the <title> part of the document, change the title of the webpage to whatever you’d like in the <body><div class=”header”><h1></h1></div></body> section, change the intro text to whatever you’d like in the <body><div class=”header><h3></h3></div></body> section, change the “programming is fun” text to whatever you’d like! Neat, huh? Notice how the text is instantly updated in the preview file. That’s because the browser is just reading a text document like you or I. Now change the <h3></h3> text into var add = 2+3; console.log(add); nothing happens, right? That’s because we’re not actually programming yet. HTML is just HYPER TEXT MARKUP LANGUAGE… or text that we can “mark up” to make prettier. By itself, HTML is static. It can point to programs, but it isn’t a program by itself. Now change the <h3></h3> text back into something cool. Then navigate to style.css. CSS = “cascading style sheets” very neat stuff, but the name should give you a hint about what it does Go into the h1 { } styling and change Helvetica to Times New Roman neat huh? Now try just writing any old text doesn’t show up This means that it’s not just text here. We’re getting closer to programming, but we’re not quite there yet. We can only manipulate the STYLE of something. if we think about it metaphorically, HTML is the NOUN (or series of nouns) CSS would be the ADJECTIVES Programming (or programs) would be VERBS Very simplified, and maybe not always true, but good rule of thumb
  3. To answer that last question, we need to understand a little bit more about the Web. We obviously used a browser, but where does programming fit in? Hopefully you’re starting to see the depth of knowledge it might take to call ones-self a “full-stack” developer, or even a “front-end” or “web developer” regardless of languages and frameworks. Be wary of the poser, but be excited about how much there is left to learn! And might I recommend a certain developer bootcamp if this sort of thing is exciting.
  4. Remember, that across the full “stack” of places to program, the “web” is only one option, and there’s a lot to deal with even when we restrict ourselves to the “web”. For today: -we’re just looking at the interaction between users and browsers, and that’s it -Also just static rather than dynamic web interactions dynamic interactions = facebook, blog pages, twitter (serves content dynamically) another layer of abstraction on top of static data static interactions = what we’re doing (even with code, since ours is JUST in the browser rather than being deployed to a server across the internets).
  5. Enough of all that. Let’s mess with stuff again. Before we get to the “programming” part of the course, we have to know a little bit about how those programs interact with the text documents in front of us: HTML and CSS. We won’t spend much time on CSS, but we need to know a few things about how HTML documents are set up so that we can manipulate the document with our programs! We’ve already discovered that HTML is just fancy text. All of the “programming” comes from the browser already, because it reads the text according to certain rules and displays that text according to presets. Those rules and presets are the things that make they hyper-text into a “markup” language. We can play according to those markup rules with TAGS. You’ve already seen a few tags before. We’ve messed with <title> and <h1>, which was neat. Those tags had very specific roles that mostly dealt with formatting. There are also tags for italics, bold, paragraphs, etc. The most important tags, though, are the ones the divide the HTML document into a series of chunks that interact with one another in a way that a browser can render and humans can understand. We refer to this as the DOM, or document object model. This is the foundation for how we’ll interact with HTML, and will inform how we mess with tags and content from here on out. (EXPLAIN DOM DIAGRAM FROM THE OUTSIDE IN) + what you might find in each section. Change the following in each section: in DOCUMENT and HTML: nothing at all. in head: remind folks about <title> comment out <link> for the stylesheet add <script> to calculator.js, test function in body check out <img> tags and how they work (relative vs url) relative->directory tree (remind folks that it’s very important NOT to change the directory structure) change calculator url to an image url of their choice check out <div> tags already messed with some of the text inside of tags change <h1> into other header types to see what happens should notice that the CSS we linked before changes a lot of the visible properties of the header (neat, huh?) add a link to http://claimacademyslt.com with an anchor tag <a href=””> take a look at the div with class “button” class is styled using CSS, but it’s also turned into an event listener this is how we’ll interact with the DOM through JQuery and JavaScript
  6. Enough with text and stuff! Let’s get to programming. We’re going to try out some of the simple concepts in the Javascript Console that comes packaged with Google Chrome. Everybody should open up the console with “control + shift + j”. This is how we’ll begin telling the browser what to do! Try typing in some simple math (addition, multiplication, division). Notice how the browser responds to our commands, rather than simply outputting text. Also, note how we can cause errors pretty easily when we screw something up! The nice thing about computers (and programming) is that they do exactly what you tell them to do. The frustrating thing about programming is that computers do exactly what you tell them to do. If there’s a bug, it’s your fault! Moving on to some important concepts in JavaScript to expand its functionality beyond basic addition...
  7. Programming languages have to differentiate between different kinds of data. While you and I might recognize that “2” and “two” are conceptually the same, the computer doesn’t and can’t. We have to differentiate between asking the computer to add numbers together or concatenating them into a string. An example: type in 2 + 2 ( you should get 4 as an answer) now type in “2” + “2” (you should get “22” as an answer) The different responses happen because of these different data types. There are lots of data types in the programming world and in Javascript, but we’re only going to go over three today: numbers, strings, and booleans. With these three, we can build our final calculator program! We can do things to and with these data types by using operators. Operators allow us to manipulate data of certain types or allows us to extract information about those types. It’s how we make the sentences of programming. Most of the time, operators work best when you’ve saved the data you’re using in a variable. Variables allow you to save data values (or functions, which we’ll see later), name them, and then bring them up later for use. You’ll be using a lot of variables as you start programming. Let’s make your first couple with some assignment operators. The most important one (=) simply assigns a value to a variable. Let’s try some of these: var myName = “Alex”; var myAge = 26; var isMale = true; console.log(“Hi, my name is “ + nyName + “ and I am “ + myAge + “ years old.”); Cool, huh? Now You’ve already seen a few of these operators in action. Many of the numbers operators make intuitive sense (+, -, etc.). Let’s try some of the following in the console: console.log(myAge++); console.log(myAge); console.log(++myAge); var greeting = (“Hello, my name is”); console.log(greeting + “ “ + myName); For boolean, let’s introduce one more concept to make these a bit more useful. Most of the time, we use a boolean to check if something is true or false, then do a specific thing to once we’ve established that it’s true or false. Example: if myName is “Alex”, log “Hi Alex” to the console, or else log “who are you?”. These are called “if-else” statements. Here’re a few examples: if(myName === “Alex”){console.log(“Hi Alex!);} else {console.log(“Who are you?”)}; if(myAge < 30){console.log(“A young whippersnapper”);} else {console.log(“Still a whippersnapper”);} if(myAge >18 && isMale === true){console.log(“Have you signed up for the draft?”);}else{console.log(“move along then”)};
  8. Neat, huh? You’ll find those kinds of operators in most programming languages. There are some syntactical differences between the language, but just about every language out there will have those same data types and operations, just like most spoken languages have verbs, adverbs, clauses, and direct objects. Now we’ve seen how to store data and manipulate it as variables. We can also store directives as functions. Some functions are attached to an object (like the data type “string”). Those are called methods. Some methods are built in already, which is a nice way of seeing how functions might work. Let’s give it a try! console.log(myName.length); console.log(myName.toUpperCase()); var input = prompt(“Look at this box! Put something in it”); console.log(input); Now let’s try a more complicated problem. See if you can do the following: use prompt to save a custom string as a variable calculate the length of that string save the length of the string as a new variable write a string to the console that tells the user how long their input was. Make sure that it’s a complete sentence, please. Now let’s see if we can wrap that up as its own custom function that we could call at any point! Imagine needing to call this same block of code 5 or 500 times on a page. It would be a lot easier if we could call a variable name instead of writing all of this business out again. So try wrapping all of that up in a function, then calling the function. Once again…. neat!
  9. While working in the console can be fun, it doesn’t add anything to our websites. We need to be able to save our javascript files and connect them to the DOM outlined by the HTML (and styled using css). We’re actually going to start building our calculator by connecting it to the webpage, then testing the functionality of what we’ve written through bracket’s HTML preview. Start by going to the ‘js’ directory (where jquery.min.js is stored), and create ‘calculator.js’. Hooray! Then go to index.html and connect calculator.js to index.html through the <script> tag. Just like the JQuery library is connected above! Now we need to make sure that whatever we write in this file connects to the document, loads with the DOM, and provides some interactivity. We’re going to do that by making sure to call a function when a certain div is clicked. Let’s see how that might work (see slide). (Walk through each part of the function above, shouldn’t take too long. )
  10. Inside calc, we need to gather user inputs, store them into variables, and return them (rather than log them to the console or output them somewhere). Returning something means that the value is stored, and can be used in some way when the function is called, but it’s not necessarily visible to the user unless we do something to it. Go ahead and fill in the rest of these variables and functions so that we have something almost useable! After this is done, we can test it out with the button. We might be missing something, though...
  11. See powerpoint prompts above. After a brief brainstorm, we can talk about how to get user input about what operations need to be done and turn that into an output. Let’s use if/else-if statements to call the operation functions according to user input! As long as we nest all of that in calc(); we should be able to call something right now with some output. Neat, huh?
  12. See powerpoint prompts above. After a brief brainstorm, we can talk about how to communicate to the user that they’re silly. Let’s run it again and see what error messages we get! How else might users screw up? (Add “else” condition to operations options to fix everything).
  13. See powerpoint prompts above. After a brief brainstorm, we can talk about how to communicate to the user that they’re silly. Let’s run it again and see what error messages we get! How else might users screw up? (Add “else” condition to operations options to fix everything).
  14. Thanks, good evening, and good night!