Mentored coding is working on solving a coding problem with the mentorship of a volunteer or member of CYF staff.
Why
Mentored coding is an excellent way to develop programming and communication skills.
Coding mentors can provide feedback on trainees’ code quality and problem solving approach.
Mentored coding prepares our trainees for technical interviews when they’ll code in front of other people and be expected to talk confidently and clearly about the code they are writing.
How
We assign mentored coding as a coursework assignment throughout the course. Each session should last between 30-60 minutes.
Before a mentored coding session, learners should decide what they’re going to pair on and share this with the mentor, e.g. by sharing a link to a particular Codewars exercise, a particular piece of coursework, or some other problem.
During mentored coding, the learner should:
- Explain their thought process
- Break down the problem
- Plan what code to write
- Write all of the code
- Check that it works
The mentor should:
- Ask questions to get the trainee thinking. It’s always better to ask than tell.
- Help the trainee think about breaking down the problem
- Support the trainee if they encounter hurdles
- Stretch the trainee by bringing up edge cases or complications
Arranging a session
A trainee that wants to do mentored coding should:
- Visit the
#cyf-mentored-codingslack channel - Book a time using a mentor’s calendar
- If you do lots of mentored coding, try to book with different mentors to get more diverse help
A volunteer that wants to be a coding mentor should:
- Create a bookable calendar for 30 minute appointments, something like Google Calendar or Calendly works well
- Share your calendar in the
#cyf-mentored-codingslack channel and canvas page (link at the top of the channel) - For your first mentored coding sessions, ask another mentor to shadow you to get feedback on your approach
Tips for learners
When approaching a problem, you need to explain your thought process, plan out what to do, write the code, and check that it works.
If you jump in to writing code without explaining your thinking, it will be more difficult for the mentor to offer you help.
Tips for mentors
The goal is teaching: Rather than driver/navigator pair programming you may use in your work, where the goal is to produce code for a project, the goal of mentored coding is to teach a trainee how to become self sufficient when faced with a programming challenge. The ultimate goal of mentored coding is to get the trainee in a position where the next time they encounter a similar problem, they will be able to solve it better than they did this time.
Help people learn: Most of the exercises the trainees are doing aren’t useful in their own right. The point is for the trainee to learn and grow through them. Focus on understanding, and techniques that will help solve the next problem.
Don’t take over! It’s important trainees get used to figuring things out. Provide guidance and assistance but trainees need to struggle to overcome any obstacles with understanding and technical communication. It can be uncomfortable to watch someone struggle, but make sure they’ve considered and tried all of their ideas before you intervene.
Give honest feedback: Trainees can’t develop if they don’t receive honest feedback about their progress.
Ask questions! Asking a clarifying question can help learners discover errors and often promotes more thoughtful responses. Asking is better than telling. Asking questions also helps to avoid long silences, and it can help push a trainee who is stuck and doesn’t know how to proceed.
Encourage re-usable techniques: Reinforce techniques like reading error messages carefully, looking up documentation, and thinking about edge cases. You might feel tempted to search for something on your own screen, instead ask the trainee to do it and this will help them learn the right kind of things to search for if they get stuck.