All the course activities are scheduled to be in-person activities this semester.

Week 7 [Mon, Mar 3rd] - Project

iP:

  1. Add Increment: A-MoreOOP
  2. Add Increments as PRs: Level-8, Level-9, A-JavaDoc
  3. Set up a product website
  4. Submit the final version Fri, Mar 14th 2359

tP:

  1. Ensure you know tP expectations
  2. Plan the next iteration (v1.0)
  3. Start the next iteration

iP

1 Add Increment: A-MoreOOP

  • As before, commit, tag, and push, after each increment.
Duke A-MoreOOP: Use More OOP

Why more OOP?


2 Add Increments as PRs: Level-8, Level-9, A-JavaDoc

Guidance for the item(s) below:

As you know, one main goal of the iP is to prepare for you for the tP. The task below is heavy on the 'training for tP' aspect.

In previous iP increments, you learned:

  • How to merge branches locally and push to your fork
  • How to create PRs from the master branch to an upstream repo

In the following iP task you will learn how to do the following new things, which are relevant to the tP:

  • How to merge branches remotely, and pull to your local repo
  • How to create PRs from branches other than master
  • How to manage PRs that your repo receive
  • How to work with parallel PRs

Due to the above learning goals, this iP task is a bit complicated. Pay attention and try to achieve all learning goals along the way.


  • Note how to merge PRs:

  • Practice using parallel git branches and PRs, as explained below:
  1. First, do each increment as a parallel branch (follow the branch naming convention you followed earlier branch-Level-8 etc.), but do not merge any.

    %%{init: { 'theme': 'default', 'gitGraph': {'mainBranchName': 'master'}} }%% gitGraph commit id: "m1" commit id: "m2" branch branch-A-Assertions checkout branch-A-Assertions commit id: "b1c1" checkout master branch branch-A-CodeQuality checkout branch-A-CodeQuality commit id: "b2c1" checkout master branch branch-A-Streams checkout branch-A-Streams commit id: "b3c1" commit id: "b3c2" checkout master
  2. Then, push each branch to your fork, and create a PR within your fork (i.e., from the increment branch to the master branch). Be careful not to create a PR to the upstream repo. If you did create such a PR by mistake, no worries, just close it yourself.

