Search CTRL + K

🏡 Back to Home

All Prior Classes

Table of Contents

Thread 2

Thread 1

Thread 2, Day 16 - Thursday, February 9, 2023

Agenda

  1. End-of-module Task: Make an Interactive App
    • This is a working period to, ideally, complete the end-of-module task.

To-do items

Before this Saturday February 11 at 11 PM...

Thread 2, Day 15 - Wednesday, February 8, 2023

Agenda

  1. End-of-module Task: Make an Interactive App
    • Go to Spaces, right now, and:
      • ... post photos of your paper-based plans. 📝
      • ... read and (ideally acknowledge) replies.
        • Please take responses asking for more details for what they are: some encouragement and an opportunity to better demonstrate your understanding.
        • By the end of the year, 25% of your grade comes from the Communication evaluation category, which includes using subject-specific vocabulary to share your understanding of the code you are writing.
    • For the remaining time in this period, continue working on the end-of-module task.

To-do items

Before our next class...

Thread 2, Day 14 - Tuesday, February 7, 2023

Agenda

  1. End-of-module Task: Make an Interactive App
    • We will start class by discussing ideas that would work for this task.
    • For the remaining time in this period, continue working on the end-of-module task.

To-do items

Before our next class...

Thread 2, Day 13 - Friday, February 3, 2023

Agenda

  1. Finding Square Roots
  2. Share the Bill: Opportunities for Further Abstraction
  3. Share the Bill: Add a Second Tab to Show History
    • Data to be saved within an app should be created in one location only
      • Put another way, a given piece of data must have just one single source of truth
      • Currently this occurs with the @State property wrapper
      • How, though, can we share data between screens?
      • That is where the @Binding property wrapper is useful
        • In brief:
          flowchart TD
          
          id1["App Entry Point\n@State"] --> id2["Screen 1\n@Binding"]
          id1 --> id3["Screen 2\n@Binding"]
        • Let's examine this together now...
        Note

        Here is the video from this discussion in class – how to share data between screens using @Binding

  4. End-of-module Task: Make an Interactive App

To-do items

Before our next class...

Thread 2, Day 12 - Thursday, February 2, 2023

Agenda

  1. Optionals and Data Input

    • Learn how to use optionals to safely handle user input.
    • 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
  2. Exercise: Convert an Existing Program to Text-based Input

    • Take at least one of your existing programs that calculate area, perimeter, surface area, or volume, and make changes so that rather than sliders, the user can provide input using text fields.

To-do items

Before our next class...

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...

Thread 2, Day 10 - Friday, January 27, 2023

Agenda

  1. Animations
    • Learn how to add animations to your apps.

To-do items

Before our next class...

Thread 2, Day 9 - Wednesday, January 25, 2023

Agenda

  1. Recap: The structure of a structure and an app...
  2. Dynamic Lists
    • Time to continue working on this tutorial.
    • Then, be sure you can apply the same concept to your existing Area/Perimeter or Surface Area/Volume calculators
  3. Lists App
    • For those who are ready, a small-group discussion on how to build out another app that uses lists

To-do items

Before our next class...

Thread 2, Day 8 - Tuesday, January 24, 2023

Agenda

  1. Dynamic Lists
    • Build an app that makes use a list that changes while the app runs.
  2. Exercise
    • Use what you have learned today to extend your app that calculates the area and perimeter of a 2D shape (or the surface area and volume of a 3D figure) so that it allows the user to save a history of results.

To-do items

Before our next class...

Thread 2, Day 7 - Saturday, January 21, 2023

Agenda

  1. Lists
    • How to store and use multiple pieces of data in an app by referring to just a single name.

To-do items

Before our class tomorrow morning...

Thread 2, Day 6 - Friday, January 20, 2023

Agenda

  1. Xcodes (yes, plural)
    • An app for managing installation of Xcode (singular)
    • Later today, please use Xcodes to upgrade to Xcode 14.2.
  2. Formatting Numeric Values: Gosh Darn Format Style
  3. Task: Geometric Figures, Extended
    • Revisit the Geometric Figures task
    • For your assigned shape, add to Area and Perimeter app that you started in our prior class, so that it:
      • allows for navigation between the existing screen for a rectangle and the new screen that you will write for your previously assigned shape
      • accepts slider-based input for the dimensions of your shape or figure
      • shows output for the perimeter and area or surface area and volume
      • additionally, work on polishing the user interface so that it is more functional and appealing

