To be sure, many of my students aren’t fans of the concept—especially when I reinforce it with my syllabus’ no-hand-holding policy. I hope, though, that they’ll reflect in a few years on it and appreciate the method to my madness.
Of course, it would be hypocritical of me to ignore desireable difficulty when I face an obstacle my own. That’s exactly what happened yesterday when I was noodling with Python.
Why write scripts for fun? First, I’m not going out too much these days. Second, my editor is putting the final touches on Slack For Dummies. Finally, my courses this semester don’t cover the powerful, general-use programming language. If you don’t sharpen your axe from time to time, though, it will lose its sharpness.
If you don’t sharpen your axe from time to time, it will become dull.
Brass tacks: Last night was a perfect opportunity for some sharpening.
By way of background, I’m a big Scrabble fan.1 I wanted write a script that would calculate the number of consecutive games that I’d need to win to reach a goal. For instance, if I had won 50 out of 100 games, then how many games would I need to win in a row to hit 60 percent?
The math isn’t hard. Yes, it’s just algebra and you only need to solve for x. In the prior example, it’s 25.
I was curious about my options for solving this equation in Python. I imported SymPy, a library for symbolic mathematics but I struggled trying to get it to do what I wanted. I sent a message to a friend of mine who has forgotten more about Python than I’ll ever know. It turns out that he hadn’t used SymPy much.
I went to sleep determined to figure it out. I’m nothing if not stubborn. A fresh set of eyes and a new perspective led to this:
Simon Says: Professors should practice what they preach.
Little victories can do wonders for your confidence, especially in trying times. Beyond that, why not set an example for your students?
Footnotes
- At least the current version. Scrabble® GO sucks.
0 Comments