Welcome to CS Foundations

  1. Lesson 02 - GitHub


    GitHub

    Read the Git and GitHub documentation provided in the Tools section.

    Remember the following GitHub actions

    When you work on a machine you never worked before, you should clone your repo:

    git clone SSH_GITHUB_LINK

    Before you start working on any device, the first command you should run is:

    git pull

    When you finish your work:

    • If you added new files and want to track the files, you must run the following command for each file:

            git add FILE_NAME

    • Commit the changes:

            git commit -a -m "COMMIT_MESSAGE"

    • Push the changes o GitHub

            git push

  2. Lesson 01 - Introduction


    Welcome to CS Foundations!

    Please carefully read Classroom and Lab Rules, and our grading policy here.

    You may use the lab machines or your own computers during class.

    Student Accounts

    Each of you has an account on our main server.

    You can use the lab computers to access your account.

    The machines in the lab use the Linux (Mint) operating system.

    Log into the computer

    username: your stuy.edu username, without the @stuy.edu

    password: OSIS + homeroom (eg. 1234567893qq)

    Change your password to a strong password.

    Follow these steps:

    1. Start a terminal window: click on terminal icon or press control + alt + t
    2. Establish a connection to the the central computer:
    	$ ssh 149.89.17.91      <enter>
    	Answer yes to the "Are your...?" question.
    	The cursor will hide your typing while you enter...
    	password: OSIS + homeroom    <enter>
    
    1. Request a new password:
    	$ passwd enter
    	Changing password for _____.
    	(current) UNIX password: OSIS + homeroom  <enter>
    	Enter a new UNIX password: yourNewPassword  <enter>
    	Retype new UNIX password:  yourNewPassword  <enter>
    	password: password updated successfully
    
    1. Log out $ exit

  3. HW 03 - Double Checking GitHub


    DUE DATE:

    The homework is the same as yesterday. If you have your SSH keys configured and your home machine is connecting to GitHub with SSH, you're all set, no homework for you today.

    1. Configure your machines at home to connect to GitHub with SSH.
    2. If you did not accept the assignments repo in class, please do it at home. This is the link. After accepting that assignment, you should have a repo created on your GitHub.
    3. Clone the assignments repo on your home machine:

            - Go to your GitHub assignments repository that you accepted for this class. You will see a green button, "Code". You must click on that button and select SSH to have the appropriate link that will allow you to clone your repository and copy the link you see there.

            - Create a folder CS_Foundations anywhere in your home computer.

            - On your terminal, go inside the folder CS_Foundations to clone your repository and type:

              git clone PASTE_THE_LINK_YOU_COPIED_FROM_GITHUB_(git@...)

  4. HW 02 - GitHub


    DUE DATE:

    1. Configure your machines at home to connect to GitHub with SSH.
    2. If you did not accept the assignments repo in class, please do it at home. This is the link. After accepting that assignment, you should have a repo created on your GitHub.
    3. Clone the assignments repo on your home machine:

            - Go to your GitHub assignments repository that you accepted for this class. You will see a green button, "Code". You must click on that button and select SSH to have the appropriate link that will allow you to clone your repository and copy the link you see there.

            - Create a folder CS_Foundations anywhere in your home computer.

            - On your terminal, go inside the folder CS_Foundations to clone your repository and type:

              git clone PASTE_THE_LINK_YOU_COPIED_FROM_GITHUB_(git@...)

  5. HW 01 - Forms


    DUE DATE:

    Complete the following forms:

  6. /files/images/readme/


  7. CW 02 - Evaluate Prefix Expressions


    DUE DATE:

    Directions: On your notebook, evaluate the following expressions:

    Expression Value
    10
    (+ 5 3 4)
    (- 9 1)
    (/ 6 2)
    (+ (* 2 4) (- 4 6))
    (+ 2 (- 3 1))
    (* ( + 1 3) (- 5 2))
    (+ (* (- 4 (- 5 1)) 3) 2)
    (- 5)
    (+ 3)

  8. CW 01 - Hello World and GitHub


    DUE DATE:

    The objective of this exercise is to create a txt file, add it, commit and push to a remote repository.

    1. In your local machine, go to the folder where your assignments repo was cloned ...../CS_Foundations/cs_foundations-assignments-YourUsername/ and create a folder classwork.
    2. Create a folder 01_hello_world inside the classroom folder.
    3. Write a txt file HelloWorld.txt that prints the message "Hello World!".
    4. Run git status. What does it show?
    5. Add the new file to the repo
    6. Run git status again. What does it show this time?
    7. Commit and push the file to your repo.
    8. Go to GitHub, HelloWorld.txt should be there.