To-do items

Before our class tomorrow morning...

Thread 2, Day 5 - Thursday, January 19, 2023

Agenda

  1. Lesson: Interactive Applications Using Sliders
  2. Exercise: Temperature Converter
    • Write an application (from scratch, in a new project) that converts a temperature in Celsius to its equivalent in Fahrenheit.
      • Optionally:
        • Also write a page that calculates the reverse: from Fahrenheit to Celsius.
        • Add navigation to the app so that the user can move between these screens.

To-do items

Before our next class...

Thread 2, Day 4 - Tuesday, January 17, 2023

Agenda

  1. Lists and Abstraction: Finishing the Trading Cards Task

To-do items

Before our next class...

Thread 2, Day 3 - Friday, January 13, 2023

Agenda

  1. Task: Trading Cards
    • Today's class is the second and final working period to complete this task.
    • Task is due this Sunday at 11 PM.

To-do items

Before our next class...

Thread 2, Day 2 - Thursday, January 12, 2023

Agenda

  1. Task: Trading Cards
    • Today's class is the first of two working periods to complete this task.
    • Task is due this Sunday at 11 PM.

To-do items

Before our next class...

Thread 2, Day 1 - Tuesday, January 10, 2023

Agenda

  1. Thread 1 Recap & Exercises
    • Describing data and user interfaces using structures... all the big ideas summarized along with several exercises to get your 🧠 moving again! 🚀

To-do items

Before our next class...

Thread 1, Day 15 - Friday, November 18, 2022

Agenda

  1. Thread 1 Portfolio Review
    • Prepare for your face-to-face meeting with Mr. Gordon.
  2. Task: Reproduce an Interface
    • For the remaining time in this period, continue working on the end-of-module task.

To-do items

This evening, completely optional...

Note

∙ No additions to your portfolio made after 10 PM this evening will be considered.
∙ Please enjoy the rest of your Quiet Weekend on Saturday and Sunday.
∙ Good luck with your courses in module 3!

Thread 1, Day 14 - Wednesday, November 16, 2022

Agenda

  1. Rubber Duck Debugging
    • Programming can be hard, both for beginners and experienced software developers.
    • If you are running into syntax errors or logical errors and perhaps getting frustrated: that is normal!
    • Pairing with a friend to describe what you are trying to do with your code, line by line, can be helpful.
      • Often during this process, you will realize the source of the problem you are having.
    • When a friend is not nearby, use your duck! 🦆
  2. Task: Reproduce an Interface
    • Show your understanding of recent lessons by reproducing a user interface of your choice.

To-do items

Before our next class...

Tip

Firm due date for this task is the end of our class this Friday.
All classes between now and then are working periods.

Thread 1, Day 13 - Tuesday, November 15, 2022

Agenda

  1. SF Symbols App
    • Not all software developers have graphic design skills.
    • Platform owners like Apple want their users to have a consistent experience when using apps written by different people.
    • One of the ways Apple helps their developers provide that consistent look and feel is by offering a wide variety of built-in images that can be used in apps.
    • Please download and install the SF Symbols app now.
  2. Views and Controls App
  3. SwiftUI: Reproducing the Stopwatch App
    • In this tutorial, learn how to apply some concepts we've already learned, as well as a few new ones, to build the user interface for a professional app.

To-do items

Before our next class...

Thread 1, Day 12 - Tuesday, November 8, 2022

Agenda

  1. SwiftUI: Composition of Views Using Custom Structures
    • Remember D.R.Y. ?
      • Don't repeat yourself.
    • We can write our own structures that conform to the View protocol.
      • These custom structures build upon the structures like VStack, HStack, ScrollView, et cetera that are provided by Apple through the SwiftUI framework.
      • By using custom structures, we avoid having to make repetitive changes to our code.
      • As well, the overall number of lines of code that it takes to write an app is much lower.
  2. Exercise: Improving the List View in FavouriteThings
    • Currently, the list view looks like this:
      Screen Shot 2022-11-06 at 11.05.42 AM.png|200
    • NavigationLink labels can show any view, not just a Text view.
    • Using your new knowledge from yesterday's class about how to combine VStack and HStack structures, and from today's class about how to create a new custom structure, modify your project so that the list view looks like this instead:
      Screen Shot 2022-11-06 at 11.03.53 AM.png|200
    Hint

    To re-use existing images in your app and show a smaller square thumbnail, the view modifiers shown here will do the trick:
    Screen Shot 2022-11-06 at 11.11.14 AM.png|400

