We assign a mentor—a colleague who has more experience—to every new team member (mentee). Some of the mentor's responsibilities are:
Help with onboarding—a new colleague will have a lot of questions about team processes, tools and stuff not related to programming. The mentor is the first person who should help them and lead them in the right direction.
Project participation—the mentor should be involved in the projects the mentee is working on. The mentor should know the story behind the project and have an overview of every project phase. This is important as it enables them to help the mentee with the architecture, planning, and tasks. The mentor should feel responsible for their colleague's projects.
Task specification—if the mentor gives tasks to the new colleague, first they should take enough time to define the tasks well. Every task should be explained, and it should be clear to the mentee what needs to be done.
Pull requests—the mentee should send a pull request for every new feature and assign the mentor to review it. Pull requests should be short and include only one feature. Multiple features should not be mixed in one pull request. The mentor should take some time to review every pull request that they receive and give advice on how to make the code better. The mentor should not write the code instead of the colleague, but only show them how to write quality stuff. Each advice should include an explanation and some info on how it improves the code.
Give feedback—from time to time, the mentor should give feedback to the mentee on their progress. The mentor should tell them what they do well and what can be improved. Feedback is very important for every team member.
Report to team leader and management—the mentor should periodically report on the colleague's progress to the management. The mentor should know best how their new colleague is getting along and they should communicate that to the team leader and management.