A bit of context: as well as being a super-hard-working maths student (...), I am a peer mentor for eight first-year students who have just started maths courses at the university. I am, in fact, a 'lead' peer mentor - generally speaking this doesn't entail much more work than the peer mentoring itself, but occasionally there is a little bit of work to be done around the management of the peer mentoring scheme within the department.
A little while ago, I was sent an email by the maths department's Director of Studies asking if I would mind helping to mix up and then divide the new intake of maths students between the 42 peer mentors. Attached to this email was a list of the names of the new students in an Excel spreadsheet.
Skipping forward to the point where I needed to let the other peer mentors know who they needed to contact, I decided that seeing as I had nothing else to be doing, I could save my fellow mentors a bit of time by finding the email addresses of the new students myself on the university computing system.
Four or five names in, however, I was already reassessing my benevolent decision - faced with another 320-odd names, and not willing to admit defeat, I decided to see if I could somehow automate the process.
Seeing as I was working in Excel, I came up with the idea of writing a VBA program that would:
Open my webmail client
Search for a person
Copy their email address into the Excel spreadsheet, next to their name
A lot of experimentation and a lot of digging around in HTML source code later, a very rough-and-ready, very situation-specific, but nonetheless functional program did eventually emerge.
Here's the code:
And here's the program in action:
Writing the program, and running the whole list of names through it, probably took much longer than it would have done to find the email addresses manually; and certainly it would have been much easier to take the divide-and-conquer approach and ask the other mentors to find their own mentees' email addresses themselves. However, I did feel immensely proud of myself for rising to the challenge I had set myself, for creating a working program in a language I wasn't too familiar with and for helping out my fellow mentors.
The following day, I was sent an updated list of names by the department - with an extra column containing each student's email address.