Skip to content

Lesson 1 (Data & Variables)

Courtney Frey edited this page Apr 13, 2022 · 3 revisions

Lesson 1: Data and Variables

In the prep work for this lesson, the students learned:

  1. How to declare, initialize, and reassign variables
  2. The number and string data types and how to convert between them
  3. The mathematical operators (+, -, *, /, **, %, ++, --) and order of operations
  4. The typeof keyword and how to collect user input with readline-sync

Full-Time Students

  • Welcome to Day 1
  • Prep work for this lesson was assigned prior to the first day of class.

Announcements

  • Welcome! First day pep talk
  • Lesson 2 prep work should be active by the end of class.

Large Group Time (Instructor)

First Class Reminders

  • Use Canvas to access course content.

  • Have a repl.it account:

    • Review workspace panels and important menu items (this can be done in the live coding examples).
    • Use the link posted in Canvas to enroll in the GitHub Classroom.
  • Set expectations for students:

    • Part-Time Students

      • Do ALL of the prep work before class.
      • Ask questions often.
      • Make use of the help and resources available.
    • Full-Time Students

      • The class design allows for in-class work time.
        • Prep Work time is for reading, concept checks, and working on exercises
        • Work days are for Assignments or catching up on work
      • Ask questions often.
      • Make use of the help and resources available.
  • Introduce the TFs and assign groups (may be done during the studio intro).

  • Other relevant contact information.

Lesson 1 Topics That Require Careful Attention

  1. let vs. const. When should each be used?
  2. Discourage the use of var. If students want to know more technical details as to why we won't be using var, that topic is covered in the chapter on scope.
  3. +=, -=, etc. can be used as a shortcut (e.g. num = num + 3 vs. num += 3).
  4. Modulus
    1. This is likely a new idea for many of the students. Provide a clear, deliberate explanation (with examples) of what it does.
    2. Why would we need to use %? Don't get too detailed yet, but note some simple scenarios where it might be necessary. The students do not know if/else yet, so keep your explanation non-code specific.
  5. Walk through the syntax and how to use readline-sync to collect user input from the console.
    1. Tell them more about what the console is and remind them about where to find it in repl.it.
    2. Live coding examples.
  6. Overview of how studio sessions run and how to best take advantage of the time.
    1. Tasks will be completed in repl.it classroom.
    2. Studios provide focused practice in a supervised, safe space. Students are free to explore, make mistakes, and ask for tips.
    3. Studios are NOT graded, but active participation is essential for success in the class.
    4. Remind students to have their TFs check their code in order to get feedback.
    5. Provide a quick introduction to the Data & Variables studio.
    6. Note that the large group will meet again before the end of class to review the studio task.
  7. Part-Time Students: Graded Assignment #1 is open! With each of the six graded assignments in Unit 1, the key is to read through everything carefully and start on what you can do as soon as possible. In class, read through the instructions with your students and highlight what they are capable of doing after this class.
    1. Graded Assignment 1 has been broken into 3 parts.
  8. Full-Time Students: Graded Assignment 1 will be introduced and open on Day 5.

Studio (TF Notes)

Best Practices for ALL Studios

  1. Check in with EVERY student during EVERY studio.
    1. This builds relationships and trust, and it helps you spot potential issues before they get too large.
    2. Checking in does NOT mean a quick question like, "How are you doing? Need any help?" Instead, sit next to the student and ask specific questions about their code, their interpretation of the instructions, or their coding dreams.
    3. Provide detailed feedback as often as possible. "Good job!" does not cut it. An example would be "Hey! I like your variable names! They are very descriptive!".
  2. Be prepared to clarify the studio instructions beyond just re-reading the words on the screen.
  3. Encourage students to work together and share ideas.
  4. Assist individuals as questions arise. Address frequent mistakes and/or questions to your whole group.
  5. Make a note of any issues that occur during the studio and provide that feedback to the instructor and LaunchCode team.

Lesson 1 Studio

  1. Help students successfully navigate to repl.it Classroom and find the Data and Variables studio.
  2. Encourage best practices for variable names.
  3. Studios are NOT graded, but for this first task, you should do a visual check of each student's output.
    1. The best time to do this is during the studio!
    2. If a student does not finish by the end of class, they should complete the studio at home and click "Submit". You will be able to check their code from within repl.it.
  4. Common mistake:
    1. Some students will miss the idea of using variables to create the output. Instead, they will hard code the data values into the console.log statements.
    2. Encourage the students to use variables, and explain that doing so allows the output to reflect any changes in the data.
    3. When the students run their code for you, ask them to change astronautCount to a different number (like 3), and then verify that the output reflects the new value.
  5. Recognize any clever ideas that the students use to print the tedious parts of the output.
  6. Even though you do a visual check of the code, students should still click "Submit" when they finish the studio. That way, they preserve a record of their participation.