/pfmcpp_task_template

PFM::C++ For Musicians template for course Tasks

Primary LanguageC++

PFM::C++ For Musicians Repl.it project template

DO NOT EDIT the .replit file or this README.md file.

Welcome to PFM::C++ For Musicians

IMPORTANT

Please set your Github username, your Slack username, and your Repl.it username to the SAME name.

This helps me keep track of which repo goes with which repl.it, and which repl.it goes with which slack user when you submit tasks.

Clone this project template to your Github account

Sign in to your Github account you created in the PFM Chapter 1 videos.

You're going to import this repository into your github account.

Click the green Clone or Download button and copy the HTTPS url.

  1. Click the [+] button and choose "Import Repository"

  2. Paste the Clone or Download URL in the appropriate field.

  3. In the name field, enter the abbreviated name of whichever video you're on.
    For example, if you were watching Chapter 2 Part 3 - Declarations, you would put pfmcpp_ch2_p03 in the Name field.

  4. Make sure you set the repository's privacy as public

  5. Once the repository has been imported, you're going to add a Collaborator: matkatmusic

  6. Click Settings to access the repository settings. Click on Collaborators. Enter matkatmusic.

  7. Click on my name to add me as a collaborator.

  8. Send me a DM in Slack letting me know you added me.

Github will send me an invite link but I might miss it, so DM me. You can proceed to the next section without waiting for me to accept the invite.

Import this project into your Repl.it account.

  1. Visit https://repl.it/login

  2. Sign up and use Github as the means of signing in. It will be the middle button on that page, in between Google's G and Facebook's f. When you pick a user name, please pick the same name that you use in Github/Slack

  3. Once you're logged in to Repl.it, click Import Repo on the upper right. If it prompts you to sign up for the Hacker plan, just click Cancel or click outside of the prompt.

  4. Repl.it may ask you to grant it permission to access your Github account. If so, grant it access.

  5. You should see the repo you just cloned listed under your repositories. Choose that repo. Repl.it will clone your repo. You should see some text like this on the right-hand pane:

cloning into https://github.com/youraccount/pfmcpp_ch2_p03...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0
From https://github.com/youraccount/pfmcpp_ch2_p03
 * [new branch]      master     -> origin/master
origin/HEAD set to master
HEAD is now at 1badb5c Initial Commit
  1. Once Repl.it finishes cloning your repo, click the Invite button.

  2. invite matkatmusic as a collaborator via the Search by username field at the bottom of the popup.

  3. send me a DM in Slack letting me know.

  4. Click on the file browser on the left, and select main.cpp.

I will join your repo and add the assignment

  1. Once I accept your invite to collaborate on GitHub and Repl.it, I will edit main.cpp and add the assignment.

  2. Once I commit and push the assignment, I'll be waiting on you to do the work.

  3. Refresh the Repl.it page, switch to the version control view on the left, and click "pull" when it prompts you to update.

Make a branch

  1. in Repl.it, you can make a branch [+] via the Source Control widget on the left. Make a branch

  2. complete the assignment instructions. Do not delete the instructions.

  3. This course loosely follows the JUCE Coding Standards: https://juce.com/discover/stories/coding-standards The easiest way to show the coding style is with a short snippet:

//no spaces around '(', spaces around '=', variable names are relevant 
bool rentACar(int rentalDuration, int carType = 0)    
{   //curly braces go on their own line                                                  
    ignoreUnused(rentalDuration, carType);   //indentation is set to 4 SPACES.  set this in Repl.it settings
    return true;
}
                           //a blank line between functions or types.
struct RelatedType //Types begin with a capital letter and use CamelCase
{
   double val, optimalVal; //member variables use camelCase, and begin with a lowercase letter.
                           //a blank line between member variables and member functions
   void setTypeToRelateTo(const OtherType& typeToRelateTo);  //member functions follow the same style guide as regular functions
};

Set the repl.it indentation to '4' in the repl.it settings on the left.

  1. Once you complete the instructions, or if you get stuck, commit your changes on the branch. If Repl.it prompts you that it is Unable to connect to this GitHub repository, click the 'Connect' button. Make a small change (like adding a space somewhere) and try commiting again. You can click on the commit message itself to be shown the commit in your Github repo.

  2. Send me a Direct Message in Slack that you committed your completed assignment, including the link to your Repl.it

  3. I will review the assignment.

    • If it's completed to my satisfaction, I will ask you to go to Github and create a Pull Request.
    • If it's not completed to my satisfaction, I will add some FIXME's to the code which will break compilation. You'll need to read the error messages, fix the code, and commit your changes, which I will then review.

Create a Pull Request (PR)

  1. Click on Pull Requests in your repo.

  2. Click the [Compare & Pull request] button for your recently pushed branch.

    • Make sure it says Able to merge on the page that appears.
    • You can enter a message if you want.
  3. On the right side,

    • under Reviewers, request 'matkatmusic'. By doing this, you are requesting that I review your code.
    • under Assignees, assign 'matkatmusic'. By doing this, you are assigning me the task of reviewing your code.
  4. Click 'Create pull request'. After the pull request is created, Do not click 'Merge pull request'.

  5. Wait for me to merge it, since you assigned it to me.

Wait for me to merge the PR

  1. Once I merge the PR, I will either

    • clear out the instructions and replace them with new instructions on the master branch, or
    • Ask you to create a new project from this template, following the same steps as before.
  2. if I replace the instructions, You will then make a new branch for these new instructions, and repeat the process.

  3. if I ask you to create a new project, I also want you to share your completed task to the appropriate channel. To do this:

  • a) visit your Repo on github
  • b) click on Commits
  • c) in the list of commits, look for the one I merged
  • d) Look for the [<>] on the right. If you hover over it with your cursor, it will say Browse the repository at this point in the history
  • e) Click on it. the url will change to something like pfmcpp_ch2_p03/tree/654abd564d65b4c5645e654f654g.
  • f) Share this URL in the channel for the task, as your completed task for other students to look at.
  • "Here's my completed task: https://github.com/.../tree/123456789abcdef"

  • g) Finally, remove me as collaborator from the github repo and repl.it