January 2019

Volume 34 Number 1

[Don't Get Me Started]

Mentoring Again

By David S. Platt | January 2019

David PlattHere I go again. It was two years ago that I wrote about mentoring the software group of my daughter’s For Inspiration and Recognition of Science and Technology (FIRST) Robotics team (see msdn.com/magazine/mt790211). Now I’m gearing up for my third run at it. We’ll be deep in the fray by the time you read this. When am I ever going to learn?

That first year the team did OK. We improved on our previous year’s performance, advancing into the elimination rounds for the first time. We came within three points of reaching the final round in one tournament. But last year we backslid, never reaching the elimination rounds, never even cracking the top half in any tournament. 

I tried to spin it as a learning experience. “Look,” I told the kids. “Engineering projects sometimes fail. If you want to be an engineer, you have to learn to live with that. It’s like being a surgeon: No matter how good you are, no matter how hard you work, some of your patients are going to die. You need to brutally self-analyze, learn what there is to learn from your experience, and move on with your head held high. If you can’t do that, stay home and be an accountant.” I’m wracking my brain as to how we can reverse our fortunes.

I have four students in my software group, one each from senior to freshman. They all have some notion of basic coding. But it’s a huge leap from introductory coding samples to building an embedded real-time program running on rickety hardware, against a hard deadline. I often point to my rewrite of Ecclesiastes in my January 2011 column, saying: There’s a time for bulletproof code, and a time for desperate hacks (msdn.com/magazine/gg535678). There’s a time for solving a general problem, such as rotating the robot to any arbitrary angle, and a time to hand-optimize the 15 seconds of autonomous operation we need to advance in the standings.

A mentor’s role is complex. It contains aspects of teaching, although it’s not exactly a teacher. It has aspects of coaching as well, although it’s not exactly a coach. I have to keep the students’ spark alive, while also introducing them to reality. I try not to write code for them. Instead, I ask questions that point them in the right direc­tion, and then let them run: “Our inertial guidance code isn’t integrating distance correctly? [No.] How often does it run? [I don’t know.] How could you measure it, quickly and easily? [A simple static counter, written to console at the end.] Fine, do that. [20 times per second.] Jeez, is that all? How can we get more? [Threads?] Maybe. Try looking them up. Is there an example? Careful, those little bastards will turn on you and bite without warning.” And so on.

One of the best ways to improve your own skills is to help someone else improve theirs. FIRST Robotics calls that “gracious professionalism.” Figuring we’d do better if we put more heads together, I started a software consortium with three other teams in nearby towns. I call it NSFSA (North Shore FIRST Software Alliance, see nsfsa.org). We started with a Java language bootcamp last summer for complete newbies. We then met on alternate Saturdays throughout the fall, discussing topics of interest—sometimes basic program structure, sometimes movement, sometimes vision. Several of the more advanced students helped present the topics. It benefitted them as much as it did the students that they helped, if not more.

Believe it or not, our biggest hurdle is getting every student’s PC running with the tools and configurations that they need. The undocumented settings, the development environments and libraries that don’t like each other, the firewalls put up by schools with the best of intentions—they all get in the way. I’d love to see the whole shebang in one virtual machine that everyone could just download and run. Or better yet, hosted in the cloud—a huge virtual machine, that we’d only pay to run on the days we needed it. Any sponsors out there?

This is Annabelle’s senior year. I want to send her out on a high note. Here we go.

David S. Platt teaches programming .NET at Harvard University Extension School and at companies all over the world. He’s the author of 11 programming books, including “Why Software Sucks” (Addison-Wesley Professional, 2006) and “Introducing Microsoft .NET” (Microsoft Press, 2002). Microsoft named him a Software Legend in 2002. He wonders whether he should have taped down two of his daughter’s fingers so she would learn how to count in octal. You can contact him at rollthunder.com.

Discuss this article in the MSDN Magazine forum