- r1-4: [k4, p4] rep
- r5-8: [p4,k4] rep
So, just like any programming exercise, the goal of knitting is to go from an abstract idea to a tangible pattern, but the difference lies in the fact that you execute the individual instructions and not a microprocessor. That, surprisingly, helps clarify a lot of the mystery within programming. For instance, if I took a break from knitting, I'd need to know where to pick up from later. That introduced the concept of saving state. Because it is convenient with the needles, every alternate row is knitted on the wrong side. Then, I'd have to use the additive inverses of my state variables. I could also create curved surfaces by decreasing/increasing the number of stitches, and the rate at which I did it determined the curvature.
So I learnt about constructing mutable loops, keeping state variables and even recursion, without really ever writing any code. It was just imagination, some yarn and the desire to create something I could proudly wear. I learnt to read and write code as a secondary objective - it was just a means to an end. As you can imagine, Calculus and Pascal Programming Lab were an absolute breeze for the next two years because I understood how accumulating incremental changes affected the bigger picture. It's funny that you don't learn that by writing HTML, which all the cool kids who went to computer camp were doing.
But I think I had my deepest insight into this recently, when I started to sew. I went to the library and there it was, an entire aisle of full-color how-to books with step-by-step instructions on everything from picking fabrics and yarn to finishing seams. There were books on how to hack commercial patterns for custom fits and even books on using a combination of sewing, knitting and crochet to construct complex garments. Out there on the web, there's everything from 10 minute shorts on youtube to hundreds of blogs by women just hacking around with stuff. This subculture has done an excellent job documenting what they do. I couldn't but see a correlation between this and that it is (presumably) dominated by women.
Why then, is it that the we're not bringing those skills into tech? Are we so engrossed in playing catch up that we are not being ourselves and consequently negating the argument for diversity? As a student of engineering, why was I not publicly proud about my love for knitting, sewing and cooking along with robots and sci-fi?
It makes me wonder if we are doing the right things to get girls interested in technology, as is sadly evident from this discussion on quora. I think that giving a girl child "boy toys" or sending her to robotics camp sends the message that it's not okay to bake pies or play with dolls because that's for dumb girls. If we make girls think that it's important to do things the way men do, that will still lead to low self-esteem because we're probably not wired to solve problems through a black & white console window. On the macro level, that will still lead to crappy products usable only by trekkies.
Anyone who has the desire to be creative can be a programmer and anything from lego blocks to knitting needles can teach algorithms to kids. We just need to have an open mind about where the insights come from and keep programming tools from becoming too arcane.