CS 106 Winter 2018
Assignment 00: Warmup
Summary
The goal of this assignment is mostly just to make sure you're ready to use Processing and the other technologies that will power the labs and assignments in this course. We'll ask you to visit a few websites, read through some information, and write some very simple code by adding to or creating sketches.
Question 1 Login
Log in to one of the Macs in your lab room. That's it, just make sure you can access your account. Sure, you might be planning to use your own laptop all term, but laptops crash, and we want to make sure you always have access to the lab as a backup. (For that matter, now is a good time to ensure you have a good backup strategy in place. Consider using an automated backup system like Time Machine on Macs, or save your work into a folder that's automatically cloned by Google Drive or Dropbox.)
Question 2 Processing
Launch Processing and make sure it runs smoothly. Please make an effort to run the latest version of Processing (which is currently 3.3.6, but anything starting with 3 is probably OK).
Question 3 Course web page
You must have seen at least part of the course web page if you're reading these instructions, but go back to the main page and have a look around, just to familiarize yourself with the layout. Read the course outline, playing particular attention to "Student Expectations" and "Course Policies".
We'll be putting a minimal amount of information on LEARN in this course—unless there's a specific reason to keep information private, it will be publicly visible on this page.
Question 4 Piazza
Visit the Piazza page for this course. You should already be enrolled in the course, or have received an invitation to do so. Either way, make sure you're enrolled now. Piazza will be our primary means of answering questions and issuing timely announcements, so be sure to check it frequently.
You'll notice that there's already a post with the subject "Welcome to CS 106!". Please read that post and add your answer to the Student Answer as appropriate.
Question 5 Clickers
As a former CS 105 student, you should already have a clicker. If you don't, you should buy one ASAP. You will then need to register your Clicker ID with this course, as you did last term. To do so, please visit the registration page and follow the instructions there.
Question 6 LEARN
We will use LEARN mainly to collect electronic assignment and lab submissions, and to provide feedback on those submissions. Please make sure that you can see this course (under the name "CS 106 - Winter 2018") in your LEARN account. If not, get help immediately so that you're able to submit your work.
Question 7 Starter code
For many labs and assignments, we'll be providing starter code that you can use as a point of departure for your work. Please download the file A00.zip and unzip it, ideally into a folder set aside for this course. You'll see that it includes subfolders for two Processing sketches.
Question 8 Academic integrity
We take Academic Integrity very seriously, and we want to make sure that you're aware of your responsibilities for lab and assignment submissions. Last term, you were asked to read Policy 71 and to complete the online Academic Integrity Tutorial and Quiz. If you are unfamiliar with those documents, or need a refresher, please go over them again now.
We have provided a sketch titled AcademicIntegrity with our own text about requirements for code submission. Open the sketch in Processing. Before you do anything else, put your name and student ID in the comments at the top of the sketch. You should include comments like these in every source file you submit in this course.
You do not need to read or understand the code in this sketch, which is beyond our expectations for students in this course. You will find that the text about integrity is not in the code itself, but in an accompanying data file lines.txt. Find the file by selecting Sketch → Show Sketch Folder from Processing's menu, then navigating into the data subfolder. Open the text file using your favourite text editor. Indicate that you have read it by changing the second and third lines of the file to your name and Student ID number, as indicated there. Save the modified file. You can now run the sketch to view the result, if you want.
Question 9 Three corners where two lines meet
In the A00 folder, create a new sketch titled OneTriangle. This sketch must create a window of size 500×500, colour it white, and then draw a single triangle anywhere in the window. The triangle should have no stroke colour (i.e., no outline), and can have any fill colour you want except white. It can have any shape and location, but must fit entirely within the sketch window and be clearly visible. Use one call to the built-in function triangle(). The sketch should display a single triangle as soon as it starts, and do nothing else.
Make sure to put a comment at the top of your sketch with your name and student ID number.
Question 10 Extra! Extra!
Congratulations, you're ready for CS 106! Let's celebrate with a front-page headline. The provided sketch ExtraExtra simulates a spinning newspaper front page, a common special effect in old movies. The implementation of the effect is provided for you as a toy. All you need to do is customize it as follows:
- Put your name and Student ID in the comments at the top of the file.
- Add your name where indicated in the source code
- Put a photo of yourself in the sketch's data folder (which can be found as in the AcademicIntegrity sketch), and make sure the image file name correctly loads that photo in the source code
The sketch is somewhat complicated, but you do not need to understand all of it. Look for two comments labeled TODO for the places where you need to modify code. All you have to do is modify one or two variables to complete the sketch. Of course, you're welcome to study the rest of the code or play around with it, if you're interested; but no further changes are required.
Submission
In this and all future labs and assignments, there are some standard steps to follow for submission. Please do not deviate from these steps—we may penalize submissions that do.
- Review the Code Style Guide and use Processing's built-in auto format tool. You do not need to use the precise coding style outlined in the guide, but whatever style you use, your code must be clear, concise, consistent, and commented.
- Review the How To Submit document for a reminder on how to submit to LEARN.
- Make sure to include a comment at the top of all source files containing your name and student ID number.
- Create a ZIP archive called A00.zip containing the entire A00 folder with its AcademicIntegrity, OneTriangle, and ExtraExtra sketches. That is, unzipping the archive should produce a folder called A00 containing three subfolders with the names given above. Use the exact names given here: do not call your sketch OneTriangle_JohnSmith, or onetriangle, or One_Triangle. Do not include other folders in the archive.
- Upload your zipped archive to LEARN.