checkpoint 0 materials

This commit is contained in:
Oliver Kennedy 2017-01-26 15:23:20 -05:00
parent 163d584fb3
commit b6bb1a6254
2 changed files with 109 additions and 5 deletions

View file

@ -12,13 +12,115 @@ title: CSE-562; Checkpoint 0
<p>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.</p>
<h2>Meet The Submission System</h2>
<div style="color: red">In Progress</div>
<h4>Grading Workflow</h4>
<p>Let's first get familiar with the submission system.  It's located at: <a href="http://dubstep.odin.cse.buffalo.edu">http://dubstep.odin.cse.buffalo.edu</a></p>
<p>After loading up the website, you will need to create an account.</p>
<center><img src="img/login.png" alt="login" width="309" height="135" /></center>
<p>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.</p>
<center><img src="img/create.png" alt="create" width="278" height="206" /></center>
<p>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.</p>
<h3>Forming Groups</h3>
<p>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 <b>Manage Group</b> tab and click "Or Start a Group..."</p>
<center>
<img src="img/invitations.png" alt="invitations" width="615" height="187" /><br/>
<img src="img/groupcreated.png" alt="groupcreated" width="612" height="338" />
</center>
<p>After creating and naming your group, your leader should click "Invite more..." on the <b>Manage Group</b> tab and add all remaining group members by their email addresses.</p>
<center><img src="img/invite.png" alt="invite" width="357" height="132" /></center>
<p>All team members should now be able to accept their invitation by logging in and going to their <b>Manage Group</b> tab.</p>
<center><img src="img/accept.png" alt="accept" width="631" height="220" /></center>
<h3>GIT and Source Code Management</h3>
<p>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:</p>
<ul>
<li><a href="http://git-scm.com/documentation">http://git-scm.com/documentation</a></li>
<li><a href="http://git-scm.com/book/en">http://git-scm.com/book/en</a></li>
</ul>
<p>If you don't want to dive headfirst into GIT, a nice user-friendly front-end is SourceTree <a href="http://www.sourcetreeapp.com">http://www.sourcetreeapp.com</a>. Alternatively, read on below for a quick and dirty intro to the three GIT commands you can't live without.</p>
<p>The upstream URL of your team's GIT repository is available from the <b>Manage Group</b> tab.</p>
<center><img src="img/gitrepo.png" alt="gitrepo" width="619" height="292" /></center>
<p>To access the repository, you'll first need to register your GIT public key.  An overview of public key management can be found <a href="http://git-scm.com/book/en/Git-on-the-Server-Generating-Your-SSH-Public-Key">here</a>.  A public key should look something like this (with no line breaks):</p>
<pre>
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgX8jMmapRQ7pIJ0JV9zfvkqef/OBV//y3t0ceV5KaZ4DMlcn+xzonR/OR4cTuAyQRyQK3TlamleUATQe9JAieaI3dodnCfrN7C16RiqkB6iQorpCC+LdkdM7n3rVtleIAY93Imoq6tJEf+boeLz7EtB6I7OJSZ+NgRv5Z4vvF2hlgJrXaCr+ofURm/lLOHB1AdcZiXVL8tPOVl/FG170/i1fI+Y1eyQtko10XlHTHx4bGavYMsOKWoVjTBCruH8/VmiaUY7RBTn8Qg+yOQZPIOTrtWxRm0/Q373hKn8Xt+Dh38tHL3Z8X2C4jup/JFRmoT+nH6m9pB79IcnBNYa7V okennedy@sif
</pre>
<h3>Uploading Your Public Key</h3>
<p>From the <b>Manage Account</b> tab, click on "Upload public key..."</p>
<center><img src="img/pubkey.png" alt="pubkey" width="268" height="104" /></center>
<p>Copy the entire public key into the field provided and add a short description (useful if you work on multiple computers).</p>
<center><img src="img/pubkey2.png" alt="pubkey2" width="271" height="376" /></center>
<p>You should now be able to clone your team's GIT repository:</p>
<center><img src="img/gitclone.png" alt="gitclone" width="585" height="192" /></center>
<h3>A Quick and Dirty Intro to GIT</h3>
<p>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.</p>
<pre>
> cd teamX
> mkdir src
> mkdir src/dubstep
> touch src/dubstep/Main.java
</pre>
<p>Now you need to make git aware of the file you just added.</p>
<pre>
> git add src/dubstep/Main.java
</pre>
<p>Next, you need to create a commit checkpoint -- a marker indicating that your local copy of the repository is in a stable state.</p>
<pre>
> git commit -a
</pre>
<p>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.</p>
<pre>
> git push
</pre>
<p>The files are now in your global repository.  Your teammates can now receive your changes by pulling them from the central repository.</p>
<pre>
> git pull
</pre>
<p>If this works, you should be all set.</p>
<h3>Submitting Code</h3>
<p>To have your project graded, go to the <b>Home Page</b> tab, click "Show" for the project you want to submit, and click "Create new submission".</p>
<center><img src="img/project.png" alt="project" width="626" height="373" /></center>
<p>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. </p>
<h3>Grading Workflow</h3>
The grading scripts will do the following:
<ol>
<li>Decompress your submission file.</li>
<li>Retrieve your repository from GIT.</li>
<li>Recursively scan through the directory src/ at the root level of your submission for *.java files.</li>
<li>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!</li>
<li>Attempt to run your project as
@ -72,7 +174,9 @@ represented as a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsql
</pre>
represented as a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/Union.html">Union</a>, which is essentially a list of <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html">PlainSelect</a>s.</p>
<p>For this assignment, you can assume that you're getting just a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html">PlainSelect</a> and cast it as above (but be sure to check its type first). As you'll see in the JavaDoc, <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html">PlainSelect</a> 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: <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html#getFromItem--">getFromItem</a>. Here, you'll need to go through one more level of unwrapping. As you'll see in the JavaDoc, a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/FromItem.html">FromItem</a> can be a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/schema/Table.html">Table</a>, a nested query (i.e., <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/SubSelect.html">SubSelect</a>) or a <tt>JOIN ... ON</tt> expression (i.e., <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/SubJoin.html">SubJoin</a>).</p>
<p>For this assignment, you can assume that you're getting just a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html">PlainSelect</a> and cast it as above (but be sure to check its type first). As you'll see in the JavaDoc, <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html">PlainSelect</a> has a ton of methods. Don't be overwhelmed. Each method matches exactly one field of a SELECT statement. </p>
<p>For the purposes of this assignment, <b>ignore everything in <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html">PlainSelect</a> except: <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html#getFromItem--">getFromItem</a>()</b>. Here, you'll need to go through one more level of unwrapping. As you'll see in the JavaDoc, a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/FromItem.html">FromItem</a> can be a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/schema/Table.html">Table</a>, a nested query (i.e., <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/SubSelect.html">SubSelect</a>) or a <tt>JOIN ... ON</tt> expression (i.e., <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/SubJoin.html">SubJoin</a>). Today, we'll be working only with <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/schema/Table.html">Table</a>s.</p>
<p>Once you have a <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/schema/Table.html">Table</a> object, you can get the name of the table being referenced.
<pre>

View file

@ -96,7 +96,7 @@ In this course, you will learn...
</li>
<li>50% projects
<ul>
<li>5% <a title="Checkpoint 0" href="checkpoint0.html">Project 0</a> due on TBD</li>
<li>5% <a title="Checkpoint 0" href="checkpoint0.html">Project 0</a> due on Feb 10.</li>
<li>15% <a title="Checkpoint 1" href="checkpoint1.html">Project 1</a> due on TBD (code-review after)</li>
<li>15% <a title="Checkpoint 2" href="checkpoint2.html">Project 2</a> due on TBD (code-review after)</li>
<li>15% <a title="Checkpoint 3" href="checkpoint3.html">Project 3</a> due on TBD (code-review after)</li>