From b6bb1a62545734c95bfef639364fcd85e41adf57 Mon Sep 17 00:00:00 2001 From: Oliver Kennedy Date: Thu, 26 Jan 2017 15:23:20 -0500 Subject: [PATCH] checkpoint 0 materials --- src/teaching/cse-562/2017sp/checkpoint0.erb | 112 +++++++++++++++++++- src/teaching/cse-562/2017sp/index.erb | 2 +- 2 files changed, 109 insertions(+), 5 deletions(-) diff --git a/src/teaching/cse-562/2017sp/checkpoint0.erb b/src/teaching/cse-562/2017sp/checkpoint0.erb index a646602d..4fe0d274 100644 --- a/src/teaching/cse-562/2017sp/checkpoint0.erb +++ b/src/teaching/cse-562/2017sp/checkpoint0.erb @@ -12,13 +12,115 @@ title: CSE-562; Checkpoint 0

This project aims to get you familiarized with the course submission system, force you to set up your build and testing environment, and to introduce you to the basics of JSqlParser.

Meet The Submission System

-
In Progress
-

Grading Workflow

+

Let's first get familiar with the submission system.  It's located at: http://dubstep.odin.cse.buffalo.edu

+ +

After loading up the website, you will need to create an account.

+ +
login
+ +

When creating an account, be sure to use your UB email address.  If you don't have a UB email address, contact the teacher or a TA as soon as possible.

+ +
create
+ +

After you create an account, you'll receive an email with an activation token.  Click on the link in the email, or copy it into your browser's location bar.

+ + +

Forming Groups

+

Find up to three other students in the class, and elect one member of your group to be the leader.  You'll also need a group name.  Be creative.  This is how you'll show up on the leaderboards.  The group leader should go to the Manage Group tab and click "Or Start a Group..."

+ +
+ invitations
+ groupcreated +
+

After creating and naming your group, your leader should click "Invite more..." on the Manage Group tab and add all remaining group members by their email addresses.

+ +
invite
+ +

All team members should now be able to accept their invitation by logging in and going to their Manage Group tab.

+ +
accept
+ +

GIT and Source Code Management

+

For submissions, and for your group's convenience, DµBStep provides your group with a GIT repository.  If you don't know how to use GIT, it's an important skill to have.  Numerous tutorials and reference materials are available, including:

+ + +

If you don't want to dive headfirst into GIT, a nice user-friendly front-end is SourceTree http://www.sourcetreeapp.com. Alternatively, read on below for a quick and dirty intro to the three GIT commands you can't live without.

+ +

The upstream URL of your team's GIT repository is available from the Manage Group tab.

+ +
gitrepo
+ +

To access the repository, you'll first need to register your GIT public key.  An overview of public key management can be found here.  A public key should look something like this (with no line breaks):

+ +
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgX8jMmapRQ7pIJ0JV9zfvkqef/OBV//y3t0ceV5KaZ4DMlcn+xzonR/OR4cTuAyQRyQK3TlamleUATQe9JAieaI3dodnCfrN7C16RiqkB6iQorpCC+LdkdM7n3rVtleIAY93Imoq6tJEf+boeLz7EtB6I7OJSZ+NgRv5Z4vvF2hlgJrXaCr+ofURm/lLOHB1AdcZiXVL8tPOVl/FG170/i1fI+Y1eyQtko10XlHTHx4bGavYMsOKWoVjTBCruH8/VmiaUY7RBTn8Qg+yOQZPIOTrtWxRm0/Q373hKn8Xt+Dh38tHL3Z8X2C4jup/JFRmoT+nH6m9pB79IcnBNYa7V okennedy@sif
+
+ +

Uploading Your Public Key

+

From the Manage Account tab, click on "Upload public key..."

+ +
pubkey
+ +

Copy the entire public key into the field provided and add a short description (useful if you work on multiple computers).

+
pubkey2
+ +

You should now be able to clone your team's GIT repository:

+ +
gitclone
+ +

A Quick and Dirty Intro to GIT

+ +

Once you have cloned a copy your repository (a directory called teamX, where X is your group ID), you'll need some organization.  The grading script will attempt to compile all of the java files in your repository, but for your own sanity and ease of compilation it can be helpful to keep your repository organized. It's common to create a directory named `src` at the root of your git repository.  Create that now.

+ +
+> cd teamX
+> mkdir src
+> mkdir src/dubstep
+> touch src/dubstep/Main.java
+
+ +

Now you need to make git aware of the file you just added.

+ +
+> git add src/dubstep/Main.java
+
+ +

Next, you need to create a commit checkpoint -- a marker indicating that your local copy of the repository is in a stable state.

+ +
+> git commit -a
+
+ +

The -a flag commits all files that have changed (you still need to manually add files that are new).  You will be asked to provide a message that describes the changes that you've just made to the code.  Finally, you need to send the changes to the central repository.

+ +
+> git push
+
+ +

The files are now in your global repository.  Your teammates can now receive your changes by pulling them from the central repository.

+ +
+> git pull
+
+ +

If this works, you should be all set.

+ +

Submitting Code

+

To have your project graded, go to the Home Page tab, click "Show" for the project you want to submit, and click "Create new submission".

+ +
project
+ +

A snapshot of your repository will be taken, and your entire group will receive an email notification once your project has been graded. You may only have one submission pending at any given time, but you may resubmit as many times as you like.

+ +

Grading Workflow

The grading scripts will do the following:
    -
  1. Decompress your submission file.
  2. +
  3. Retrieve your repository from GIT.
  4. Recursively scan through the directory src/ at the root level of your submission for *.java files.
  5. Compile all of these files (with all course-provided classes in the classpath). Compilation is performed using the Java 1.8 SDK. Do not use features from later versions of java or your submission will not compile!
  6. Attempt to run your project as @@ -72,7 +174,9 @@ represented as a Union, which is essentially a list of PlainSelects.

    -

    For this assignment, you can assume that you're getting just a PlainSelect and cast it as above (but be sure to check its type first). As you'll see in the JavaDoc, PlainSelect has a ton of methods. Don't be overwhelmed. Each method matches exactly one field of a SELECT statement. For the purposes of this assignment, you can ignore all of the fields except one: getFromItem. Here, you'll need to go through one more level of unwrapping. As you'll see in the JavaDoc, a FromItem can be a Table, a nested query (i.e., SubSelect) or a JOIN ... ON expression (i.e., SubJoin).

    +

    For this assignment, you can assume that you're getting just a PlainSelect and cast it as above (but be sure to check its type first). As you'll see in the JavaDoc, PlainSelect has a ton of methods. Don't be overwhelmed. Each method matches exactly one field of a SELECT statement.

    + +

    For the purposes of this assignment, ignore everything in PlainSelect except: getFromItem(). Here, you'll need to go through one more level of unwrapping. As you'll see in the JavaDoc, a FromItem can be a Table, a nested query (i.e., SubSelect) or a JOIN ... ON expression (i.e., SubJoin). Today, we'll be working only with Tables.

    Once you have a Table object, you can get the name of the table being referenced.

    diff --git a/src/teaching/cse-562/2017sp/index.erb b/src/teaching/cse-562/2017sp/index.erb
    index de27962d..0f85fa78 100644
    --- a/src/teaching/cse-562/2017sp/index.erb
    +++ b/src/teaching/cse-562/2017sp/index.erb
    @@ -96,7 +96,7 @@ In this course, you will learn...
         
  7. 50% projects