Search CTRL + K

Thread 2, Day 11 - Tuesday, January 31, 2023

Agenda

  1. Mid-module Portfolio Reviews

    • An informal check-in on your progress with:
      • Building user interfaces
      • Applying abstraction to eliminate repetitive code
      • Understanding how to use lists / arrays
      • Writing apps that accept input, process it, and produce output
  2. Refactoring Code for Better Readability

    • How to use search and replace
      • locally within a file
      • globally within a project
    • Edit all in scope
    • Please watch the video included above and try out some of the features shown within in one of your own projects
    Note

    This topic is shared today by video to allow Mr. Gordon more time to meet with students today for portfolio reviews. The video was recorded in class with the other section of Grade 11 Intro to Computer Science last Saturday.

  3. Optionals

    • You already understand how to use typical data types such as Int, Double, String, and Bool
    • You have built applications that accept user input as a Double via the Slider structure in SwiftUI
      • Sliders prevent the user from providing invalid input
        • This is very helpful
        • However, it can be hard to select a precise value
      • Sometimes, it would be preferable to accept typed input from the user
        • But what happens when invalid input is received from a user?
        • For example, we might expect numeric input, but the user could type fifty rather than 50
      • This is when the notion of an optional data type becomes useful
    • Please fork and clone this project
      • Using your black notebook, try each page of the playground
      • Take your time – read for understanding – write down your responses to the questions posed in your black book
      • When you are done – summarize in writing what you have learned in your Spaces post for today – as well as any questions you have
        • Be sure to include several screenshots showing your progress as you completed the playground

To-do items

Before our next class...