When you are doing the next step, you can run into merge conflicts. In some cases, GitHub will give you a way to resolve those conflicts using the Web interface. While this approach may be good enough for simple merge conflicts, de-conflicting locally in the standard way is safer (e.g., you can run tests to confirm the updated code is correct) and more standard (it's a standard Git feature that you can use even when you are not using GitHub for your project).

  1. Now, merge one of the PRs and update the remaining PRs accordingly, as given below:
    • Merge one of the PRs on GitHub. Remember to choose the Create merge commit option when merging.
    • The above step will cause the master branch of your local repo to fall behind that of your fork (). Therefore, you need to sync the local master with the remote master branch. One way to do that is to switch to the local master branch and then pull the updated master branch from your fork e.g.,
      $ git checkout master
      $ git pull origin master
      
    Tag the merge commit as usual, and push to the fork.
    The diagram below shows the current situation, assuming you merged the A-Assertions PR first.
    %%{init: { 'theme': 'default', 'gitGraph': {'mainBranchName': 'master'}} }%% gitGraph commit id: "m1" commit id: "m2" branch branch-A-Assertions checkout branch-A-Assertions commit id: "b1c1" checkout master branch branch-A-CodeQuality checkout branch-A-CodeQuality commit id: "b2c1" checkout master branch branch-A-Streams checkout branch-A-Streams commit id: "b3c1" commit id: "b3c2" checkout master merge branch-A-Assertions tag: "A-Assertions"
    • Note how the remaining are no longer in sync with the latest master. To rectify, merge the master branch on to each of them. Resolve merge conflicts, if any. The outcome will be something like the below:
    %%{init: { 'theme': 'default', 'gitGraph': {'mainBranchName': 'master'}} }%% gitGraph commit id: "m1" commit id: "m2" branch branch-A-Assertions checkout branch-A-Assertions commit id: "b1c1" checkout master branch branch-A-CodeQuality checkout branch-A-CodeQuality commit id: "b2c1" checkout master branch branch-A-Streams checkout branch-A-Streams commit id: "b3c1" commit id: "b3c2" checkout master merge branch-A-Assertions tag: "A-Assertions" checkout branch-A-CodeQuality merge master id: "merge master to ..." checkout branch-A-Streams merge master
    • Push the updated branches to your fork. The PRs will update automatically to reflect the updated branch.
    • As before, tag the merge commit in the master branch and push the tag to your fork.
  2. Merge the remaining PRs using a procedure similar to the above. The diagram below shows the situation after merging the A-CodeQuality PR and syncing the local branch-A-Streams with the updated master branch.
    %%{init: { 'theme': 'default', 'gitGraph': {'mainBranchName': 'master'}} }%% gitGraph commit id: "m1" commit id: "m2" branch branch-A-Assertions checkout branch-A-Assertions commit id: "b1c1" checkout master branch branch-A-CodeQuality checkout branch-A-CodeQuality commit id: "b2c1" checkout master branch branch-A-Streams checkout branch-A-Streams commit id: "b3c1" commit id: "b3c2" checkout master merge branch-A-Assertions tag: "A-Assertions" checkout branch-A-CodeQuality merge master id: "merge master to ..." checkout branch-A-Streams merge master checkout master merge branch-A-CodeQuality tag: "A-CodeQuality" checkout branch-A-Streams merge master

FAQ Oops, I messed up my branching! Will I be penalized?


Duke Level-8: Dates and Times optional

Duke Level-9: Find

Duke A-JavaDoc: JavaDoc

3 Set up a product website

  • Add a brief User Guide (UG)
Duke A-UserGuide: User Guide

4 Submit the final version Fri, Mar 14th 2359

  1. Double-check to confirm your iP meets the criteria for full marks:

Admin iP - Grading


  1. Create a new jar file
    • Create the JAR file in one of these ways:
      • If you have added a GUI or using third-party libraries: use Gradle.
      • Else: you can use IntelliJ.
    • The JAR file should be cross-platform and should work in a computer that has Java 17 (but no other Java version). To avoid version compatibility issues, we strongly recommend the following approach:
      1. Open a terminal window, and navigate to the root of your project folder.
      2. Run the java -version command to confirm the terminal is using Java 17.
      3. Run the ./gradlew clean shadowJar command to create the JAR file.
  2. Do the following smoke tests to ensure the jar file works (reason: a similar flow will be used when grading your iP).
    1. Copy the jar file to an empty folder and test it from there. This should surface issues with hard-coded file paths.
      When running the jar file for smoke testing, instead of double-clicking the jar file, do the following: open a terminal -> navigate to the jar location -> run the java -jar "JAR_FILE_NAME" command.
    2. Pass the jar file to team members and ask them to do a test drive. Assuming some of your team members' OS differ from yours, this should verify if the app is cross-platform.
      If you don't have ready access to a specific OS, post a link to your JAR in the forum and ask others to help with the smoke testing -- some of them will even appreciate the opportunity to help a classmate.
      Note that concepts you encounter while doing course project tasks (e.g., smoke testing) are in the scope of the final exam.
  3. Create a new release on GitHub (e.g., v0.2) and upload the JAR file.
    • Recommended to refrain from uploading multiple JAR files as this can cause extra work for the evaluators.
Duke A-Release: Release

tP: Plan the Iteration

Intro to tP Week 7

In this week, we get ready to start tP iterations. We start by planning the first iteration.

1 Ensure you know tP expectations

  • If you haven't done so already, make sure you know individual and team expectations of the tP

2 Plan the next iteration (v1.0)

  • Plan the next iteration. As you know, you should follow the breadth-first iterative process. Therefore, first you must decide what functionalities should be in the product if you had only two weeks to implement it. You have done that already when you chose user stories for v1.0, translated that to features, and even drafted the UG based on those features. You can tweak that plan further at this point if you wish.
    • Aim to produce a working MVP at the end of this iteration even if the functionalities are not polished (polishing can be done in a later iteration).
    • Avoid depth-first implementations: "I'll do the back-end part of feature X in this iteration" is not acceptable as that is not in the spirit of breadth-first iterative process. Remember, we are pretending this to be the last iteration; why would you implement the back-end part of a feature in the last iteration?
      It is OK to add simpler versions of bigger features, but not OK to add partial features that can't be used yet.
  • Divide the work among the team members i.e., the work required for the current iteration.
  • Reflect the above plan in the issue tracker by creating and assigning issues to yourself and to the corresponding milestone. The panel below explains the full workflow we prescribe you to follow in the tP.

3 Start the next iteration

  • Stronger teams are welcome to stay one week ahead of the tP schedule. So, feel free to move on to next week's tp tasks, and get started on the next iteration (i.e., v1.0).