A seemingly-antiquated handicraft and a cutting-edge discipline may seem unrelated. Maybe you think I’m crazy. Crocheting? Coding? What on earth could they have in common?
That’s the way I used to see it, too.
As a kid, I spent hours wielding my hook to create little baskets, stuffed animals, and coffee cozies. My dad jokingly called me an “old lady” and encouraged me to learn some programming instead. I never did, officially, until 12th grade. But little did I realize that crochet was laying a foundation for my future coding endeavors!
Here I am now, a computer science major grateful for seven lessons from the underappreciated craft of crochet:
1. It taught me the fundamentals of a programming language
If you’ve never seen a crochet pattern, I’ll tell you: it looks a lot like mumble jumble. Complicated instructions are encoded in cryptic phrases and symbols…sounds like Java or Python, doesn’t it?
In learning how to read a crochet pattern, I unwittingly became familiar with the basics of coding jargon: Words like turn and join and magic circle and post? They’re just keywords such as Java’s int, new, and this. Abbreviations like dc (double crochet) and ss (slip stitch)? They represent functions or methods, referencing a separate set of instructions for each technique. Those instructions blocked out in brackets and followed by the phrase “repeat __ times?” This is essentially a for or a while loop.
2. It taught me to pay attention to details
Although I was meticulous before I learned how to crochet, manipulating a slippery aluminum hook and 4-ply yarn forced me to become even more so. I especially had to focus when I made a doily with skinny thread and an eensy-weensy hook. Talk about microscopic stitches!
If I wanted to get the gauge right—or at least make my work look decent—I knew that every stitch mattered. I couldn’t afford to be sloppy unless I wanted my project to end up in a disappointing disaster. The same scrupulousness applies to computer science. Depending on the language, one extra space, one semicolon, or one missed check can screw up your whole program.
3. It taught me to think like a computer
One of the most critical qualities of a programmer is the ability to “play computer.” You have to think algorithmically, tracing through the code to see how the computer is going to execute it, step by step. Oftentimes, it won’t actually do what you think it will!
Crocheting forced me to adopt this algorithmic mindset. Because I am acting like a computer executing the code of the crochet pattern, I often stop in the middle of the process and have to know where I am and what’s going on. Even if I can’t see the end product yet, or if I don’t completely understand why the pattern is telling me to “ss round next post,” I just have to do it and then see what will happen. This helped me step into the shoes of a computer.
4. It taught me to be logical and organized
When I began creating my own crochet patterns, I relied on the structures and norms that I had picked up from other pattern-writers. From the varied examples of crochet patterns that I’d seen, I knew that it was important to record my instructions in a concise and logical way. There’s no point in imagining a brilliant pattern if no one will easily understand it! The same goes for a computer program.
I also realized the absolute, no-questions-asked, must-do-or-else IMPERATIVE of annotating my patterns, and likewise my Java code. I learned the hard way that if I didn’t add overall explanations to my pattern, I’d come back to it with no idea of what I was thinking when I wrote it down a month ago.
5. It taught me how to debug
When you’re supposed to have 36 stitches at the end of the round but you only have 33, panic ensues. After you count two more times to make sure you’re short three stitches, you have to figure out where you made a mistake.
Even after years of practice, I still get lost and have to carefully trace each stitch to see what’s going on. If nothing else, crochet has instilled patience in my perfectionist heart. Not getting it right the first time is okay - it’s more important to know how to get back on track.
I’ve encountered the same frustration in my (so far) short coding career. But I just want the program to work! I don’t know what the problem is! There are a million places where it could be going wrong! First step: Breathe. Second step: Break it down.
6. It taught me to think on many levels at the same time
According to renowned computer scientist Don Knuth, computer programmers should be able to “shift levels of abstraction…to see something in the small and to see something in the large.” This means that you can simultaneously consider the big picture and the low-level details.
I definitely do that whenever I’m crocheting: my mind dwells on that current stitch, that particular row or round, and the overall end product at the same time. If you can jump levels of abstraction to visualize a dynamic process in this way, you’re in good shape.
7. It taught me to be creative with a just few tools
With just a hook and yarn, and maybe a stitch marker to keep my place in a round, I could make SO MANY THINGS. Crochet is such a versatile craft. From an afghan blanket to amigurumi, I’ve explored a spectrum of creative possibilities. There are so many other ideas out there, like recycled T-shirt rugs, delicate earrings, and raffia purses.
In the same way, you can do so many things with computer programming. Just look around - people are using code to build apps, software, etc. that have become integrated into our society. And the boundaries keep bulging outwards. With just a little coding knowledge, I have so much power and creativity in my hands. Experimenting with crochet has given me the boldness to think outside the box in computer science as well.