SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
Front-End Web
Development
Lesson 6
Introduction to Programming
Agenda
●
●
●
●
●
●
●

Review (10 minutes)
Team Presentations (20 minutes)
Intro to Programming (10 minutes)
Pseudo Code(20 minutes)
Examples: Thermostat & Pasta (40 minutes)
Boston Temperature (20 minutes)
Lab: Pizza Ordering (45 minutes)
Where We Are
We have developed an understanding of the
following technologies:
HTML5
CSS
The final front-end development technology:
JavaScript
What is a Program?
A program is a set of instructions to tell a
computer what to do
A computer will only do what you tell it to do.
What is Programming?
Programming is the task of writing those
instructions in a language that the computer
can understand.
Becoming a Programmer
It isn’t about the programming language. It is
about changing how you think.
We have to know how the computer thinks to
change how we think.
How Computers “Think”
The short answer is that they don’t think.
Computers act as if they think by sequentially
executing simple instructions.
The only things a computer know are the things
we tell it.
Pseudo Code
Pseudo code is the process of writing a
program without using the syntax of a
programming language
Pseudo Code
Example #1:
If the door is closed and I want to exit the room,
then open the door.
Pseudo Code
Example #1:
If the door is closed and I want to exit the
room, then open the door.
Pseudo Code
Example #1:
If (door is closed and I want to exit the room) {
open the door
}
Pseudo Code
Example #2 (Thermostat)
Outline pseudo code for an application that
would monitor the room temperature and adjust
it so that the room remains a certain
temperature.
Pseudo Code
Example #2 (Thermostat -- in English)
get the temperature
set the target temperature to 72 degrees
repeat these steps:
get the current temperature
if target temperature > (current temperature + 5), then
turn on the heater
if target_temperature <= current temperature, then
turn off the heater
Pseudo Code
Example #2 (Thermostat -- more code-like)
get target_temprature
target_temperature = 72
repeat forever,
current_temperature = get_sensor_reading
if target_temperature > (current_temperature + 5),
turn_on_heater
if target_temperature <= current_temperature,
turn_off_heater
Flow Control
JavaScript is programming
Programming is simply a series of instructions
~ think recipe
Flow Control
Sometimes the ingredients change
~ variables
Sometimes steps are repeated
~ loop
Flow Control
Sometimes steps are changed or omitted
~ conditional statements
Sometimes instructions are common to several
recipes
~ function
Pseudo Code
Simply explain what you want to happen in
plain English
Example #3 (Recipe)
~ explain how to make pasta
Pseudo Code
Step 1: assemble ingredients
Step 2: boil water
Step 3: add pasta
Step 4: heat pasta sauce
Step 5: combine pasta and sauce
Step 6: serve
Programming Concepts
variables: [ingredients]
loops : [repeated steps]
conditionals: [if one thing, then do something]
functions: [mini-programs]
Whiteboard
Build out pseudo code for making pasta.
What Can JavaScript Do?
Let’s look at a web page example:
~ Google “weather Boston”
What Can JavaScript Do?
variables: [ingredients] ???
loops: [repeated steps] ???
conditionals: [if one thing, then do something] ???
functions: [mini-programs] ???
Lab
Create pseudo code for the process of ordering
pizza.
Whiteboard the basics.
Work in teams of three.
Homework
Watch What Can You Do with JavaScript?
Research Chrome Developer Tools
Create index page for your server workspace

Contenu connexe

Similaire à Lesson 06

L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
System integration through queues
System integration through queuesSystem integration through queues
System integration through queuesGianluca Padovani
 
Week 2PRG 218 Variables and Input and Output OperationsWrite.docx
Week 2PRG 218   Variables and Input and Output OperationsWrite.docxWeek 2PRG 218   Variables and Input and Output OperationsWrite.docx
Week 2PRG 218 Variables and Input and Output OperationsWrite.docxmelbruce90096
 
TOPIC-1-Introduction and Preliminaries.pdf
TOPIC-1-Introduction and Preliminaries.pdfTOPIC-1-Introduction and Preliminaries.pdf
TOPIC-1-Introduction and Preliminaries.pdfEjazAlam23
 