To-do items

Before our next class...

Thread 1, Day 11 - Monday, November 7, 2022

Agenda

  1. Learning Skills Self-Assessment
    • Last week you completed in-person interviews with Mr. Gordon to discuss your achievement to date.
    • You set goals for improvement over the next two weeks to complete this module.
    • Learning skills drive achievement.
      • That is, if you have strong learning skills, the rest often takes care of itself.
    • Please self-evaluate your learning skills for this course to date.
      • When completed, take a photo of your self-assessment and please post it on Spaces in the private portfolio space.
  2. Source Control: Quick reference
    • From last week's class, please glue this inside the front cover of your black hardcover notebook.
  3. Reference Book: SwiftUI Views Quick Start
    • Many programmers refer to reference books as they learn
    • Mark Moeykens is a talented author of technical reference books, who runs Big Mountain Studio
    • He wrote an outstanding book named SwiftUI Views Quick Start, and generously provides it free of charge
      • To simplify matters, you can directly access a copy of SwiftUI Views Quick Start here
        • To access the file, you need to be logged in to your LCS Google account
        • You may wish to download that PDF file directly to your computer for use in the future
          • To download the PDF file, look for this icon in the top-right corner of your browser window:
            Screen Shot 2022-11-05 at 6.25.51 AM.png|600
      • Other books Mark authored are also excellent, but are not provided free of charge
        • These books cover more advanced topics that you may choose to use later this year or in the grade 12 computer science course
  4. SwiftUI: Basic Concepts and Terms
    • From the SwiftUI Views Quick Start book, please read through the Basic Concepts section from pages 12 to 20 in the PDF file
      • This will only take you a few minutes
  5. SwiftUI: Understanding Mark's HeaderView
    • When you see code it's important that how it works is not a mystery to you
      • Mark includes the same standard layout at the start of all his code examples and screenshots
      • This layout is created from a SwiftUI view named HeaderView
      • To understand how HeaderView works, please review the My Template section from pages 31 to 39 of the Swift UI Views Quick Start
      • This is a good initial example of how to do basic formatting in SwiftUI
      • It is often easier to learn by trying things out as you go.
  6. Exercise: Experiment with SwiftUI Layouts

To-do items

Before our next class...

Thread 1, Day 10 - Friday, November 4, 2022

Agenda

  1. Initial Portfolio Reviews
    • Mr. Gordon will meet privately with each student in the hall to review portfolios.
    • While that occurs, please complete the other three agenda items for this class.
      • You are encouraged to work in pairs as desired – but be sure that each person understands the concepts at hand.
      • Take notes in your black hardcover book, as needed.
  2. Source Control
    • Pushing content to the "cloud"
  3. Task: Geometric Figures
    • Write a structure that models a 2D shape or 3D figure
  4. Find an app that you like and tell the class about it
    • Do you have an app that you use daily?
    • If not, what is something that you need to do often? Can you find an app for that?
    • In a post to the shared class space on Spaces, please:
      Screen Shot 2022-11-04 at 5.55.57 AM.png|200
      • Post multiple screenshots of that app
      • Explain why you use it so often, or, why you feel it is a well designed app
      Note

      For this task, please avoid the "big" apps like Snapchat, Instagram, et cetera .

To-do items

Before our next class, be sure you have...

Thread 1, Day 9 - Tuesday, November 1, 2022

Agenda

  1. Full class recap

    • Starting a new project
    • Computed properties vs. stored properties
    • Requirements of the View protocol
    • How to describe more interesting layouts for a user interface
    Tip

    If you missed the recap in class, here is a video from when I reviewed these topics with my other section of Grade 11 Intro to Computer Science.

    Note

    Here is the Xcode Keyboard Shortcuts poster I mentioned in class.

  2. Project Organization

    • Using groups in Xcode
  3. Scrolling

    • What to do when content does not fit
  4. Lists

    • How to show a list of items
  5. Navigation

    • Moving between pages
  6. App Entry Point

    • Changing what view shows
  7. Exercise

    • Add three more favourite things to your app
    Tip

    Recall from class 7 – here is how to add a new SwiftUI view to your project

To-do items

Before our next class...

Note

