SlideShare a Scribd company logo
1 of 15
Teacher Prep
●Put an poster up on the wall where all
students can get to it. Title the poster "Class
Bugs"
●Sticky notes
LESSON OBJECTIVES
Students will be able to:
● Describe why using white space, indentation, and comments
makes your code easier to maintain.
● Develop a set of techniques for preventing bugs in HTML code
and finding them when they occur.
Warm Up
Today you will be working with your table row!
Warm Up
With Your Group:
• Using your sticky notes, come up with at least
three specific problems you have encountered
while trying to write web pages in HTML.
• What project were you working on?
• How did you ultimately track down and fix the
problem?
Bug
Part of a program that does not work correctly.
Debugging
Finding and fixing problems in your algorithm or program.
NEW WORDS!
Warm Up
Using your sticky notes, now write 3 bugs you’ve
encountered
Each sticky should have:
1. A brief description of the bug
2. Steps taken to solve it .
3. Name of student who solved it
Once groups have written down their at least three bugs,
stick them up on the class poster.
Warm Up
The problems you had when your HTML code did
not work correctly are bugs. The process of
fixing bugs and strategies used to fix them is
called debugging. Today we're going to be working
on our debugging skills and learning some
strategies to keep our code clean to help avoid
them.
BUG REPORT!
During today’s lesson, if you squash a bug and want to
write up your bug report, you can write it on your sticky
note. Make sure you include your name, description of
bug, and how you fixed it!
If anyone gets stuck today they can go look at the bug
reports to see if they find any help!
Go to Code Studio
Unit 2, Chapter 1, Lesson 8
Work through level 2, 3, 4, 5, and 6
https://studio.code.org/s/csd2/stage/8/
puzzle/2
Formatting HTML
We are going to read the the level 7 together.
But before we do, the next two slides have
some NEW WORDS!
After we are done reading level 7 anyone that
has completed 2-6 can move on to level 8!
Comment
A comment is a programmer-readable note in the source code of a
computer program.
Indentation
The placement of text farther to the right, or left, to separate it from
surrounding text which helps to convey the program's structure.
NEW WORDS!
Whitespace
Whitespace refers to any character that shows up as a
blank space on the screen, such as a space, a tab, or a
new line. Whitespace helps separate different parts of
the document to make it easier to read.
NEW WORD!
WRAP UP
What made it harder or easier
to debug the web pages?
WRAP UP
Code needs to be useful for both people and
computers. Code that your computer can run might still
be really hard for someone (or even you!) to read and
make changes to.
From now on it's important that we use these
formatting practices to ensure our code is easy to
read for people, not just good enough for a computer
to use.

More Related Content

What's hot

Shortcut in learning iOS
Shortcut in learning iOSShortcut in learning iOS
Shortcut in learning iOSJoey Rigor
 
Creating a page in HTML
Creating a page in HTMLCreating a page in HTML
Creating a page in HTMLrobertbenard
 
Blackboard Powerpoint
Blackboard PowerpointBlackboard Powerpoint
Blackboard Powerpointnhumar
 
From legacy to mobile app developer
From legacy to mobile app developerFrom legacy to mobile app developer
From legacy to mobile app developerJoey Rigor
 
Initial Skills Analysis - Lewis Hartill
Initial Skills Analysis - Lewis HartillInitial Skills Analysis - Lewis Hartill
Initial Skills Analysis - Lewis HartillLewisHartill
 
Skills analysis
Skills analysisSkills analysis
Skills analysisluk3kerr
 
Hot potatoes
Hot potatoesHot potatoes
Hot potatoesrussellst
 
Rich media
Rich mediaRich media
Rich mediapremysl
 
Initail Skills Analysis
Initail Skills AnalysisInitail Skills Analysis
Initail Skills Analysisalyblue98
 
Initialskillsanalysis
InitialskillsanalysisInitialskillsanalysis
InitialskillsanalysisEleanor Round
 
Initial skills analysis
Initial skills analysisInitial skills analysis
Initial skills analysisBenS18
 
Initial+skills+analysis+ (1)
Initial+skills+analysis+ (1)Initial+skills+analysis+ (1)
Initial+skills+analysis+ (1)GGGLzhang
 
Skills Analysis Sheet
Skills Analysis SheetSkills Analysis Sheet
Skills Analysis SheetEmilyMoorby
 

What's hot (19)

Shortcut in learning iOS
Shortcut in learning iOSShortcut in learning iOS
Shortcut in learning iOS
 
Google Chrome Apps and Extensions
Google Chrome Apps and ExtensionsGoogle Chrome Apps and Extensions
Google Chrome Apps and Extensions
 
Creating a page in HTML
Creating a page in HTMLCreating a page in HTML
Creating a page in HTML
 
