reading-notes

Class 10 - Debugging and Error Handling

Lab 10 - a: Build a Single Webpage in 4 hours, b: Salmon Cookies Pt. 5

Setup

10a

In lab today you will be building a single webpage based off of the provided design comp assets. This assignment is a lot of HTML and CSS, and not as much JS as we’ve been doing this week. In fact, you may choose to do this project with no JS at all, or just add some as a finishing touch. You only have 4 hours to complete this assignment. It is your job to create a page that looks exactly like the preview below. Within your GitHub class repo, under today’s directory, you will find all of the assets required to accomplish this task in addition to a larger version of this preview image.

Lab 10 Website We Need to Duplicate

  1. Create a new repository for today called chocolate-pizza. If partnered for this lab, follow the pair programming work flow by having one user fork the other so that you can get some practice in your Git processes. Be sure to do frequent commits, and always do your work on branches. Before starting coding, think about a strategy for approaching this project. Before writing code, think about a practical order in which to do the work:

    • When should you focus on styling?

    • When should you make a decision about a layout scheme?

    • When should you just build out the structure of the HTML?

    • When you should you add JS? Do you even add JS?

  2. Suggestion: Set up your work directory like this:

    • index.html

    • style.css

    • app.js or script.js (if you choose to use JS)

    • img/ (a directory that contains all of your image assets)

10b

Finish up your Salmon Cookies project. Ensure that you meet all minimum functionality described in prior labs as well as successfully implemented all of the requirements for the index.html file listed in Lab 06. Here they are, listed below:

  1. A custom Google font for highlights

  2. A specified standard sans-serif web font for data (such as Arial, Verdana, or Helvetica)

  3. A specified standard serif web font for text (such as Georgia, Times, etc.)

  4. Specified different font colors for all three font usages

  5. A background color for the default page background (make sure font colors have good contrast and are readable on this background)

  6. A different background color for elements such boxes and tables (so make sure the font colors contrast against this well, too!)

  7. Anything else you’d like to add related to style. But remember: simplicity, clarity, and consistency are good things in design.

  8. Be thoughtful about layout and overall organization of the page.

  9. Run a Lighthouse Accessibility report looking for a score between 65-80. Make adjustments to site as needed to get to that score. Add a screenshot of your score to your README.md.

  10. Include all of the typical stuff that you’ll find on the home page of a business: locations, hours, phone number, email address, some text about how awesome the business is, etc. Be creative, and again, think about what is meaningful to a typical end user.

Written Class Notes

Function declaration can be saved until later. JS looks for classes and constructor, const first so things like below are ok to ok to call function before you declare it so you can write showmessage(){} below or after the function function showmessage(){ console.log(i am a message) }

JS order

Execution Context

const name = john function globalFunction (){ console.log (“I can be run from anywhere”); }

function scopedFunction (){ // this scoped to the function it lives in like a let for this function so can’t call privateFunction elsewhere function privateFunction(){ const words=woof; return dog says + words } } console.log(words) scopedfunction(words); console.log(privateFunction())

Debugger inspect select line of code and run as breakpoint, code stops running, you can mouse over lines to see what is given, go to call stack tells you what is going on

step over - keep running through loop

Describe and Define

Notes

  1. What are a few ways we can debug our code?

  2. What are some of the error types you may encounter in the console?

Major Browsers’ Debugging Tools

Keyboard: macOS: command + option + i Chrome: menu, more tools, developer tools, console Safari: preferences, main menu, enable show develop menu in menu bar, in develop menu click show web inspector

Read 10 - Debugging

Bookmark and Review: Debugging HTML and Debugging CSS

Resources Link/Pages

What Went Wrong? Troubleshooting JavaScript

  1. What Went Wrong? Troubleshooting JavaScript

The JavaScript Debugger

  1. The JavaScript Debugger

Answer

Statement on why this topic matter as it relates to what I’m studying in this module:

What Went Wrong? Troubleshooting JavaScript

  1. Name some key differences between a Syntax Error and a Logic Error.
  1. List a few types of errors that you have encountered in past lab assignments and explain how you were able to correct them.
  1. How will this topic continue to influence your long term goals?

The JavaScript Debugger

  1. How would you describe the JavaScript Debugger tool and how it works to someone just starting out in software development?
  1. Define what a breakpoint is.
  1. What is the call stack?

Things I want to know more about

Career 10 - Partner Power Hour: Report 2

If there is no live presentation on campus in this module, select the appropriate presentation from the list below. All presenters are open to connections and invite you to reach out to them, so that you can to learn more about them, their company, and the industry.

Web Accessibility 101 - Dezireé Teague

CSS 101: Transitions & Animations - Brian Nations

Dealing with Workplace Ambiguity - Amanda Iverson

CSS 101: Transitions & Animations - Brian Nations

  1. Share one or two ways the speaker’s information will change your approach to your career transition.
  1. List a few key take-aways from this presentation.

Power Hour Brook Riggio

How to do what AI just can’t: Proving your value when code is commoditized AI will not replace you but a person using AI will AI can’t adapt State your value: communicate it clearly: to frends/linkedin, with your team, in performance reviews

  1. Share a screenshot of your LinkedIn connection request, including a nicely worded note, sent to the speaker or someone else at their company. Screenshot of LinkedIn message

Learning Journal

Write a brief reflection on your learning today, or use the prompt below to get started.

Read this short article on Imposter Syndrome. On a scale from 1 (least) to 10 (most), to what extent do you experience these feelings? Have you always felt the way you do now? If you have successfully lowered the number you’d use to rate your Imposter Syndrome, how have you done so?