• Your first portfolio review will occur in our next class on Friday, November 4.
• Here is how to prepare for your portfolio review.

Thread 1, Day 8 - Monday, October 31, 2022

Agenda

  1. Source Control – Introduction
    • Saving revisions of your code helps you to:
      • show your progress over time
      • back up valuable work
      • revert to earlier versions of your code, if desired
  2. Source Control - Branching
    • How to go back to an earlier version of a project
  3. Using a Development Team in Xcode
    • Connecting Your New Apple ID
  4. Adding a Physical Device as a Run Destination
    • To run applications you write in Xcode on your iPhone or iPad, a few one-time-only setup steps are required.
  5. Defining a User Interface Using Structures
    • In this tutorial, you will learn how nested structures can be used to express a user interface in SwiftUI.

To-do items

Before our next class...

    Like what you see here:

    Screen Shot 2022-10-31 at 8.08.52 AM.png|500

Thread 1, Day 7 - Friday, October 28, 2022

Agenda

  1. Portfolio: Providing evidence for learning goals
  2. Discussion: Grouping Related Info with Structures
    • Key takeaways:
      • Use CapitalCase when naming structures.
      • Use camelCase when naming properties and instances of structures.
      • DRY
        • Don't repeat yourself.
        • If you are designing structures to describe data, and find that you have repetitive sections of code, there is usually going to be a better way to organize things.
  3. Structures: Going beyond stored properties
  4. SwiftUI: A brief introduction
  5. Exercise: Add pages for two more favourite things

To-do items

Before our next class...

Thread 1, Day 6 - Wednesday, October 26, 2022

Agenda

  1. Name Plate
    • Make a final set of enhancements to your Name Plate sketch – or – keep your existing sketch and start a new one, in another Playground file, with a different visual look and feel.
    • To build and show your increasing mastery of concepts we've recently looked at, aim to use some or all of these techniques:
    • Remember that you can use colour combination websites and the eyedropper tool to obtain nice colours for your sketches.
      • When choosing a color, the alpha or opacity value refers to how transparent the colour will be.
      Tip

      Try overlapping two filled figures that use a slightly transparent colour. What happens?

    • Here are some ideas that might be fun to use as inspiration, if you are searching for an idea!
      • To implement these patterns, think of how you might use fills and overlapping shapes.
        pow.jpg|300
        Screen Shot 2022-10-26 at 6.48.18 AM copy.png|300
        Screen Shot 2022-10-26 at 6.48.35 AM copy.png|300
        Screen Shot 2022-10-26 at 6.48.50 AM copy.png|300
        diagonal-lines copy.jpg|300
        Screen Shot 2022-10-26 at 6.55.40 AM copy.png|300
        Screen Shot 2022-10-26 at 6.48.07 AM copy.png|300
    Important

    When you are finished working for the day, be sure to share your progress in the Portfolio space on Spaces.

To-do items

Before our next class...

Thread 1, Day 5 - Tuesday, October 25, 2022

Agenda

  1. Data Types and Structures

To-do items

Before our next class...

Thread 1, Day 4 - Monday, October 24, 2022

Agenda

  1. Apple Developer Account
    • This account will allow you to use TestFlight with the apps you create in class this year.
      • It will also allow you to directly download developer resources, which has some advantages compared to using the Mac App Store.
    • First, please create an Apple ID using your LCS email address.
    Tip

    When creating your Apple ID, use the school's street address, but your own phone number. The complete address for LCS is:
    4391 County Road 29
    Lakefield College School
    Lakefield ON K0L2H0
    Canada

    • Then, accept the invitation to join the LCS Apple Developer team that you will find in your LCS email inbox.
  2. Update Operating System
    • To use the required version of Xcode, your computer must be upgraded to at least macOS Monterey version 12.5.
    • Choose Apple menu  > About This Mac to check what version you currently have.
    • Here is how to upgrade, as needed.
    • If you have to do a significant upgrade (e.g.: from macOS 11.x to macOS 12.5+) please wait until this evening, after you have completed your Study tasks, to complete it.
      • Alternatively, if a major upgrade is necessary, you could ask the I.S. support team to upgrade your computer over lunch.
  3. Download Xcode
    • You can download the current version, 14.0.1, here.
    • This will require logging in with your Apple Developer ID that we just set up.
    • When the download finishes, you will have a .xip file in your Downloads folder.
      • Double-click the .xip file to decompress it.
      Tip

      It's a very large file – decompressing the .xip will take some time.

    • Once the .xip file is decompressed, you will see an Xcode application icon.
      - Drag Xcode to your Applications folder.
      - You can then move the .xip file to your computer's Trash bin.
  4. Course Outline
    • We deferred looking at this last week due to my absences from class for coaching.
    • Let's review now using a think-pair-share protocol.
  5. Making Plans
    • A look at how a little bit of thought can make completing a radial fill pattern like this pretty straightforward:
      Screen Shot 2022-10-24 at 8.32.51 AM.png|400
    • To begin, we will work in pairs, with groups assigned in a visibly random way.
    • We can find some nice color combinations here.
  6. Make further enhancements to your Name Plate sketch.
    • Use some of the concepts we have just explored - be bold!
    • Here is what I came up with after some experimentation:
      Screen Shot 2022-10-23 at 2.50.47 PM.png|400