Week2 dq2
Week2 dq2Week2 dq2
Week2 dq2
 
Blackboard Powerpoint
Blackboard PowerpointBlackboard Powerpoint
Blackboard Powerpoint
 
Ben pa
Ben paBen pa
Ben pa
 
From legacy to mobile app developer
From legacy to mobile app developerFrom legacy to mobile app developer
From legacy to mobile app developer
 
Initial Skills Analysis - Lewis Hartill
Initial Skills Analysis - Lewis HartillInitial Skills Analysis - Lewis Hartill
Initial Skills Analysis - Lewis Hartill
 
Skills analysis
Skills analysisSkills analysis
Skills analysis
 
How to made a Document if you ne (as PDF)
How to made a Document if you ne (as PDF)How to made a Document if you ne (as PDF)
How to made a Document if you ne (as PDF)
 
Hot potatoes
Hot potatoesHot potatoes
Hot potatoes
 
Rich media
Rich mediaRich media
Rich media
 
Initail Skills Analysis
Initail Skills AnalysisInitail Skills Analysis
Initail Skills Analysis
 
Initialskillsanalysis
InitialskillsanalysisInitialskillsanalysis
Initialskillsanalysis
 
Initial skills analysis
Initial skills analysisInitial skills analysis
Initial skills analysis
 
Initial+skills+analysis+ (1)
Initial+skills+analysis+ (1)Initial+skills+analysis+ (1)
Initial+skills+analysis+ (1)
 
Skills Analysis Sheet
Skills Analysis SheetSkills Analysis Sheet
Skills Analysis Sheet
 
initial skills analysis
initial skills analysisinitial skills analysis
initial skills analysis
 
initial skills analysis
initial skills analysisinitial skills analysis
initial skills analysis
 

Similar to 2.1.8 clean code and debugging

LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxDIPESH30
 
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 SourcingGlenn Gutmacher
 
Html journal chris kweks (microbold)
Html journal   chris kweks (microbold)Html journal   chris kweks (microbold)
Html journal chris kweks (microbold)Chris Kwekowe
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire coursegrades4u
 
Membangun Desktop App
Membangun Desktop AppMembangun Desktop App
Membangun Desktop AppFajar Baskoro
 
Software Design
Software DesignSoftware Design
Software DesignSpy Seat
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmerLeylimYaln
 
(2) cpp imperative programming_exercises
(2) cpp imperative programming_exercises(2) cpp imperative programming_exercises
(2) cpp imperative programming_exercisesNico Ludwig
 
60 terrible tips for a C++ developer
60 terrible tips for a C++ developer60 terrible tips for a C++ developer
60 terrible tips for a C++ developerAndrey Karpov
 
Cis 170 ilab 4 of 7
Cis 170 ilab 4 of 7Cis 170 ilab 4 of 7
Cis 170 ilab 4 of 7comp274
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basicAn I
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Error Correction Techniques
Error Correction TechniquesError Correction Techniques
Error Correction TechniquesKelly Bauer
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development EnvironmentsPhilip Johnson
 
Bcsl 013 solved-assignment-2019-20 without
Bcsl 013   solved-assignment-2019-20 withoutBcsl 013   solved-assignment-2019-20 without
Bcsl 013 solved-assignment-2019-20 withoutAbhinavSingh732
 

Similar to 2.1.8 clean code and debugging (20)

LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
 
ID E's features
ID E's featuresID E's features
ID E's features
 
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
 
Html journal chris kweks (microbold)
Html journal   chris kweks (microbold)Html journal   chris kweks (microbold)
Html journal chris kweks (microbold)
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
 
Dreaweaver cs5
Dreaweaver cs5Dreaweaver cs5
Dreaweaver cs5
 
Membangun Desktop App
Membangun Desktop AppMembangun Desktop App
Membangun Desktop App
 
Software Design
Software DesignSoftware Design
Software Design
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 
(2) cpp imperative programming_exercises
(2) cpp imperative programming_exercises(2) cpp imperative programming_exercises
(2) cpp imperative programming_exercises
 
60 terrible tips for a C++ developer
60 terrible tips for a C++ developer60 terrible tips for a C++ developer
60 terrible tips for a C++ developer
 
Cis 170 ilab 4 of 7
Cis 170 ilab 4 of 7Cis 170 ilab 4 of 7
Cis 170 ilab 4 of 7
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Moreno Xec
Moreno XecMoreno Xec
Moreno Xec
 
Error Correction Techniques
Error Correction TechniquesError Correction Techniques
Error Correction Techniques
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development Environments
 
Bcsl 013 solved-assignment-2019-20 without
Bcsl 013   solved-assignment-2019-20 withoutBcsl 013   solved-assignment-2019-20 without
Bcsl 013 solved-assignment-2019-20 without
 
