G R A N N Y W A S
A H A C K E R
P H O T O : L I S A C O C K B U R N
K N I T T I N G
C O D E
F L I C K R : S T E P H A N I E A S H E R
96 st = 12 ASCII
characters in binary at
8 stitches each
“ D E C O D E R H A T ” B Y Z A B E T S T E W A R T
Source code of
“ B I N A R Y S C A R F ” B Y H E Y C A R R I E A N N
“ T H E V I R A L K N I T T I N G P R O J E C T ”
B Y K I R S T Y R O B E R T S O N & O T H E R S
S T E G A N O G R A P H
F L I C K R : B E E P 1 O
R A V E L R Y : C Y NF L I C K R : D E V A B U R G E R
F L I C K R : A D A M K N I T S
F L I C K R : J A C Q U E L I N E - W
Left mitten reads
“My Left Mitten”;
“ M O R S E C O D E ” B Y K A T E A T H E R L E Y
Letters converted to
base 6, graphed, and
“ P E A C E ” B Y N A O M I P A R K H U R S T
Encodes a stanza
from Dr. Seuss’s
Oh, The Places
“ B R A I L L E S O C K S ” B Y J E S S I C A L A N D E R S
L E T ’ S G E T
H I G H -
T E C H
F L I C K R : B E R Z O W S K A
F L I C K R : B E K A T H W I A
F L I C K R : B E K A T H W I A
F L I C K R : K A T H Y R E I D
F L I C K R : S T 3 F 4 N
A few days ago I dropped off my entries for the knitting competition at this year’s Easter Show. I also build websites and apps for a living. To some people, this is totally incongruous, like I’m being deliberately anachronistic. But to me it makes perfect sense. After all, knitting is pretty much just code.
Anybody who’s ever tried it knows there’s just two stitches: knit and purl, combined in lots of different ways. So it’s inherently binary. And for those of us geeky computer types, that means we can use it to encode messages in a lot of different ways. For instance, if I combine knits and purls…
For instance, if I combine knits and purls to make ribbing, I can make a beanie. This is a free pattern called Decoder Hat, and it encodes up to 12 ASCII characters in binary at 8 stitches each. Obviously, message length is determined by the size of your head. But what if my message is longer?
How about a scarf? This scarf is actually the source code for ravelry.com, a knitting site. The knitter has used knit stitches to represent ones, and purls for zero. You could represent pretty much anything this way. If you’re more of a “black hat,” you can even knit a virus…
For the Viral Knitting Project, a team of activists knitted the source code to the code red computer virus into a scarf. So much for firewalls. This is contraband code you could carry across a border and no one would notice. All of these are examples of…
All of these are examples of steganography - the art of hiding a secret message in plain view. Nowadays the news freaks out about terrorists embedding messages in pictures on eBay, but did you know in WW2 the Belgian resistance recruited little old ladies who lived near rail yards to encode train movements into their knitting?
Granny doesn’t look so sweet and innocuous anymore, does she? She could be knitting anything into that jumper. Of course, binary knits and purls are only the beginning. There are lots of other ways to encode secret messages in your knitting. Personally I like the look of cables…
Personally, I like the look of cables. The hat on the left represents the numbers from 0-15 in binary notation, depending on where the crosses occur. The scarf on the right uses cables that actually look like little zeroes and ones. Maybe you like colour more than texture…
Another option is stripes. The width of knitted stripes in different colours could be used to represent a character set. The stripes on this jumper, for example, actually spell out the classic first programming exercise “Hello World”. If you want to get super literal…
If you want to get super literal, you can actually knit little ones and zeros into a scarf. You may be interested to learn that your average scarf will hold about 120 bytes of information. That’s just shy of a tweet! Not that the Belgian knitting nanas…
Not that the Belgian knitting nanas would’ve known what Twitter was. But they may have known Morse code! These mittens here use colour to create the dots and dashes of Morse code to spell out “My Left Mitten”; “My Right Mitten”; and “Thumb”. How meta. Another encoding method is to turn your characters into a repeating graphical motif…
Another encoding method is to turn your characters into a repeating graphical motif. Here the word PEACE has been converted to base 6, graphed, mirrored, and tweaked to make a repeating pattern. But what about accessibility? you might be thinking…
But what about accessibility? you might be thinking. Well, these knitted socks take advantage of the texture of knitted stitches to encode in Braille. The pattern repeat is a stanza from Dr. Seuss’s “Oh the Places You’ll Go.” So that’s all pretty cool…
So that’s all pretty cool, but I get that most of you when you see the word “hacker” are expecting something a little more futuristic and “disruptive,” preferably involving an app of some kind. I got that covered.
How about a real working knitted QR code? The mittens on the right - which won me a 2nd place at the Show - encode a URL from my personal site that has the pattern for the mittens. They’re self-replicating! But they’re not exactly subtle.
This is more subtle. This is a jumper I knitted for my husband a few years back using a technique called illusion knitting. From the front, just stripes. From the side, he’s secretly an Autobot from the planet Cybertron. This next one is also subtle. It’s not actually code…
This next one is also subtle. It’s not actually code; more like scientific output. The stripes on this scarf are actually a graphical representation of the emission spectrum of the element Molybdenum. And to get super super nerdy…
This piece is a crochet version of the Arecibo Message, which was broadcast into space in 1974 towards a star cluster 25,000 light years away. I for one welcome our new knitting overlords…
And lastly - if you’re not inspired by knitting code, how about sewing a circuit? You can now get an Arduino kit called the Lilypad that comes with conductive thread you can use to sew into your knits to create e-textiles.
I hope some of this inspired you. For those of us who push pixels around all day, knitting can be a creative, tactile way to relax… and even hack a bit. Come see me if you want to learn. Or hey, just call your grandma!