In  Bret Victor's article on learnable programming, he talks about how our current teaching techniques have a high barrier to entry and are in no way designed to appeal to the growing attention deficiency and dwindling imaginative powers amongst the young population. The article argues that learner programmers are asked to focus on achieving a result, like a single number or a graphic, that they don't get to see all the hidden states that they are creating. That's the real problem.

I think the *real* problem is that we're making them learn programming in the first place. The goal of any real world application that you and I build by writing code is to create desirable things. The greater skill is in being able to architect something and that's what gives professional coders their daily dose of joy. So, why then do we start with newcomers at the wrong end? Why do we skip the part about creativity?

My own introduction to programming was not typical. The first ever code I read and wrote had nothing to do with computers - it was all about knitting. My late grandmother wasn't really an engineer or educated in higher math, but inadvertently, she ended up teaching me to think about algorithms.

( For the uninitiated, knitting is an efficient technique to tie knots into yarn to create a web-like fabric. It's very much like bricklaying - you start with a foundation of cast-on knots and then builds row upon row of knots, going from left to right and back. The fabric can be warped, textured, and shaped by varying the type of knot and the number of knots. There are only two stitches - knit and purl - which are essentially the two sides of the same knot. Looking from the wrong side of the fabric, a knit looks like a purl  and a purl looks like a knit. So, yes, you can turn any binary executable directly into a beautiful scarf.)

Knitters sometimes describe their patterns using code. So, if you wanted to knit a checkerboard pattern with squares of size 4x4, you would describe it as:

KNitting.png
  • 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.