Programs_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.pptPrograms_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.pptmalik681299
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menunoahjamessss
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menucskvsmi44
 
MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...
MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...
MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...Dylan-Wu
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartdipti reya
 
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubAIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubNhi Nguyen
 
TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24Adi Bolboaca
 
TDD BDD PHP - Sviluppo guidato dai test in PHP con phpspec
TDD BDD PHP - Sviluppo guidato dai test in PHP con phpspecTDD BDD PHP - Sviluppo guidato dai test in PHP con phpspec
TDD BDD PHP - Sviluppo guidato dai test in PHP con phpspecPatrick Luca Fazzi
 
Logika dan Algoritma pemrograman
Logika dan Algoritma pemrogramanLogika dan Algoritma pemrograman
Logika dan Algoritma pemrogramanArif Huda
 

Similaire à Lesson 06 (20)

Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Pyramid of-developer-skills
Pyramid of-developer-skillsPyramid of-developer-skills
Pyramid of-developer-skills
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
System integration through queues
System integration through queuesSystem integration through queues
System integration through queues
 
Week 2PRG 218 Variables and Input and Output OperationsWrite.docx
Week 2PRG 218   Variables and Input and Output OperationsWrite.docxWeek 2PRG 218   Variables and Input and Output OperationsWrite.docx
Week 2PRG 218 Variables and Input and Output OperationsWrite.docx
 
TOPIC-1-Introduction and Preliminaries.pdf
TOPIC-1-Introduction and Preliminaries.pdfTOPIC-1-Introduction and Preliminaries.pdf
TOPIC-1-Introduction and Preliminaries.pdf
 
part_1 (1).ppt
part_1 (1).pptpart_1 (1).ppt
part_1 (1).ppt
 
Programs_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.pptPrograms_Problem_Solving_Algorithms.ppt
Programs_Problem_Solving_Algorithms.ppt
 
Week 1
Week 1Week 1
Week 1
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menu
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menu
 
MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...
MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...
MITx 6.00.1x Introduction to Computer Science and Programming Using Python - ...
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubAIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
 
TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24
 
TDD BDD PHP - Sviluppo guidato dai test in PHP con phpspec
TDD BDD PHP - Sviluppo guidato dai test in PHP con phpspecTDD BDD PHP - Sviluppo guidato dai test in PHP con phpspec
TDD BDD PHP - Sviluppo guidato dai test in PHP con phpspec
 
Write tests, please
Write tests, pleaseWrite tests, please
Write tests, please
 
Logika dan Algoritma pemrograman
Logika dan Algoritma pemrogramanLogika dan Algoritma pemrograman
Logika dan Algoritma pemrograman
 

Plus de Gene Babon

Job Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling AlleysJob Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling AlleysGene Babon
 
Tech Over Fifty Launch Meeting
Tech Over Fifty Launch MeetingTech Over Fifty Launch Meeting
Tech Over Fifty Launch MeetingGene Babon
 
Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018Gene Babon
 
Become a Front End Web Developer
Become a Front End Web DeveloperBecome a Front End Web Developer
Become a Front End Web DeveloperGene Babon
 
Navigating a Career in Web Technology
Navigating a Career in Web TechnologyNavigating a Career in Web Technology
Navigating a Career in Web TechnologyGene Babon
 
Getting Things Done
Getting Things DoneGetting Things Done
Getting Things DoneGene Babon
 
jQuery Mobile Hour 4
jQuery Mobile Hour 4jQuery Mobile Hour 4
jQuery Mobile Hour 4Gene Babon
 

Plus de Gene Babon (20)

Job Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling AlleysJob Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling Alleys
 
Tech Over Fifty Launch Meeting
Tech Over Fifty Launch MeetingTech Over Fifty Launch Meeting
Tech Over Fifty Launch Meeting
 
Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018
 
Become a Front End Web Developer
Become a Front End Web DeveloperBecome a Front End Web Developer
Become a Front End Web Developer
 
Navigating a Career in Web Technology
Navigating a Career in Web TechnologyNavigating a Career in Web Technology
Navigating a Career in Web Technology
 
Info Session
Info SessionInfo Session
Info Session
 
