Session 4 Data Types, Variables + Modeling Real World Things


By the end of this session, you will be able to:

  • identify and describe basic data types
  • learn how to assign and re-assign variables in Javascript or Ruby
  • begin to model data using variables


  • Housekeeping, Feedback + Goals
  • Pseudocoding Practice
  • Data Types + Variable Assignment + Modeling Using Variables
  • Wrap Up


  • Notebook
  • Writing instrument
  • Laptop
  • Headphones & mic
  • Zoom permission to share screen for breakout sessions

Housekeeping, Wins/Follow-Ups, and Goals


  • We’re in the process of leaving feedback on everyone’s homework, be sure to check your gists!
    • Suggestions and feedback are there for your benefit
  • Make sure that you’re checking Slack at least once a day
  • Be sure to stay at your home (root) directory or below

Intros and Review

Person with the most siblings starts.

  1. Introduce yourself: name, pronouns, program
  2. What is the difference between a fork and a clone?
  3. What commands would you run to track changes in Git and then push to a remote repository on GitHub?

Extra time? Share any helpful resources you’ve come across!

Psuedocode Practice: Tricky Word Problems

Here is a common code challenge: Write a function that determines whether a given word/string is a palindrome.

See example below (remember, it is OK if you don’t understand exactly what is happening in the code!)

"tacocat" >>> returns true
"kitten" >>> returns false
"kayak" >>> returns true
"button" >>> returns false
"a" >>> returns true

Write pseudocode to explain how you would approach checking whether a given word is a palindrome or not - remember, the smaller you can break up the “steps” the better!

On your own

  • How can you break this problem down into smaller chunks or sub-problems?
  • What steps are needed to get from the initial data (input) to the desired end result (output)?
  • Are there any “edge” cases you need to check?

In groups

  • In groups, take turns sharing your psuedocode
  • As a group, come up with a Team Solution that can borrow parts from all the different group members!

Share Out + Review

Basic Data Types + Variable Assignment

In most programming languages, you’ll find the same basic data types. A data type represents the kind of data that you can use in the programming language. In this section, we’ll discuss five different basic data types that are applicable to both the front end and back end. Luckily for us, the syntax (the way we write) for these basic data types is almost identical in Ruby and JavaScript.

Technical Assessment Prep

You will be taking the technical assessment following the last session of Mod 0. It is a good idea to begin preparing for this assessment now so that you feel comfortable and confident with the material.

Here are some details about the assessment:

  • You will be able to use your notes, online resources, etc. during this assessment - however, there are some timed portions so it is better to prepare than rely solely on these resources!
  • A timed multiple choice test - you must get at least an 80% to PASS this portion of the assessment
  • A coding exercise - you will need to carefully follow directions to create different models of real-world things using objects/hashes - we will cover how to use these data structures in Session 5

How Can I Study for This Assessment?

We STRONGLY recommend that you study ahead of time for this assessment. Luckily, you’ve already been “practicing” with many of the exercises and assignments we’ve had so far in Mod 0. Here are a few other recommendations to best prepare for this assessment:

  • Review the your notes, the slides and the online content for each session
    • Ensure you understand the relevant vocabulary and technical content
    • Practice the You Do portions with yourself or with other people
  • Work in small groups to study and practice the content we’ve covered, including:
    • Navigating through files using the terminal
    • Basic terminal commands
    • Setting up a repo to track changes using git
    • Basic git commands
    • How to properly format and write a concise commit message
    • Data types in Javacript (if your in FE program) or Ruby (if you are in BE program)
    • How to assign variables in Javascript (if your in FE program) or Ruby (if you are in BE program)
    • How to re-assign variables in Javascript (if your in FE program) or Ruby (if you are in BE program)
    • How to model data using variables
    • How to model data using objects and variables (coming in Session 5)

    Preparing for this assessment is a great way to start building relationships with your community - remember, Turing is NOT a competition! We highly encourage you to use resources such as Slack calls, Zoom meetings, screen sharing, Driver - Navigator, etc. to work with your cohortmates to practice these skills!

Data Type Use Cases and Syntax Practice

We are going to break out into program specific small groups to start working through these skills!