UNIT I.pptx
UNIT I.pptxUNIT I.pptx
UNIT I.pptx
 

More from Chapelgate Christian Academy (20)

Window portraits
Window portraitsWindow portraits
Window portraits
 
Landscape photography
Landscape photographyLandscape photography
Landscape photography
 
Silent film production
Silent film productionSilent film production
Silent film production
 
Action photography
Action photographyAction photography
Action photography
 
Copyright
CopyrightCopyright
Copyright
 
Hiro
HiroHiro
Hiro
 
Planning a shoot
Planning a shootPlanning a shoot
Planning a shoot
 
Commercial photography
Commercial photographyCommercial photography
Commercial photography
 
Edward weston art history- new
Edward weston art history- newEdward weston art history- new
Edward weston art history- new
 
Min card lesson
Min card lessonMin card lesson
Min card lesson
 
Portraits dp2 photography
Portraits dp2 photographyPortraits dp2 photography
Portraits dp2 photography
 
Still life photography
Still life photographyStill life photography
Still life photography
 
U3 l4 using simple commands
U3 l4 using simple commandsU3 l4 using simple commands
U3 l4 using simple commands
 
U3 l01 need for programming languages
U3 l01 need for programming languagesU3 l01 need for programming languages
U3 l01 need for programming languages
 
Introduction to Premiere 2018
Introduction to Premiere 2018Introduction to Premiere 2018
Introduction to Premiere 2018
 
U4 l03 Checking your Assumptions
U4 l03 Checking your AssumptionsU4 l03 Checking your Assumptions
U4 l03 Checking your Assumptions
 
U4 l01 What is big data?
U4 l01 What is big data?U4 l01 What is big data?
U4 l01 What is big data?
 
Cinematic elements
Cinematic elementsCinematic elements
Cinematic elements
 
Costume and makeup designers
Costume and makeup designersCostume and makeup designers
Costume and makeup designers
 
Color rgb
Color rgbColor rgb
Color rgb
 

Recently uploaded

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

2.1.8 clean code and debugging

  • 1. Teacher Prep ●Put an poster up on the wall where all students can get to it. Title the poster "Class Bugs" ●Sticky notes
  • 2.
  • 3. LESSON OBJECTIVES Students will be able to: ● Describe why using white space, indentation, and comments makes your code easier to maintain. ● Develop a set of techniques for preventing bugs in HTML code and finding them when they occur.
  • 4. Warm Up Today you will be working with your table row!
  • 5. Warm Up With Your Group: • Using your sticky notes, come up with at least three specific problems you have encountered while trying to write web pages in HTML. • What project were you working on? • How did you ultimately track down and fix the problem?
  • 6. Bug Part of a program that does not work correctly. Debugging Finding and fixing problems in your algorithm or program. NEW WORDS!
  • 7. Warm Up Using your sticky notes, now write 3 bugs you’ve encountered Each sticky should have: 1. A brief description of the bug 2. Steps taken to solve it . 3. Name of student who solved it Once groups have written down their at least three bugs, stick them up on the class poster.
  • 8. Warm Up The problems you had when your HTML code did not work correctly are bugs. The process of fixing bugs and strategies used to fix them is called debugging. Today we're going to be working on our debugging skills and learning some strategies to keep our code clean to help avoid them.
  • 9. BUG REPORT! During today’s lesson, if you squash a bug and want to write up your bug report, you can write it on your sticky note. Make sure you include your name, description of bug, and how you fixed it! If anyone gets stuck today they can go look at the bug reports to see if they find any help!
  • 10. Go to Code Studio Unit 2, Chapter 1, Lesson 8 Work through level 2, 3, 4, 5, and 6 https://studio.code.org/s/csd2/stage/8/ puzzle/2
  • 11. Formatting HTML We are going to read the the level 7 together. But before we do, the next two slides have some NEW WORDS! After we are done reading level 7 anyone that has completed 2-6 can move on to level 8!
  • 12. Comment A comment is a programmer-readable note in the source code of a computer program. Indentation The placement of text farther to the right, or left, to separate it from surrounding text which helps to convey the program's structure. NEW WORDS!
  • 13. Whitespace Whitespace refers to any character that shows up as a blank space on the screen, such as a space, a tab, or a new line. Whitespace helps separate different parts of the document to make it easier to read. NEW WORD!
  • 14. WRAP UP What made it harder or easier to debug the web pages?
  • 15. WRAP UP Code needs to be useful for both people and computers. Code that your computer can run might still be really hard for someone (or even you!) to read and make changes to. From now on it's important that we use these formatting practices to ensure our code is easy to read for people, not just good enough for a computer to use.

