CS 136 – Fall 2020 – Assignment 0

Due Date: Friday, September 18, 2020 at 9:00 pm.

There are NO marks for assignment 0.  However, you will not receive marks for other assignments until this assignment has been 100% completed correctly.

Question 1: Microsoft Teams

We are using Microsoft Teams as the delivery medium for the course.

BLACK QUESTIONS (moderate collaboration allowed)

Login into the CS 136 Microsoft Teams page to ensure that you have access.

Question 2: Setting your CS Password

The University of Waterloo uses a Central Authentication Service (CAS) to authenticate users. The associated username/password-combination is sometimes referred to as your WatIAM credentials. These are the credentials used to log into Quest for example.

Some tools we are using in CS 136 require your student.cs credentials, for example, when logging into Seashell. Technically, these are different than your WatIAM credentials, and you can have a different password in the student.cs environment. For security reasons, it is recommended to use a different password in each environment. Otherwise, it is easier to become the victim of an attack like the one on the Canada Revenue Agency less than a month ago. To choose a secure yet easy to remember passwords (passphrases actually), your can use diceware. There are more information about diceware available online.

It is also possible that you have not yet set your password for the student.cs environment (which can create problems). This question ensures that you can log in to the student.cs environment.

GOLD QUESTION (no collaboration allowed)

  1. Login to this website, to find the secret word.
  2. Go to the A0 project in Seashell and click on q2-credentials. You should see the file secret.txt already there.
  3. Modify the file secret.txt to contain the secret word.
  4. Click on SUBMIT QUESTION to submit [q2-credentials] to Marmoset.


Question 3: Introduction to The Seashell Environment and Marmoset

In CS 136, we have developed an online environment called Seashell in which you can write, test and submit your assignments. To access it, go to this website.

Note: This uses the same environment used to test and evaluate your assignment submissions. We recommend that you use this environment to develop your programs for CS 136. Other environments may behave differently and we will not provide any support for other environments.

Note: If you have taken CS 136 before or have launched Seashell previously, you may have projects from previous terms. Before you start working on this assignment, you should archive your old seashell projects. To do this, click on the help button at the top right of the seashell home page and then click 'Archive all projects' under Cluttered old projects?. If you are using Seashell for the first time, this operation is harmless.

Please report any issues with Seashell immediately to seashell@cs.uwaterloo.ca.

BLACK QUESTION (moderate collaboration allowed)

  1. Go into the A0 project in Seashell and click on q3-marmoset (you should see several files already there).
  2. Click on runme-racket.rkt and follow the instructions in that file (click SET AS ⧁ FILE, press the RUN ⧁ button, etc.).
  3. Click on runme-c.c and follow the same instructions.
  4. Modify your my-numbers.txt to insert your student number, Racket magic number and C magic number. Note that you do not have a secret number yet, so leave it as XXXXXXXX for now.
  5. Click on SUBMIT QUESTION to submit [q3-marmoset] to Marmoset. Ignore any "late" warnings: the deadline for this question is intentionally set early so you can see your results right away.
  6. Marmoset has two types of tests: Public and Secret tests.
    • Public tests are basic and simple, and may test little more than whether or not your code compiles. You can see your public tests in Seashell. After you submit from Seashell and Marmoset finishes testing your submission, your public test results will appear beside the submit button. Click there to view them in more detail.
    • Secret tests are more comprehensive and thoroughly test your code. Your assignment grade is primarily based on the secret tests. However, secret test results are not available until after the deadline has passed. To see your secret test results, you must log into the Marmoset submission system.
    Make sure you see that, in Seashell, the public test score is 1/1. This means that your assignment has passed the basic and simple public test. It does not mean that your code is correct or that it has passed any of the secret tests. Note that it often takes Marmoset several minutes to test your file. If it says "not tested yet", then be patient and refresh your browser after a few minutes.
  7. For this assignment only, your results of our secret tests will be available immediately. Log into Marmoset to view your results. When you click on view beside q3, your secret number should be posted in the results of your secret test.
  8. Now you should know your secret number, so modify your my-numbers.txt file and resubmit your assignment.
  9. Finally, check on Marmoset that you have passed your secret test.

Question 4: I/O Testing in Seashell

In CS 136, you are going to be working with I/O (input and output) and Seashell has a testing framework for testing files with I/O.

BLACK QUESTION (moderate collaboration allowed)

  1. Go to [q4-testing] in Seashell.
  2. RUN the program. It expects you to enter input on the console. The console typically appears to the right of your code window. Try entering some numbers. Click on the console window and start typing. For each number you input, it should output another number. To stop inputting numbers, press CTRL + D or CMD + D to send the EOF signal or press the [EOF] button.

    Seashell has two "modes" of running. When you click the [RUN ⧁] button, it expects input from the console. When you click on the [I/O TEST] button, it reads in input from input file(s).

  3. Open the provided simple.in file, and then click on the [I/O TEST] button. Notice that the test fails! Seashell will run the program as though you had entered the contents of simple.in on the keyboard, and then verify that the program output matches the contents of the simple.expect file. Since the provided simple.expect file is empty, the output does not match and the test fails.
  4. Modify the simple.expect file so that it contains what you would expect the program to output for the given input in the simple.in file (note that there is an empty line after the last number.):

  5. Click on the [I/O TEST] button again and ensure that your simple test passed.
  6. You can have more than one test. Create a new test called primes using the [Add Test...] button.
  7. In primes.in, enter the first five prime numbers (starting with 2) each on its own line.
  8. Modify the corresponding primes.expect file so that it contains what you would expect the program to output for the primes.in input, and ensure that this test passes.
  9. Once both tests pass, submit [q4-testing] to Marmoset.

Question 5: Retrieving feedback from MarkUs

In CS 136, you use Marmoset to view your results for our secret tests. However, Marmoset does not have the ability to provide hand-marking feedback.

For questions that will be hand-marked, we will be using the MarkUs system.

After an assignment deadline, we automatically submit your assignment to MarkUs. For this assignment, we have submitted a "fake" assignment for you.

BLACK QUESTION (moderate collaboration allowed)

  1. Go to [q5-markus] in Seashell.
  2. Modify the file markus.txt to enter your WatIAM username and your "Secret Code".
  3. When completed, submit [q5-markus] to Marmoset.

Question 6: Academic Integrity

In this question, you are required to complete a questionnaire that demonstrates you understand the issues relating to Academic Integrity.

You also are required to complete an integrity statement. For most of the questions in this course, you will be required to complete an integrity statement, and if you do not complete the statement, your assignment will not be graded.

GOLD QUESTION (no collaboration allowed)

  1. Follow the instructions on this page.
  2. Complete the integrity statement at the top of the integ.txt file.
  3. When completed, submit [q6-integrity] to Marmoset.

Question 7: Piazza

GOLD QUESTION (no collaboration allowed)

  1. Login to Piazza, and find the official post with the secret word.
  2. Modify the file secret.txt in [q7-piazza] to contain the secret word.
  3. Submit q7 to Marmoset.