Stitching Functions and Packaging Patterns
Some of you within the data science community may know I’m a knitter, because many of you are as well. There are many comparisons between knitting and coding, but I’ll only mention three. And if you’re not a knitter, I imagine you’ll still find that these parallels exist between coding and the hobbies you have chosen.
Repetition
Being on the media side of data science lends itself to the exploration of any cool little package I happen to come across on my Twitter timeline. But I find that data scientists long in the field often have a cycle of a few packages they use and don’t venture much outside of that flow.
Knitting is the same way with stitches substituted for functions and patterns for packages. I personally wish I could make more of the time to try out different patterns like I used to. But the reliable flow of the stitch sequences I’ve committed to muscle memory does the job. And like with coding, I find the repetition soothing for a racing mind.
Makeshift Solutions
I fixed my first error while knitting a good ten years before debugging my first program, but I remember both experiences quite clearly.
Realizing you’re ready not just to execute code or cast on stitches but actually fix errors can be a quiet moment. For me, it came from a confidence I’d been unknowingly building, learning from repetition. It’s a feeling I’ve also experienced as a musician, when I became adept enough at the cello and piano to not only read the works of others, but improvise on my own. Debugging is more or less a form of improvisation, where you branch out from your current knowledge to ascertain the problem.
It’s Not That Glamorous Until It’s Done
Get up in front of a large audience to show off your new and fancy model? Yeah, that has some sex appeal. But the hours spent at the computer making it happen? Not so much.
It won’t take much for you to believe that the same goes for knitting. Back in 2014, I sold a bunch of handmade scarves to a boutique. The scarves were a hit with customers and this small transaction led to a long-term partnership between me and the store. Though happy of course, I was also amused. All of the boutique-worthy scarves I made were the product of 10-hour days watching “One Tree Hill” in pajamas with no makeup and something far from hero hair.
What I’ve noticed from both knitting and coding is that reveling in the glamour of the finished product is worthy motivation for the effort that precedes it. And in turn, committing to the process keeps us humble.