Editor's Notes

  1. Chapter Commentary Students use computing as a form of self expression as they design and develop basic web pages. Focusing on the tags, keywords, and syntax used to communicate instructions to the computer, students use HTML to structure the content of a web page. They also explore the privacy and intellectual property implications of publishing their work online. Week 1 Lesson 1: Exploring Websites Unplugged This lesson covers the purposes that a website might serve, both for the users and the creators. The class explores a handful of the most-used websites in the United States and discusses how each of those sites is useful for users and how it might also serve its creators. Student Links: Activity Guide Lesson 2: Websites for Expression Unplugged This lesson introduces websites as a means of personal expression. The class first discusses different ways that people express and share their interests and ideas, then looks at a few exemplar websites made by students from a previous course. Finally everyone brainstorms and shares a list of topics and interests to include, creating a resource for developing a personal website in the rest of the unit. Student Links: Activity Guide Lesson 3: Intro to HTML Web Lab This lesson introduces to HTML as a solution to the problem of how to communicate both the content and structure of a website to a computer. The lesson begins with a brief unplugged activity demonstrating the challenges of effectively communicating the structure of a web page. The class looks at an HTML page in Web Lab and discusses how HTML tags help solve this problem, then uses HTML to write the first web pages of the unit. Teacher Links: Week 2 Lesson 4: Headers Web Lab This lesson continues the introduction to HTML tags, this time with headers. The class practices using header tags to create page and section titles and learns how the different header elements are displayed by default. Next, the class plans how to organize their content on the personal web pages that will be built across the unit and begins the first page of the project. Lesson 5: Digital Footprint Unplugged This lesson takes a step back from creating the personal website to talk about personal information people choose to share digitally. The class begins by discussing what types of information are good to share with other people, then looks at several sample social media pages to see what types of personal information could be shared intentionally or unintentionally. Finally, the class comes up with a set of guidelines to follow when putting information online. Student Links: Activity Guide | Activity Guide Week 3 Lesson 6: Lists Web Lab This lesson introduces ordered and unordered lists and the associated <ul>, <ol>, and <li> HTML tags. The class practices using the tags, then goes back to the personal web page project to add a new HTML page that includes the new tags. Lesson 7: Intellectual Property and Images Unplugged | Web Lab This lesson covers how to use media such as images, video, or music created by others a website while respecting the rights of the creator of that media. After first studying Creative Commons licensing, the class learns how to add images to web pages, and how to give proper attribution when doing so. Teacher Links: Website Student Links: Video | Video | Activity Guide Lesson 8: Clean Code and Debugging Web Lab In this lesson covers common issues that arise when designing web pages in HTML. The class will correct errors in a sequence of increasingly complex web pages found on Code Studio and learn the importance of comments, whitespace, and indentation as tools for making web pages easier to read. Week 4 Lesson 9: Project - Multi-Page Websites Web Lab | Project This lesson covers hyperlinks, which allow web developers to connect pages together into one website. The class will link together all the previous pages into one project, and create navigation bars for each page before publishing the entire site to the Web. Student Links: Project Guide | Peer Review | Rubric
  2. Preparation Prepare poster paper, sticky notes, and markers Vocabulary Bug - Part of a program that does not work correctly. Comment - A comment is a programmer-readable note in the source code of a computer program. Debugging - Finding and fixing problems in your algorithm or program. Indentation - The placement of text farther to the right, or left, to separate it from surrounding text which helps to convey the program's structure. Whitespace - Whitespace refers to any character that shows up as a blank space on the screen, such as a space, a tab, or a new line. Whitespace helps separate different parts of the document to make it easier to read. Introduced Code <!-- --> Web Lab Overview In this lesson students will deal with common issues that arise when designing web pages in HTML. Students will correct errors in a sequence of increasingly complex web pages found on Code Studio. In the process they will learn the importance of comments, whitespace, and indentation as tools for making web pages easier to read. At the end of the lesson students create a list of strategies for debugging web pages and ensuring they are easy to read and maintain. Purpose Bugs in HTML are more forgiving than programming languages such as JavaScript (the language used in Unit 3). However debugging is an explicit problem solving process that students will use repeatedly when working with any language on the computer. When problem solving there are different strategies that a computer scientist can use to find the source of the issue. In addition to the strategies to fix bugs once they have occurred there are certain styles of writing HTML code that help prevent bugs or make it easier to find bugs. The three main style conventions used are comment, whitespace, and indentation. To motivate students to consider using these conventions in the future, the debugging levels demonstrate that it is easier to debug a program that is written with these style conventions. Agenda Warm Up (10 minutes) Previous Experience with Bugs Activity (35 minutes) Web Lab: Smash Those Bugs! Wrap Up (10 minutes) Coding Style Conventions