|
| 1 | +# Mentoring Tips |
| 2 | + |
| 3 | +## Mentoring Notes |
| 4 | + |
| 5 | +One of the biggest helps to mentoring can be to have a file to hold notes for each exercise you mentor. |
| 6 | +You may find that many solutions can benefit from the same suggestions, so, by keeping notes, |
| 7 | +you don't need to keep writing up the same suggestions from memory. |
| 8 | +And, by having the suggestions in one place, you can keep refining them over time to make them clearer. |
| 9 | + |
| 10 | +If you're not sure how to get started with your notes, you may find a `mentoring.md` file for your track's |
| 11 | +exercise under [exercism/website-copy/tracks][website-copy]. |
| 12 | +If it exists, it may include examples of reasonable solutions, along with common suggestions and talking points |
| 13 | +to prompt further discussion. |
| 14 | +If it doesn't exist, you may want to go back and create one after you've made your own file of notes for that exercise. |
| 15 | + |
| 16 | +Also, even if you only mentor one language now, you may mentor more in the future. |
| 17 | +It may help to organize your mentoring notes by track as well as by exercise name, as different tracks will likely require |
| 18 | +different suggestions for the same exercise. |
| 19 | + |
| 20 | +Mentoring notes are handy, whether you mentor the exercise frequently or infrequently. |
| 21 | +If you mentor the exerise frequently, it saves a lot of typing from scratch, when you can just copy-and-paste from your notes. |
| 22 | +If you mentor the exerise infrequently, it can remind you of suggestions to make that you may have forgotten in the weeks or months |
| 23 | +since you last mentored it. |
| 24 | + |
| 25 | +It's okay for mentoring notes to differ between mentors. |
| 26 | +Here is one way to structure them, but it is not the _only_ way. |
| 27 | + |
| 28 | +Congratulate the mentee on passing the tests (if they passed them). |
| 29 | + |
| 30 | +If the exercises has been sitting in the queue for a few days, maybe address that with something like: |
| 31 | + |
| 32 | +>Sorry it took a while for someone to get back to you. |
| 33 | +>There is currently a shortage of active JavaScript mentors for `Resistor Color Duo`. |
| 34 | +
|
| 35 | +Itemize what you like about the mentee's solution. |
| 36 | +For example: |
| 37 | + |
| 38 | +- I like this solution is succinct and readable. |
| 39 | + |
| 40 | +- I like the use of `indexOf`. |
| 41 | + |
| 42 | +- I like this uses the `(first * 10) + second` approach to avoid casting between number to string back to number. |
| 43 | + |
| 44 | +- I like this does not use looping/iteration. |
| 45 | + |
| 46 | +- I like the destructured parameter. |
| 47 | + |
| 48 | +Next could come your frequent suggestions. |
| 49 | + |
| 50 | +~~~~exercism/note |
| 51 | +It can be very helpful for the mentee if a link is provided for each new language feature you introduce. |
| 52 | +For example: |
| 53 | +
|
| 54 | +>It's not necessary for this exercise, but perhaps consider converting the function to an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions). |
| 55 | +~~~~ |
| 56 | + |
| 57 | +Although we don't want to give away the solution, sometimes a mentee learns best by example. |
| 58 | +To put a snippet of code in a collapsed details section can provide that example, which the mentee can choose to expand or not. |
| 59 | +For example: |
| 60 | + |
| 61 | +<details><summary>Spoiler Example</summary> |
| 62 | + |
| 63 | +<pre> |
| 64 | + |
| 65 | +export const decodedValue = ([firstColor, secondColor]) => |
| 66 | + COLORS.indexOf(firstColor) * 10 + COLORS.indexOf(secondColor) |
| 67 | + |
| 68 | +</pre> |
| 69 | + |
| 70 | +</details> |
| 71 | + |
| 72 | +Toward the end of the notes you might include a link to a published solution which represents the suggestions in full. |
| 73 | + |
| 74 | +At the very bottom of your notes you may want to put extended explanations that mentees sometimes ask for. |
| 75 | +These explanations don't come up often, but it can still be good to record them the first time you use them, |
| 76 | +so the next time, which could be weeks or months away, you won't have to come up with the explanation from scratch. |
| 77 | +For example, sometimes a mentee will ask about how the multiplication approach would work for Resistor Color Duo |
| 78 | +if black was the first band for a leading zero: |
| 79 | + |
| 80 | +>Black for a first band is a good point to consider, so let's consider it. |
| 81 | +>The resister color is meant to represent the amount of ohms for the resistor, |
| 82 | +>and a leading zero would not be used for a multi-band resistor. |
| 83 | +>So black would not be a first band. |
| 84 | +>Besides, `parseInt` or `Number` will also remove the leading zero. |
| 85 | +
|
| 86 | +An optional cateory of data to keep in mentoring notes is a record of benchmarks for various solutions or approaches. |
| 87 | + |
| 88 | +## Benchmarking |
| 89 | + |
| 90 | +A common concern for mentees is how performant their solution is. |
| 91 | +This is especially the case for "lower-level" languages such as C, C++, Go, and Rust. |
| 92 | +Along with how idiomatic their code is, mentees of other languages are also often concerned with the efficiency of their code. |
| 93 | + |
| 94 | +~~~~exercism/notes |
| 95 | +Benchmarking is not something that a mentor is _expected_ to do. |
| 96 | +However, mentees are often particularly impressed by how a benchmark of their solution compares with other approaches. |
| 97 | +~~~~ |
| 98 | + |
| 99 | +Go is a particularly friendly track for benchmarking, as benchmarks are often included in the test file. |
| 100 | +Other languages may require some research to determine what method would work best for you. |
| 101 | +For instance, if you only use the online editor, then you would be looking for a place to run benchmarks online. |
| 102 | +For example, [JSBench.me][jsbench-me] is an online benchmarker for JavaScript. |
| 103 | + |
| 104 | +If you run code locally, then you have the option of downloading benchmarking software you can run on your machine. |
| 105 | +For example, Rust can use [Criterion][criterion], or [cargo bench][cargo-bench] with [benchmark tests][rust-benchmark-tests]. |
| 106 | + |
| 107 | +There are at least a couple ways to keep track of benchmarks. |
| 108 | +One way is to keep a running list of all the ones you benchmark, but that can get unwieldy if the list gets long. |
| 109 | +Another way is to keep a list of repesentative benchmarks for different approaches. |
| 110 | +Mentees often want to see the code for the faster approaches, so if a faster approach is published, |
| 111 | +it will likely be much appreciated to provide the link to it. |
| 112 | + |
| 113 | +~~~~exercism/caution |
| 114 | +If providing a link to a solution you benchmarked, be sure to provide a link to the published solution and not to the mentoring session. |
| 115 | +Not all solutions that are mentored get published. |
| 116 | +~~~~ |
| 117 | + |
| 118 | +## Mentoring Notes That Are Not Exercise-Specific |
| 119 | + |
| 120 | +There may be some features of the language that you find addressing for more than one exercise. |
| 121 | +When about to copy-and-paste a suggestion from one file to another, perhaps consider putting it into its own file instead. |
| 122 | +Again, a benefit for keeping a suggestion in one place is to make it easier to refine over time. |
| 123 | +It also makes it easier to find when using it for an exercise you haven't used it before. |
| 124 | +Rather than trying to remember in which exercise you addressed the suggestion before, |
| 125 | +you can go right to the suggestion's own file. |
| 126 | + |
| 127 | +## When a Mentee Has a Question |
| 128 | + |
| 129 | +Mentees are encouraged to specify what they expect to get from the mentoring session. |
| 130 | +They will often express that in the form of a question. |
| 131 | +If the question is something for which you don't know the answer and are not interested in, |
| 132 | +it is okay to leave the mentoring request for another mentor. |
| 133 | + |
| 134 | +If you don't know the answer but want to find it, then it may be best to not pick up the mentoring request until you've learned the answer. |
| 135 | +If the mentoring request is gone by that time, at least you've learned something and didn't make the mentee wait. |
| 136 | + |
| 137 | +One exception to this may be if the mentoring request has already been in the queue for several days or longer. |
| 138 | +In that situation you may want to pick up the mentoring request and give what feedback you can, |
| 139 | +and let the mentee know you will get back to them on their question. |
| 140 | +Of course, it is important to follow up on that, either to inform the mentee of the answer, or to let them know you couldn't find it. |
| 141 | +If you couldn't find the answer, it may be helpful to the mentee to describe what ways you took to try to find the answer. |
| 142 | +The mentee may respond with other ways to try to find the answer. |
| 143 | +Between the two of you, the answer may be found. |
| 144 | + |
| 145 | +If you have exhausted every way you know of to find the answer, you can suggest the mentee end the discussion and resubmit their request |
| 146 | +on the chance that another mentor may provide the answer. |
| 147 | +If they care to, the mentee can post on the ended discussion to share the answer with you once they learn it. |
| 148 | +And likewise, if you learn the answer later, you can go back to the ended discussion and let the mentee know. |
| 149 | + |
| 150 | +If you do know the answer and want to address it, a good place to do so is in between telling the student what you like about their solution |
| 151 | +and offering suggestions for other approaches. |
| 152 | + |
| 153 | +### Failing Code |
| 154 | + |
| 155 | +Code can fail either because it does not pass all the tests or because it doesn't compile or satisfy the interpreter. |
| 156 | + |
| 157 | +Different mentors will have varying inclinations and/or patience for dealing with failing code, which may somewhat depend on how it is presented, |
| 158 | +as failing code is not always presented in the same way. |
| 159 | + |
| 160 | +Sometimes a mentee will try say that they tried another approach and it didn't work, and they will ask why it didn't work. |
| 161 | +The code may not even be provided, or it may be posted in a practically unreadable comment instead of in an iteration. |
| 162 | + |
| 163 | +A solution tested in the web editor can only be submitted for a mentoring request if it has passed all the tests. |
| 164 | +One of the reasons is so the mentor can focus on suggesting improvements or other approaches to the existing working code. |
| 165 | +_Debugging_ code is not necessarily something a mentor wants or is expected to do. |
| 166 | +However, a failing solution submitted through the CLI can be submitted for a mentoring request, with the student asking for help to solve it. |
| 167 | + |
| 168 | +If the failing code has not been provided, and the described failing approach does not sound like a good one, it may be enough to suggest that, |
| 169 | +instead of using the failing approach, another approach could be one that is neither the failed approach or the one they used that did pass. |
| 170 | +Or it may be enough to explain why the approach they used is better than the failed approach, |
| 171 | +without getting into the details of what bug was in the failed approach. |
| 172 | + |
| 173 | +For example, a common occurrence is mentees having trouble with Robot Name. |
| 174 | +Either the tests time out or they fail to generate enough names, and they want to know how to fix it. |
| 175 | +If you have the inclination and the patience, you can certainly analyze their code and suggest how to address the problem. |
| 176 | +Or you can explain that checking randomly generated names causes more collision as more names are generated, |
| 177 | +and suggest that another approach could be to generate the names sequentially and then shuffle them. |
| 178 | + |
| 179 | +If the failing code has been pasted into a practically unreadable comment, |
| 180 | +you may want to give what feedback you can on the passing solution, |
| 181 | +and suggest they submit the comment code as another iteration. |
| 182 | +You can also suggest that the mentee then check the errors for the failing iteration as a guide to where the problem is. |
| 183 | + |
| 184 | +If the code is in a failing iteration, then it can be helpful to direct the mentee to check the errors for the test run. |
| 185 | +Some languages need a bit more guidance on how to read errors or test results than others. |
| 186 | +It may be helpful to quote one or more parts of the errors and explain to the student what is meant. |
| 187 | + |
| 188 | +Ultimately, it is not the mentor's responsibility to fix the mentee's failing code, |
| 189 | +but the mentor, if they want to, can suggest ways to the mentee for fixing it themselves. |
| 190 | + |
| 191 | +## Dealing with the Queue Continuum |
| 192 | + |
| 193 | +It may be that you sign on to mentor a track, but you never see any exercises in its queue to mentor. |
| 194 | +You may think that something is wrong, but there are at least a couple reasons for this. |
| 195 | +One reason is that people may not be requesting mentoring on the track for now. |
| 196 | +Sometimes a track may have periods of inactivity. |
| 197 | +Another reason is that other mentors may be picking up the requests before you see them. |
| 198 | +This is likely to happen for a popular track that has many active mentors. |
| 199 | + |
| 200 | +If there are many requests in the queue, there are a few ways to approach mentoring them. |
| 201 | +You may want to work from the oldest to the newest, so those who've waited the longest are dealt with first. |
| 202 | +Or, you may choose to work from the newest to oldest, especially if the oldest have already been waiting a long time. |
| 203 | +That way, people who have been recently active don't have to wait for the backlog to be handled. |
| 204 | + |
| 205 | +If there are multiple requests for the same exercise, you may want to work through them in batches of the same exercise to maintain focus, |
| 206 | +as opposed to going from exercise A to exercise B back to exercise A. |
| 207 | + |
| 208 | +It may be that a request for an exercise that you are not interested in has been sitting there for days or weeks. |
| 209 | +You can choose to not address it in hope that another mentor will pick it up, or it may serve as motivation to give the exercise a try yourself. |
| 210 | +One thing that may be helpful is to look at the submitted solution. |
| 211 | +It may use an approach that you hadn't thought of, and that approach may make solving the exercise more attractive to you. |
| 212 | +But, if you look at the code and are still not interested in solving the exercises, there is no harm done. |
| 213 | +Just because you look at a mentoring request doesn't mean you have to click the "Start mentoring" button. |
| 214 | + |
| 215 | +[website-copy]: https://github.com/exercism/website-copy/tree/main/tracks |
| 216 | +[jsbench-me]: https://jsbench.me/ |
| 217 | +[criterion]: https://crates.io/crates/criterion |
| 218 | +[cargo-bench]: https://doc.rust-lang.org/cargo/commands/cargo-bench.html |
| 219 | +[rust-benchmark-tests]: https://doc.rust-lang.org/unstable-book/library-features/test.html |
0 commit comments