4 tips for mentoring developers
Daniel Irvine đłď¸âđ
Posted on October 1, 2017
A significant part of my job is mentoring junior developers. Being a mentor is like being a tour guide. Youâve got to show people everything there is to see, moving them along at just the right speed. But be warned: go too fast and they won't take everything in; go too slow and they'll be bored.
Here are some ideas that have worked for me.
1. Donât give overly specific feedback on code
A large part of technical mentoring is reviewing code. Unfortunately when some people hear âreview this code please they reply âsend me a pull request so I can make commentsâ. This then leads to line-by-line nitpicking, which is the style of reviewing thatâs encouraged by code review tools like GitHubâs pull requests.
Contrast that with verbal, face-to-face feedback, when weâre more likely to be less detailed and focus on the bigger issues. Not to mention that with verbal communication weâre having a two-way dialogue that will undoubtedly generate more insights for everyone involved.
Whatâs the issue with commenting on style? Well, I think that design sense comes about through exploration, not from being given rules to follow. Recently one on my mentees had a question about this line of Java code:
new EventProcessor().process(event);
Their question was this: since the EventProcessor instance is only created to call one method, would it make sense to make the method static?
EventProcessor.process(event);
This is a stylistic question. There is nothing incorrect about the original code, and changing this method to be static would have no functional impact. Whatâs more, thereâs a third option:
private final EventProcessor eventProcessor = new EventProcessor();
...
eventProcessor.process(event);
Which is the correct style? Iâd rather not say. I prefer to let the mentee figure that out for themselves.
Design sense requires practice. Write 1,000 loops and 1,000 functions and youâll eventually understand them. With my mentor hat on, I care if the code works and is âclean enoughâ, not that it is perfect or looks exactly how Iâd write it.
Yes, knowing how to write perfect code is an important skill to learn, but it doesnât need to be the teaching point of every exercise.
2. Walk the fine line between under-challenged and over-challenged
If you're workplace has a mentorship or apprenticeship scheme, you may be setting exercise work for your mentees. For optimum learning, each exercise you set should be slightly more challenging than the one before.
In practice this means that everyone you mentor should get a work plan that is tailored to them. A syllabus is helpful but it should contain enough opportunity for variation that you can ensure each mentee is suitably catered for. Going off-piste should be the norm, not the exception.
I do this by thinking through all the algorithms, programs and libraries Iâve written throughout my career and determining what would work for my mentee. As mentor you should make sure that you have a large variety of exercises to choose from, and always been on the lookout for more.
3. Estimation skills are crucial
When developers are at the very start of their career, they have little understanding of what theyâll be able to achieve in a certain period of time. At some point, however, theyâll want to feel in control of their skills. Theyâll want to know with some certainty that they can deliver software within a certain amount of time. In order to get that sense of control, theyâll need to know how to estimate their work.
Get this wrong, and you could end up with developers taking on too much work and continually being overworked. Overworking is an all-too-easy trap to fall into. Itâs important that junior developers learn to work at a sustainable pace. Good estimation skills can make that happen.
4. Learn to listen
The most important skill we can have as mentors is our ability to listen. Writing code is the easiest part of our jobs, and itâs easily taught. Listening to someone, understanding what they need, figuring out how to help them... well, thatâs tough. When Iâm with my mentees, my mental focus is almost always on how the mentee is doing emotionally. Learning to decipher what they are saying and to figure out what they are really saying. Are they energized? Are they struggling? Are they happy, frustrated, anxious, exhausted? What do they need right now to help them succeed?
Iâm sure my ideas of mentorship will continue to evolve, and Iâd be curious to hear thoughts from you as well, so please get in touch!
Posted on October 1, 2017
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.