To-do items

Before our next class...

Thread 1, Day 3 - Friday, October 21, 2022

Agenda

  1. Join our class on Spaces.
    • This space is for shared posts you want everyone to see:
      Screen Shot 2022-10-21 at 7.47.22 AM.png|300
    • This space is for private portfolio posts that will only be seen by Mr. Gordon:
      Screen Shot 2022-10-21 at 7.47.38 AM.png|300
  2. On Spaces, in the private Portfolio space, share your progress to date on the Name Plate task.
    • Please attach a screenshot of the visual output and screenshot(s) of the code.
      • You can use Command-Shift-3 to capture a screenshot; the file will be saved to your Desktop folder.
    • Then, respond to the two standard reflection prompts:
      i. What did I learn or make progress upon today?
      ii. What do I have questions about / what am I struggling with
  3. Introduction to Functions
    • A function is a way to encapsulate (bundle up) a series of steps that we may want to use again.
      • It can be useful to "return home" between drawing different parts of a sketch with the turtle.
  4. Introduction to Iteration
    • A loop is a way to repeat a set of instructions many times.
    • The computer will iterate over a set of instructions.
    • With each iteration of the loop, instructions will be run again.
  5. Random Numbers
    • Random numbers can be used to change the appearance or location of part of a sketch.
  6. Make enhancements to your Name Plate sketch.
    • Use some of the concepts we have just explored - be bold!

    • Here is what I came up with after some experimentation:
      Screen Shot 2022-10-23 at 2.50.47 PM.png|400

    • You can find some nice color combinations here.

To-do items

Before our next class...

Thread 1, Day 2 - Wednesday, October 19, 2022

Agenda

  1. Programming with Purpose
    • Yesterday, we looked about how Jordi Bruin solved a small problem – visually translating a menu – with the Cibo app.
    • Sometimes, we can help others with major efforts, like writing an app, but...
      • ... how do we get to that place?
      • ... is that the only way to help others?
    • Please have your black hardcover notebook out while you watch Programming with Purpose with the class.
      • As you watch, write down any quotes that speak to you.
      • When you are finished watching, summarize a bit – what is one takeaway that you have from this video?
  2. Continue working on the Name Plate task.
    • Here is a short code excerpt that illustrates a few techniques you may find useful.
    • Remember, you can step through your code to see what line of code produces what visual result.
    • Sometimes we encounter a logical error, which is when the computer does not do what we intended.
      • We can "debug" the problem by checking the position of the turtle using the drawSelf() command.
    • You can get nicer colours by using the colour well.
    • Aim to complete the Name Plate task today. 💪🏼
      • If you are already finished drawing your name, could you enhance it?
        • Change to bubble letters?
        • Add colour?
        • Add a drawing of one of your favourite things or something that speaks to your personality?
Note

In our next class together, I will show you how to share your work on the Name Plate task in your online portfolio.

To-do items

Before our next class...

Thread 1, Day 1 - Tuesday, October 18, 2022

Agenda

  1. Computer Studies at LCS
    • Ultimately, Computer Studies is about talking to people to understand problems that you can help them solve using technology.
    • We will review the course outline together later this week (though if you wish, you can review it today).
  2. Hardcover graph paper notebooks
    • Gentle reminder: please bring your graph paper notebook to every future class for this course.
  3. Install the Playgrounds app.
  4. Download the Sketches Template.
  5. Start the Name Plate task.

To-do items

    • You will have some time in class tomorrow to work on this task.