Programming Project 1

This semester you will be using various tools to complete the assignments and course materials. This first project will help you set up your computer, and introduce you to some of the tools for the course.

You will need the following before you begin this assignment:

There are four components to this assignment:
  1. Installing and running python on your computer.
  2. Installing and running curl on your computer.
  3. Setting up VPN on your computer
  4. Completing Assessment 0: Logging in to Kelpie during lab to submit some sample code.

Part 1: Installing and running python on your computer
There are many different ways to run python on your computer, but this semester we're going to only use the terminal. One reason for this is consistency, but it's also a useful lesson to get used to interacting with the operating system directly through the terminal.
Open the terminal: On a Mac, you can find the terminal under "Applications" in your Finder. On Windows, go to Start->Run, and in the box type cmd, which will open the terminal window. Once open, type in the command python, and then hit enter.

If python is installed (this may happen on some versions of the Mac), you will see something similar to the image below:

Type quit() to exit the prompt. If you see something else, you'll need to install python. You'll want the older version, version 2.7, available lower-down on this page: Follow the instructions through the various installers; if you are using the Windows MSI, make sure in the second window you find the red X by "put python on your path" and change it to the middle option. If you get stuck, try googling your error messages or problems before posting questions to Piazza - it's a good skill to not be afraid of your computer :-) You can also ask your classmates or friends for help! Work together to install python.

Now that you have installed python, we are going to get practice using some basic terminal commands, and running a python program.

Complete the following steps
  1. Let's view where we are. If you are using Windows, your current path is listed next to the cursor. If you're on a Mac, type pwd to show the current directory. From there, you can list the folders under the current directory with the dir command on Windows, or the ls on a Mac.
  2. Decide on a directory to store your python files this semester (maybe you keep your school files under "My Documents" or something like that. You'll need to now find it on your machine, through the terminal. Use the cd command to change directories. You can go to a sub-directory of the current directory by typing cd mySubDirectory, or move to a directory just above the current directory by typing cd ... This change directory command will allow you to move around anywhere on your file system.
  3. When you're in a happy place, create a new directory called project1 using the mkdir project1 command. Then, change directory to be in this newly created directory.
  4. Download this python file, and save it to your computer (you can download it by right-mouse clicking on the file and saving it in the directory you just created). Also download and save the file file.txt to the same directory.
  5. Verify that you've saved the files in the appropriate place by listing the contents of the current directory using the command we learned in the first step.
  6. Finally, let's run the python code you downloaded. Type python to execute the python file. If everything went well, you should see the output below.

You will be writing python code this semester, so it is a good idea to choose a good text editor that is set up to work with programming languages; using Notepad or MSWord will make it very hard, if not impossible to write code in. Notepad++ was popular with students in previous semesters (you can google for a free download). On the Mac, I use TextWrangler (which you can also get a free download through google). Choose one of these two programs (or one of your favorites), and download and install it so you can write code that semester. If you get stuck, try googling your error messages or problems before posting questions to Piazza - it's a good skill to not be afraid of your computer :-) You can also ask your classmates or friends for help! Work together to install a text editor.

Part 2: Installing curl on your computer.

This semester, it is important for both you, and the instructor, to keep track of your progress on ungraded homework assignments and projects, as well as the graded assessments. To do so, we'd like to be able to record every time you try one of the homework problems, so that we can make sure no students are falling too far behind. Though the class is self-paced, we want to make sure students are working throughout the semester, and offer interventions when we notice a student is stuck on the same assignment for a long time.

To keep track of your progress, you will need to install a utility called curl (see the wiki on curl if you're curious). First, check if curl is already installed (most likely if you have a Mac) by opening a terminal window (as described in the section above, and typing the command curl and hitting return. If it is already installed, you will be something like this:

If it complains that it can't find curl, then you'll have to install it. To do so, follow these instructions for installing curl on Windows for SSL SSH version; If you are using Windows, download the link at the bottom, and then download the .zip file, not the MSI. Once you've completed those installation instructions, you can test your installation by opening a NEW command prompt/terminal and trying to type curl in again; if it was installed successfully, you should see the image above. If you get stuck, try googling your error messages or problems before posting questions to Piazza - it's a good skill to not be afraid of your computer :-) You can also ask your classmates or friends for help! Work together to install curl.

Please log in again to view this part of the page.

Part 3: Setting up VPN

Many of the homework assignments are compatible with a Python Visualizer website we have that can run, trace, and debug your code. In order to access this website off campus, you'll need to set up a VPN (virtual private network). Again, how to do this depends on your operating system. Follow the instruction here to install a VPN client. To connect with the VPN client, you will have to use your mason username and password (the same one as for PatriotWeb).

If you know you will be on-campus all semester (when you're working on the homework assignments), you can skip installing VPN.

Part 4: Completing Assessment 0: Logging in to Kelpie and submitting some code.
You will spend most of your time in this class working in groups on homeworks, projects, and sample assessments. About once a week, you'll schedule and take an assessment in lab that will take the place of the exams you would normally have in a class. These assessments will always be taken in lab, and must be scheduled in advance.

To keep you moving through the course, you must schedule at least one assessment each week. In this last part of this project, we will practice using the website to schedule an assessment, and you will go to lab to turn in this first assessment. You won't have to do any coding for this first assessment, but you will be required to submit some python code we give you, just so you can get used to using Kelpie.

First, find and use the links on the syllabus to schedule an assessment for this week (open syllabus in new tab). There are sixty students in this class this semester, with 24 seats in each lab section. There are 4 lab sections, yielding ~100 possible assessment slots each week. All students must sign up for an assessment slot every week (until you've passed all assessments); if there is room, you will be allowed to schedule additional assessment slots each week on a first-come, first-served basis. Out of fairness to other students, you must show up for an assessment slot you schedule; failing to do so will count as failing that assessment (this way we can prevent a handful of students using up all assessment slots without showing up to take them). You may schedule one slot a week, however, if there are available spaces in a subsequent lab, you may stay to start a new assessment (you must inform the TA). In addition, you may take as many assessments in an assessment slot as you like; if for some reason you already know python/programming and you want to finish this course in a week or two, this is entirely possible. We budget 45 minutes for each assessment, but you're free to do them faster, and if there are free assessment slots later in the day (you won't know these until the day-of, however), then you can stay later and take more assessments.

Now that you have scheduled an assessment slot for this week, you will complete the rest of this assessment in lab. Since we're not testing any programming in this first Assessment 0, here's what you'll be doing in lab for the assessment:

Project Hints and Guidelines