Info session
Info sessionInfo session
Info session
 
Getting Things Done
Getting Things DoneGetting Things Done
Getting Things Done
 
jQuery Mobile Hour 4
jQuery Mobile Hour 4jQuery Mobile Hour 4
jQuery Mobile Hour 4
 
Lesson 17
Lesson 17Lesson 17
Lesson 17
 
Lesson 18
Lesson 18Lesson 18
Lesson 18
 
Lesson 17
Lesson 17Lesson 17
Lesson 17
 
Lesson 16
Lesson 16Lesson 16
Lesson 16
 
Lesson 15
Lesson 15Lesson 15
Lesson 15
 
Lesson 11
Lesson 11Lesson 11
Lesson 11
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 

Dernier

Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Dernier (20)

Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

Lesson 06

  • 2. Agenda ● ● ● ● ● ● ● Review (10 minutes) Team Presentations (20 minutes) Intro to Programming (10 minutes) Pseudo Code(20 minutes) Examples: Thermostat & Pasta (40 minutes) Boston Temperature (20 minutes) Lab: Pizza Ordering (45 minutes)
  • 3. Where We Are We have developed an understanding of the following technologies: HTML5 CSS The final front-end development technology: JavaScript
  • 4. What is a Program? A program is a set of instructions to tell a computer what to do A computer will only do what you tell it to do.
  • 5. What is Programming? Programming is the task of writing those instructions in a language that the computer can understand.
  • 6. Becoming a Programmer It isn’t about the programming language. It is about changing how you think. We have to know how the computer thinks to change how we think.
  • 7. How Computers “Think” The short answer is that they don’t think. Computers act as if they think by sequentially executing simple instructions. The only things a computer know are the things we tell it.
  • 8. Pseudo Code Pseudo code is the process of writing a program without using the syntax of a programming language
  • 9. Pseudo Code Example #1: If the door is closed and I want to exit the room, then open the door.
  • 10. Pseudo Code Example #1: If the door is closed and I want to exit the room, then open the door.
  • 11. Pseudo Code Example #1: If (door is closed and I want to exit the room) { open the door }
  • 12. Pseudo Code Example #2 (Thermostat) Outline pseudo code for an application that would monitor the room temperature and adjust it so that the room remains a certain temperature.
  • 13. Pseudo Code Example #2 (Thermostat -- in English) get the temperature set the target temperature to 72 degrees repeat these steps: get the current temperature if target temperature > (current temperature + 5), then turn on the heater if target_temperature <= current temperature, then turn off the heater
  • 14. Pseudo Code Example #2 (Thermostat -- more code-like) get target_temprature target_temperature = 72 repeat forever, current_temperature = get_sensor_reading if target_temperature > (current_temperature + 5), turn_on_heater if target_temperature <= current_temperature, turn_off_heater
  • 15. Flow Control JavaScript is programming Programming is simply a series of instructions ~ think recipe
  • 16. Flow Control Sometimes the ingredients change ~ variables Sometimes steps are repeated ~ loop
  • 17. Flow Control Sometimes steps are changed or omitted ~ conditional statements Sometimes instructions are common to several recipes ~ function
  • 18. Pseudo Code Simply explain what you want to happen in plain English Example #3 (Recipe) ~ explain how to make pasta
  • 19. Pseudo Code Step 1: assemble ingredients Step 2: boil water Step 3: add pasta Step 4: heat pasta sauce Step 5: combine pasta and sauce Step 6: serve
  • 20. Programming Concepts variables: [ingredients] loops : [repeated steps] conditionals: [if one thing, then do something] functions: [mini-programs]
  • 21. Whiteboard Build out pseudo code for making pasta.
  • 22. What Can JavaScript Do? Let’s look at a web page example: ~ Google “weather Boston”
  • 23. What Can JavaScript Do? variables: [ingredients] ??? loops: [repeated steps] ??? conditionals: [if one thing, then do something] ??? functions: [mini-programs] ???
  • 24. Lab Create pseudo code for the process of ordering pizza. Whiteboard the basics. Work in teams of three.
  • 25. Homework Watch What Can You Do with JavaScript? Research Chrome Developer Tools Create index page for your server workspace