程序代做CS代考 SOFT2201 Tutorial 8 Code Review – cscodehelp代写

SOFT2201 Tutorial 8 Code Review
Code Review
Reviewing code is something that is probably 1% theory and 99% practice and experience. So for the majority of this tutorial we will simply be reviewing code.
There are a few key rules to remember when it comes to reviewing code:
• Code is written by humans (or written by code written by humans, etc. etc.). You should always remember that there is a person behind the code you are reviewing. The review should contain constructive, polite criticism that addresses issues in the code, not issues in the author – this is the most important requirement
• You will not catch 100% of everything, and it is inefficient to try
• Code reviewing is difficult – you will burn out on large amounts. Divide and conquer and your reviews will improve
• Reviewing code is a separate skill to programming – being good at one helps the other, but isn’t the same as the other. Practice both.
For our tasks today we will be using Ed workspaces rather than your own machines.
To support this as a process with all students in the lab changing task at the same time we need to drive things a little faster and harder than in previous tutorials – so there are time limits given for each step.
1

Question 1: Informal Review: Pair Programming
You will be given 50 minutes in total for this question.
Code review normally requires a minimum of 2 people (you can review your own code, but this is not nearly as effective). You will be allocated to a group of 2, with one group of 3 if necessary. If you ened up in a group of 3 you will need to work a little faster to get things done. In your group of 2, 1 person will start as the Driver, and the other as the Navigator. If you are in a group of 3, you will need to rotate through these roles – don’t have 2 drivers or 2 navigators at the same time as this can lead to a Too Many Cooks issue—1 person should be watching in silence (if you have a brilliant idea or see a horrifying bug then ask to swap roles first).
Your task is to implement a Library system. This system should support multiple types of media (Book[Fiction, Non-Fiction], E-Book[Fiction, Non-Fiction], DVD, VHS, Video Game, etc.), and have Borrowers. You do not need to implement a UI for this system. The library has a certain number of each individual Media item (electronic versions i.e. e-books are infinite), these Media can be borrowed by borrowers if the library has stock, and returned.
You should implement this system using the Pair Programming development method. There are many individual ways to do this – your tutor will guide you today.
The specific timetable is as follows:
• 10 minutes: Introduction and pairing
– Go to the corresponding tutorial workspace on Ed (e.g. T08A) that your tutor has set up for you
– One group member creates a folder with the name “member1_member2”
– The other group members find and join the folder just created
– You will do your programming within your group folder from now on
• 10 minutes: First session
• 10 minutes: Second session
• 10 minutes: Third session
• 10 minutes: Fourth session (if you won’t finish your code, then add a brief README of the plan for the missing code to help later reviewers.)
• Finish: Stop coding
At each session change you will be instructed to swap roles within your group. If you have already swapped roles, or you are not at a good place to swap, this is fine – but you need to ensure everyone has a chance to do both roles (again those in groups of 3 will need to work harder and faster).
Some groups will find this easier than others. If you get the given functionality done, extend your code. You could add due dates and late fees, more types of media, a CLI user interface, or Employees.
SOFT2201 Code Review
Software Construction Page 2 of 3

Question 2: Semi-formal Review: Audit
You will be given 50 minutes in total for this question.
If you’ve ignored the instruction to stop coding, stop coding. Wherever your code was up to is where it stops.
Every group must now rotate to a different group’s folder in the Ed workspace. Choose the group whose folder is listed after yours in the workspace. Create a text file in their folder named “re- view_yourmember1_yourmember2.txt”. You will now review that group’s Library system, specifi- cally looking for the following:
• Bugs
• Poor design
• Unmaintainable code
• Style Issues
• Functionality/Validation issues (these should be rare as the specification is very vague)
• In addition any instances where the opposite is true (like good design or clever solutions)
Remembering the key rules above, review the code you see. Note down any observations you make in the group’s notepad window.
You will be reviewing 2 groups:
• 5 minutes: Preparation
• 15 minutes: Review your first group
• 15 minutes: Change to the next folder and review your second group • 10 minutes: Return to your own group folder and read your feedback
The last step can be done in the main room. If there is time remaining, discuss the process you have just been through (review the reviews).
SOFT2201 Code Review
Software Construction Page 3 of 3

Leave a Reply

Your email address will not be published. Required fields are marked *