JS1 Module Project: Code review #421
Description
Which module(s) and week(s) does this change affect?
Module(s): JS1
Goals
- Drive insights around the idea that different people have different perspectives on code (e.g. author vs reader).
- Get trainees used to both giving and getting feedback.
- Get trainees thinking about how to usefully explain/suggest ideas/improvements.
- Introduce trainees to the idea of code review.
- Get some experience with the GitHub UI.
Idea
Each week, pair up trainees randomly, and give them each two exercises. For each exercise, one trainee will be the reviewer, and one the reviewee. Each trainee should do both roles for the two exercises in the week.
Both will be given some code which has problems in it.
The reviewer will additionally be given a list of problems, with explanations of what's wrong, and examples of better code.
The goal of the reviewer is to make comments on a pull request to guide the reviewee to improve the code. We expect this to take place over multiple iterations over a week, as part of coursework.
Ideally the material being reviewed should be material the trainees are fairly comfortable with, and reinforce, but should not be pushing their knowledge too far - we want the trainees to be able to mostly focus on the code review aspects, and not get bogged down in one or both of their pair not well understanding the code itself.
Rules of the game
We need rules for the reviewer, to avoid them just giving replacement code. Something along the lines of:
- Every comment should contain a question pointing out a problem, not a solution.
- No code is allowed in comments.
- Links to reference material is strongly encouraged.
Suggested subject matter for each week
Week 1: HTML/CSS (e.g. adding/improving aria labels, factoring out common CSS into common rules, removing redundant CSS)
Week 2: Variable / parameter naming, duplicate code
Week 3: Loops, boundary conditions, more naming
Week 4: Choosing between for loops/forEach/map, pulling out chains.
Throughout, but particularly in week 4, we should make clear how to escalate for more help if the trainees find themselves out of their depth, probably by @-ing a mentor to help out. The same rules of the game should apply to mentors as to trainees.
Open questions
- What's our measurable outcome of this work? Possibly something around a a portfolio of useful comments left, and something around the nature of the comments (e.g. STAR).
Who might need to know about this change?
@CodeYourFuture/syllabus-team - I'd love to talk this through in our meeting this week, I'll try to put together some example code before then.
Metadata
Metadata
Assignees
Type
Projects
Status