The parallels between cross stitching and programming
What does cross stitch have to do with programming? More than you think
Arts and crafts. Creativity and diligence. Taking the mundane and adding that touch of genius and individuality. A needleworker spends hours creating artwork with simple threads of many colors, and programming is the same—words and numbers woven over hours to create something with a purpose.
Cross stitching is the simple process of taking threads of different colors, combining them and making little Xs onto a canvas to create a picture or words, or both. That’s it. Little Xs. Yet the tiny stitches when combined for a intricate presentation for the eye with delicate shading and even depth. Programming? Little words and numbers.
Parallels and differences
What all crafts have in common is the creative process. Crafting is the act of creating something new, whether you do this with your computer keyboard or with thread and needle, you are designing and creating something with your own hands, something new and unique. There may be similar versions but nothing is quite like what you are creating at this very moment. The possibilities are endless. Another characteristic that all crafts share is that you have to acquire certain skills and techniques, and practice these in order to create your product. Flip the fabric over and the back end is just as neat and clean as the front, like a master programmer's code under a software's hood.
There are also a few differences we have to keep in mind when comparing traditional to modern crafts. Traditional crafting requires a lot more actual hands-on work (using needle and thread vs. hitting keys of a keyboard) and physical effort. In programming, repeated processes can be automated by a few lines of code, whereas in cross stitching each of hundreds of stitches are done by hand.
Handmade crafts are usually not perfect, but those who excel come very close, very often. It's a case of the human versus machine, and machines are typically designed to make as few errors as possible or eliminate them along the way. On one hand, traditional crafts are more unique and harder to copy. You can copy or reproduce software exactly the same way, doing the same cross stitching project twice will never lead to having two absolutely identical copies. Because code exists on a computer or on the Internet and can be copied easily, you can make your work available to others, which is why modern crafts like programming can have a greater impact on the world and reach more people.
Despite these differences, traditional crafts can actually teach us a lot about programming and the process of writing code. Let's take a look at what we can learn from traditional crafts next.
Cross stitching and coding—both have architecture
The motivation behind writing code and crafting is very similar. It's all about the creative process and working on something we love. Both writing code and crafting a cross stitch project usually also serve a purpose. You may choose to start a new cross stitch project to use it as decoration, as a gift, or just for fun. The same goes for writing code, but code also has the ability to solve certain issues and enables you to build things that are helpful to people or that can improve or automate things. It is functional.
Let's start with the very beginning of the process. A new cross stitching or coding project always starts with an idea. You brainstorm. You figure out what kind of website you would like to build or what kind of software you would like to develop. You decide what kind of design you would like to cross stitch. You may do some research on Pinterest to gain inspiration for your cross stitch project. You may explore GitHub to see what code other people have written that is similar to the code you want to write.
Next you think about architecture and design of your project. What do you want it to look like? What kind of font do you want to use for your cross stitch lettering? How big will it be? What color fabric and yarn will you use? You then take your design idea and transfer it into a square grid, indicating where which stitch will have to be and what color yarn you will have to use for it. For software, you think about the features and functionality you want to implement in your software. What will the design be like? What do you want the user interface to look like? How will certain parts of your code work together? You then go ahead and write pseudocode as a first step to help you transform your ideas into code.
During the design process, allowing yourself some slack is important. Inflexibility kills creativity. Don't design everything to a tee. What may sound great in your mind or may look great when you draw your cross stitch pattern on paper, may not actually look good on the fabric itself. Give yourself some room to adjust things as you go. Maybe you want to take away a few stitches on one side and add a few on the other side, maybe you decide that a different color yarn looks better after all. The same goes for software. Not everything that you originally planned may be great in production or may actually be desired by and useful to the user.
The next step is figuring out which tools you will need. What quality, color, and size fabric do you need for your cross stitch project? What size frame and needle? What color yarn and how much of it. Do you have scissors on hand? Do you have everything that you need at home or will you have to go out and purchase some of your tools and materials? For writing software you need to make sure that you have a computer available, downloaded a text editor or even an IDE, and installed and updated any software you want to use. Which programming language do you want to use? Which database? What other technologies will you need?
An important step to creating your project is finding the right resources and using them correctly. Use the resources that are available to you in order to save yourself time and effort. Don't try to reinvent the wheel. Instead of free-handing your cross stitch design and spending hours drawing that grid pattern, find designs that you like online and modify them. Use free websites that will turn your design into a grid pattern for you. Maybe you can reuse some of your old patterns. Consider purchasing a cross stitch pattern on Etsy instead of making your own. This may cost you a few dollars (they are usually very affordable) but save you a lot of time, effort, and frustration. When writing code, find the right libraries and frameworks you can use instead of building your website or software completely from scratch. See if you can reuse some of your old code. Look for other code that is open source and that can help you with your project. Find software that will enable you to build your project faster and more efficiently.
Getting started—mise en place
Before you start the development process, make sure that you have all your tools ready and in front of you. Cut out the fabric, put it in the hoop, lay out the yarn colors you need, have scissors and needle ready, have your grid pattern lying in front of you, and draw a grid onto your fabric, which will make it easier for you to follow your pattern and determine where each stitch will have to go. When writing software make sure that your laptop is charged, you have internet access, you have downloaded and updated all the tools you will need, and you have opened your tools on your screen. Pull up or bookmark any documentation or tutorials you may need so you don’t have to search in the middle of your crafting or development process.
Find a good starting point
When cross stitching you will usually fold your fabric twice before putting it into the frame in order to find the middle of it, which is where you will start stitching your design. When programming, figure out what the core part or feature of your project is and build your way around it. When building a website, for example, build the backend first before worrying about the user interface and design.
Work systematically. Don't just make random stitches here and there. Instead cross stitch in sections. The same goes for programming: develop one feature after the other instead of jumping back and forth between different features.
Work sustainably. If you follow the rules and right techniques, this will save you time, effort and material. In cross stitching it will save you from using too much yarn and therefore save you money, and it will also prevent mistakes and save you time. In software development following best practices will spare you from ending up with a ton of technical debt and will save you time debugging and improving your program.
Unthread all errors
Chances are that you will make mistakes while cross stitching your design or building your software. Fixing mistakes is an important part of all crafts and make sure to look for them as they happen and fix them immediately. The worst-case scenario is that you will have to unthread or cut all your yarn or throw the project away or that you will have to delete all your code and start over again.
It's not the end of the world when things don't work out the first time and you lose a little bit or yarn and fabric or a little bit of time. It's important to learn how to debug and fix things the right way. Learn how to read error messages, comment out certain sections of your code and run it in order to find which section is causing the issue. Don't just cut the yarn but actually unthread it stitch by stitch, even if it takes longer that way. There's lots of trial and error involved in both programming and cross stitching.
It's most important that you stay patient, take lots of breaks and step away from the project for a while when frustration kicks in, and ask for help if you need to. At the end of the day crafting, regardless of whether in the traditional or modern way, is supposed to be fun and creative and not something that causes you pain and frustration.
Throughout this article you may have noticed that cross stitching and coding actually have more in common than you may have thought in the beginning. If you are a programmer, whether professionally or as a hobbyist, I can only encourage you to try out a traditional craft like cross stitching, knitting, sewing, or the like and explore what it will teach you, learn from it, and incorporate some of the lessons and techniques into your daily programming routine.