DEV Community

Discussion on: Knitting as Programming

Collapse
 
tqbit profile image
tq-bit • Edited

Great post, never thought about comparing these two. Yet

Knitting pattern designers follow DRY.

... you got me on this1. I never tried handling cloth (I've got a pair of left hands for any crafting, really), and maybe I don't get the message behind that bullet point - but isn't knitting quite a lot about repetition? At least for parts of the cloth?

Collapse
 
abbeyperini profile image
Abbey Perini • Edited

I say knitting pattern designers follow DRY like I would say programmers follow DRY. Good pattern designers try to cut down on the repetition of instruction (code). You are correct in that the act of knitting and a knitted garment involve a lot of repetition themselves, but they're execution and output respectively.

You can tell when a pattern is written by an experienced designer trying to cut down on repetition. The best examples are the kinds of for loops and while loops I described, but it also includes intelligent use and creation of charts, a set of rows repeated until the fabric is a certain length, and how the instructions for different sizes of output are notated, among other things.