Day 6: Scissors Paper Stone Redux
- 1.Play partner's game on your machine.
- 2.Read partner's code.
- 3.Edit and discuss code together.
- 4.Improve each other's projects.
On days when projects are due, we will review each others' code in groups of 2 or 3 during class. If there is a group of 3, the triplet will do individual code review together so that everyone gets to review someone else's code, then split into 2 groups for pairing.
Open the code in the browser and test it. What does it do? If you're not sure what it does look inside
Read the code:
- 1.How does it work?
- 2.Does it have any obvious errors?
- 3.Does it implement something that you were trying to do?
- 4.Does it implement a feature that you haven't started yet? How does the code work?
Code Review Reflection Questions
While you are reading, note down the answers to the following questions: No need to be comprehensive, but pick out parts of the code you found notable.
- 1.Note a line of code (or multiple lines) that you think works well. This could be the logic of the code, or just a well-named variable. Explain why it works well.
- 2.Note a line of code (or multiple lines) that you thought was unclear or you can't figure out. How would you explain why is it unclear or hard to figure out?
- 3.Note a line of code (or multiple lines) where you found a bug. Why is it a bug? Do you have a solution?
It may be helpful to make changes to the code to help you understand it better. Write some
console.logthat would help you figure out what the code does. Break the code in a certain way to prove how it works or doesn't work.
Once both partners are done with #1-4, discuss what you saw. Read out and review together the answers to the 3 questions you wrote down from above.
You'll be pair programming on one person's project at a time.
The driver will be the person who is _not_** working on their own code.**
Work on the game in the following order:
If there are any errors or bugs in a project, pair to fix those problems.
If there were any features you wanted to implement but couldn't, use this time to pair-program your desired features, or anything else you'd like to see in your game.
If you have nothing else to add, here are some ideas:
Your pair will turn the Scissors Paper Stone game into a Multi game app. Add a mode for a new "guess the secret word" game. The user will type in "word game" (or any secret phrase of your choice) to switch to this mode.