Exercise Monday

Goal: You've already been pair programming for weeks! However, working in larger groups will require a different workflow and series of tasks. Today we'll practice coding in larger teams and begin laying the groundwork for this week's group projects.

Warm Up


  • When do merge conflicts occur? How can we resolve them?
  • If we're developing a new feature on a branch and are ready to push to master, why do we need to pull from master into the new branch before pushing the new branch into master?
  • What are the two primary ways we can add new code to the master branch?
  • What is a pull request?
  • Can we delete feature branches after they've been successfully merged to master? How?

Code


Complete the following exercise in the same four-person group that you signed up for a group project with. Groups will work in two pairs of two on the same app. Before you begin coding, follow the steps listed in the Workflow section below.

Using the technologies we've covered the last four weeks, create a website for an animal adoption agency with the following features:

  • Pets available for adoption may be added to the site.
  • All pets are displayed on the homepage.
  • Users can click on a pet's entry to see more details.
  • Pets can be marked "adopted" when they find homes.
  • Users can view only animals currently available for adoption.
  • Users can view only animals that have already been adopted.

Further Exploration

  • Users can submit a form to indicate interest in adopting or meeting a pet.
  • Users can view only one type of animal at once (ie: Dogs, cats, lizards, etc.)

Workflow


1. Planning

Decide upon goals for your app. Today, potential features are provided above. Brainstorm your own features, too. Separate all goals into three general categories:

  • Things we need: Features and functionalities absolutely essential to the application. Or, the minimum viable product (MVP). An MVP is a demonstrable prototype of your idea with basic and essential core elements in place.
  • Things we want: Goals that aren't necessary for the minimum viable product, but are still important to your team and overall quality of your application.
  • Things on our wishlist: Goals that are non-essential, but would be great to include if there's enough time. This often includes fun bonus features, and exploring new technologies.

2. Wire-framing

With the 'things we need' or MVP in mind, brainstorm the 'flow' of your application. This doesn't necessarily mean the styling, but how a user will interact with your site. What will greet them on the homepage? Where will they go in order to see X, Y, or Z? How many pages or sections will your site contain? Draft up a general idea of how you'd like today's project to work.

3. Gameplan

Agree upon what each pair will work on. Begin with core functionality outlined in your "things we need" list. Remember, pairs shouldn't only focus on the concepts they're already good at, but should also take this opportunity to practice the ones they may not yet feel confident in.

Also, discuss how each pair will complete the tasks assigned to them. Will they create constructors? Prototypes? Begin implementing user interface logic?

4. Code

On separate branches, begin coding in two groups of two. Remember to commit frequently, including clear and descriptive messages. Review lessons on branching and merging if necessary.

5. Review and Merge

After one group has completed a main feature or requirement listed above, review their code together as a team. Provide constructive feedback. Is it well-refactored? Does it complete the task at hand? Is it easy to follow?

Merge this code into your master branch after everyone has had the opportunity to review it. No code should enter the master branch without being reviewed, refactored, and discussed. Assess and resolve any merge conflicts as a team.

6. Repeat!

Repeat steps 4 and 5 for each feature. As the project develops, you may need to re-assess goals. Sometimes features we expected to complete quickly end up taking the longest. Sometimes the things we anticipate being the most challenging are finished surprisingly quickly. Continue to merge after the completion of each main feature. After you've integrated all "things we need" goals, move on to "things we want", and eventually "wishlist" goals.

Group Debrief


Discuss the following with your teammates at the end of the day:

  • What went well?
  • What could have gone better?
  • How could we avoid similar issues on our group project?
  • What should we do the same on our group project? What should we do differently?
  • What is the minimum viable product for our group project?
  • What are our "wishlist" goals for our group project?
  • How do we want to divvy up work on our group project?
  • What should we implement first?