Skip to main content
Department News

Crocheting with Code

Gracie Simpson is an Electrical Engineering major and a Capstone student, but she is also dedicated to arts and crafts. At first glance, these might sound like separate interests, but Gracie has found a way to–shall we say “crochet?”--the two together.

The idea started this past Fall semester with her Capstone project. Gracie did not have much previous experience with coding in Python, but she soon realized that her newfound skills could benefit her in a project she was working on. Her goal was to crochet a beaded purse with an intricate pattern.

Crocheting with beads takes a lot of time, and it can be extremely difficult to keep track of the complex patterns. The beads must be strung onto the thread that is being crocheted in the proper order to create the desired pattern. For her beaded purse, Gracie created her own pattern using an app created for beading projects which converts a pattern into a word chart. The word chart lists how many beads of each color you have to string on each row to create the desired pattern. The app, however, is only meant for flat beading projects, so Gracie used math and prototyping to figure out how to turn it from a flat pattern to something that would work on a 3D object, specifically the purse she was creating.

“Originally, I started by hand and highlighted the colors to find out how many of each color I needed to string up. It was really frustrating, and I missed a lot of beads because I was trying to read it and not miss anything. And you can’t just read it from the beginning of the chart to the end. The first row you read forwards, and the second row you read backwards.”

After Gracie had crocheted about ten rows, she came to a realization that there must be a more effective method. “I just thought, ‘This is a disaster. Everything is falling apart. I could keep trying this way, or I could just write a program that will make it a lot simpler.”

So that’s exactly what she did!

On Gracie’s first run through of the program, she used ChatGPT to help her frame out the basic parts that she needed. The program was functional, but it did not work exactly the way Gracie wanted it to. Nevertheless, it gave her a good starting point in her endeavor, and she was able to adjust the code and finish it on her own using what she learned about Python in her Capstone project.

The finished code reads the word chart that Gracie was originally using and converts it into a matrix of what color bead she needs to string on and how many. As the program reads the word chart, it knows which rows need to be read forwards and which rows need to be read backwards, and it automatically flips them so that the instructions can be read in the order they must be executed.

Originally, this was all Gracie had in mind for the code. However, she began to add on more parts that help her keep track of her project. The code also displays the next three color blocks that are coming up, so that Gracie can be ready for the next steps. She also recently added code that allows her to store what line in the project she is currently working on, so that she does not have to count through her project to see how many lines she has already crocheted.

The code has made a big difference in Gracie’s project. She shared that the project is going significantly faster and she makes fewer mistakes now when she is stringing the beads.

When asked about how she feels about coding, Gracie said, “This is like a Superpower! If I didn’t know how to do this, this project would have taken so much longer and been so much harder.”

As Gracie reflected on her experiences so far, she said, “This project has taught me that if I can imagine something, I can do it.” Gracie continues to learn more skills from her engineering projects and classes, and she is constantly thinking about how she can apply what she’s learning in a project or craft! While she is currently focused on crocheting her beaded purse, there are many other projects she looks forward to starting.