In CS 15 (Data Structures), we’re currently doing the second of two back-to-back projects. This one is “CalcYouLater”, whereas the previous one was “MetroSim”.
I’ll admit that I half-assed MetroSim to some extent. It ended up pretty fine, but my testing wasn’t super thorough. I sped through testing and mostly did “manual testing” (which is code for “I used my program and it seemed to work as expected”). I didn’t do much automated testing (tests that you can run over and over again, easily, whenever you change anything).
And as a result, it didn’t feel super good to do. I was just trying to finish the project and get it turned in. By the end, I had that “oh well, I hope they don’t take off too many points” feeling.
But this time, for CalcYouLater, I settled on a robust way of testing. I wrote my own script to test my code, and I could run those tests every time I made a change to my code to make sure it still worked. It gave me an enormous amount of confidence that I hadn’t inadvertently broken everything.
And as a result of doing one thing with care, I found myself putting more care into other parts of the code. For example, my comments describing my code were detailed and useful. I wrote a dozen paragraphs in the text file that describes my project. I had fun with CalcYouLater.
I think that the difference here is that I put care into building CalcYouLater, which motivated me to do a good job on other aspects of it. I was happy with the way I carefully decided to architect my code → I tested it carefully → I wrote careful and useful comments → I documented my thought process carefully.
Once I feel good about one part of something, I don’t want to ruin it by doing another part hastily. And as a result, I feel better about it and it even feels somewhat fun.
I guess it’s not a surprise, but it’s a nice reminder that doing things with care is fun. Even if I’d rather be doing one of my personal projects than a homework assignment, I can make it fun by trying to do it well.