>> Hey, everyone.
So thank you, Michael, for that, because now
I have to try not to cry before my talk instead
of after.
Weaving tapestries of code: So the really
quick version in the event that you decide
you're done, is this is the intertwining histories
of textiles and fiber arts and computing,
and how we owe the industrial revolution and
some of our IDE defaults to an 18th Century
French fashion fad.
So we're going to have some fun today, we're
going to go through history.
So this is my scrapbook.
Bear with me.
We're going to start in the home of Charles
Babbage.
How many of you have heard of Charles Babbage?
Awesome, so Charles Babbage was a (sighs)
a lovely gentleman, who really really enjoyed
throwing parties, in the years between like
1815 and 1845, 50, somewhere in there.
But these parties were really lavish, but
they were different in that they weren't all
of high society.
They were all of the intellectuals.
So you'd see people like the Duke of Wellington,
as well as Ada Lovelace and a lot of the visionaries
that developed the world that we know today.
So one day, he was sauntering over to his
wall with the Duke of Wellington, who, by
the way, if you recognize is actually like
the third in line for the throne of England
and at this point, this Duke of Wellington
was someone who was definitely an intellectual,
he was very, very smart and I kind of points
to this picture and he says, "how was it made?"
and the Duke of Wellington looked at this
picture, and he got closer, and he's like,
you know, that looks ... yes, that's a wood
cut.
It's the best woodcut I've ever seen and this
is a woodcut and when you look at this image
and you look at the one before it, it does
look a lot like a woodcut, but when you get
closer, you realize it looks more like your
suit jacket than this woodcut, and that's
because everything from the background to
the image to the words below it, are all woven
on what is the brand new Jacquard loom.
Now, why, you say, do you care?
You know, and the truth is that I have to
give you a little bit of a history lesson
before you can really dive into this story.
So this may be a little bit dry.
But I promise it gets better.
All right, textiles.
When we're looking at like Henry VIII, for
instance, the cost of textiles for someone
who worked in the castle was about 8 to 10
days' worth of earnings for a shirt.
Some say that if you were to take that number
and you were calculate it based on how much
we make for minimum wage, and how long it
takes to wash the fleece that you get from
the sheep and comb the fleece and spin the
fleece, and weave it into fabric, sew it together
into a shirt, you're looking at about 527
hours.
This is between a $3500 to $5,000 shirt.
For a peasant.
They usually bought about two outfits a year.
Now, going back to 18th Century, a little
bit further in the future, this was the fashion
in France.
OK, this is not the very, very simple tunic
that you were looking at before.
This is intricate.
These patterns are woven in silk.
The thing with looms at this time is that
it took two people to run.
You had the person who was weaving the thread
back and forth.
And you had the person standing on the top,
lifting each of the threads, which meant that
for a 12-hour day, they were able to weave
about 2 inches of French brocade silk.
That would take forever.
We're talking between 180 and 324 just for
the weaving alone.
That's between 15 and 27 days, to make the
fabric not for her dress but for his jacket.
So the industry was absolutely ripe for revolution.
Something as simple as clothing, being able
to dress yourself and fashion was not just
important.
You know, there were huge, very strict rules,
all the way down the hierarchy from the highest
of the aristocracy down to the lowest of peasants,
you had to have certain bits of attire, or
you were seen as -- you might as well be naked.
And imprisoned.
So here's the jacquard loom.
It was patented in December of 1800, which
we didn't really get it until 1801 and the
dates are kind of varying as to when it was
officially released, and we all have at least
heard of Jacquard, whether it's the Jacquard
dyes or the Jacquard loom or various other
reasons, but the thing is, there really isn't
anything unique in this.
So let's go back to the very beginning of
where this started.
In 1725, we have Bouchon's loom.
So you see this long paper?
That was actually the pattern to program the
loom with the pattern that they needed.
So if you're looking at this and thinking,
you know, that kind of looks like a piano,
one of those ones that has the rolling paper,
those weren't actually developed until the
mid 20th Century.
So this was actually more of a leftover piece
of paper on the floor of his father's shop.
His father made essentially organs for clocks.
We would call them music boxes.
And this piece of paper was where you lined
up the pins on the wheel in order to make
sure that the music notes came out just right
when they were supposed to happen.
So Bouchon looks at this and picks up his
piece of paper and says, I have an idea and
puts together this loom.
There is a problem, though, this single piece
of paper.
So if we go back to the image of Jacquard,
that took 24,000 cards to develop, and it
took about 4,000 cards for the standard broca
de.
This piece of paper, having that many rows
and rows and rows, and there was no way to
place it so that the cords didn't actually
rip right through when it tried to find a
hole or knot.
It was actually also very thin.
Three years later his apprentice, Falcon,
came out with his loom.
We had the cards.
It made it easier to swap out bits and pieces,
you could even reuse some cards if it happened
to match the pattern that you used.
And those patterns would come in and out of
fashion, very quickly.
Three months, six months, not very much different
than now, so you had to be quick.
So these cards were more sturdy, they were
able to be moved on a more accurate a more
accurate square wheel.
And you would have cords that would go down
through the holes if there was a hole and
to pick up threads and lift them up, which
is how you got threads down and threads up
for the opposite thread to go through to make
the pattern and I'm going to keep hitting
this, I'm sorry.
So it was about five years later when we came
up with the flying shuttle.
And no, I don't mean this flying shuttle,
clearly.
I mean this shuttle.
But there's a reason I included that slide,
and it's because of this.
That flying shuttle is being shot across that
loom at 60 miles per hour.
That allowed weaving to go from as far as
your arm could reach across, with a belt elbow,
hunched over a wheel, you know, this loom,
to being able to sit upright and being able
to pull to fire that across.
So we didn't have two-foot-wide fabric anymore.
We had 100-inch fabric.
And it was much, much faster, and frankly
you could do it older, because you weren't
hunched over this machine day in, day out,
hour after hour after hour.
It revolutionized the industry.
It would be another 12 years before the loom
was fully automated.
They used a water wheel to turn the wheel
at the top that had the pattern on it.
The problem is, the loom boys that served
the top, they basically chased them down with
a bunch of sticks and threw them in a lake.
It didn't catch on very well.
They didn't like the fact that the jobs were
being taken, because they were trying to eat,
as well, and there was another problem with
the actual loom, and it was that that wheel
at the top goes all the way back to those
music boxes, to those clock organs, which
meant that every time you needed to change
a pattern, you had to readjust, and refit
every single fitting in that all over again.
It took longer to make one than it took for
the fashion to change.
The cool thing about Vacanson, though is that
he was the one that created this duck and
the reason why that is important is it says
if it looks like a duck, quacks like a duck,
and poops like a duck is based on this duck.
This duck would eat, it would move, it would
quack, it would poop.
Nothing like a defecating duck, right?
However, this was basically also the 19th
and 18th Century definition of a Turing test.
This is what they had.
If it looks like it, if it acts like it, it's
got to be it, right?
So he was a huge developer of autonoma, he
created the flute player and the tambourine
player who was so life-like people thought
it was real.
which is why he was commissioned to try to
automate basically the weaving industry and
he did it.
So why did Jacquard get all the credit?
The answer is.
That he put it all together.
He took the system that Bouchon developed,
he took Falcon's rec staining lar cards, he
took Kay's flying shutting, he took Vaucanson's
top-mounted lever.
It made the looms much faster.
It meant that those top boys could start weaving.
There is a problem, though, and we did mention
that the loom was developed and released between
1800 and 1801, but the problem is that we
had the French Revolution right before that,
and specifically we had the reign of terror,
the reign of terror, one fifth of the French
population was killed in a ten-month period.
All walks of life were in fact targeted but
it was very heavily weighted towards the clergy
and the aristocracy.
Nobody wanted to wear French silk brocade,
nobody wanted to die.
So what happened?
What happened to the loom?
Spoiler: The looms that we still use today,
we still call Jacquard looms, because they
run on the same principles.
But that came a little bit later.
What we have today is this gentleman, Richard
Roberts, basically the best and first inventer,
and automator of all time.
He invented every single one of these things
on this list, and yeah, the electromagnet
is on there.
Let's look at the three highlighted ones for
now.
We have a self-acting spinning wheel.
Now, at this point we did in fact have automated
spinning machines, which made thread.
The problem is that those machines could only
spin four threads at a time.
His self-acting spinning wheel increased it
to 80 threads at a time.
This took what could have eventually been
400 hours of work and converted it into 9
minutes.
All right?
Robert's power loom, this is the fully automated,
it does not need a weaver loom ever invented.
Takes everything that Jacquard did and automates
those foot pedals.
He also created the punching machine.
And this one's you, Glen:
[laughter]
Without the punching machine, we would not
have the bridges that we have today, in fact,
the punching machine was created specifically
because there was a bridge in Wales that had
to be built on a deadline.
You don't know what that's like, though.
[laughter]
And it was impossible.
It was impossible.
Because in order to make this bridge stable,
they needed to punch holes through steel and
hammer in each and every rivet by hand.
The punching machine automated that, and why
is that cool?
Because the same head is sitting on top of
the Jacquard loom is what runs this punching
machine.
The Jacquard loom evolved into being something
much bigger than just a loom.
It became a way of automating machines.
So let's look at this timeline.
In the 1745 we had Vaucanson's loom but then
we had a really long pause and then we finished
up and quickly accelerated again.
And that pause happened for a number of reasons.
One was because it had already been created
and bad, and it took people a long time to
put together the pieces.
Just because your work is based on other people's
work doesn't change the fact that it's amazing.
Just because every single one of us in this
room are standing on the shoulders of giants
doesn't mean our work isn't important.
Every single one of us has something to contribute.
So stand on those shoulders and reach higher.
Connect a few things together, see how they
work.
And own it.
So back to Charles Babbage.
Babbage himself developed a few sketches and
a prototype for what essentially was two different
machines.
Well, three, if you count the fact that he
improved the first one.
So we have the difference engine and this
is all of the piece that he actually was able
to build.
The analytical engine itself was only ever
in drawings, and then the difference engine
No. 2 was finally built and is currently in
a private collection, but for the longest
time, 2016, 2017, it was in the Computer History
Museum in San Francisco.
So it's five tons and what it does is it computes
and tabulates polynomial functions, the first
one out to 16 digits.
Difference engine No. 2 out to 31 digits and
then it would print out a control piece of
paper because you could make sure that that's
really how you wanted it, you could do those
calculations by hand and verify.
And then it also created a mold for printing
a plate that you could use to print those
into books, so that you could do calculation
after calculation, page after page, because
back in the day they didn't have calculators,
they didn't even have the slide rule and the
abacus was not everywhere.
So what we had were books of calculations
and tabulations and we would use those books
to further science, because it was the resource
that we had.
So the question for Babbage is, if these machines
could have been built then, if they had been
built then, how much farther in computer technology
would we be now?
Babbage once gave a lecture at the University
of Turin, and this lovely gentleman, Menabrea
took a transcript and he published it.
it was in French.
And afterwards he hired Ada Lovelace to convert
this transcript into English and publish it.
You know, and it is of note that he did eventually
become the 7th prime minister of Italy.
Ada Lovelace, she is a brilliant mathematician,
she is the child of Lord Byron, the poet and
as much as that tumultuous relationship result
in her mother essentially pushing Ada Lovelace
down the road of science and mathematics.
And inAda Lovelace took both.
She was very logical, but she had this beautiful
poetic way of looking at the world and seeing
beyond what was there.
So she was translating this transcript, with
the help of Charles Babbage, and she does
in fact calculate using, you know, punchcards
and whatnot -- she did calculate an algorithm,
the very first algorithm, and she made sure
that it was something that could run on the
analytical engine if it were built and that's
why she's the first computer programmer.
The book that she published, her notes, were
longer than the transcript.
So again, Ada Lovelace's work was based on
a machine by Charles Babbage that used a mathematical
equation that had been discovered hundreds
of years earlier.
And she was hired to do this by another gentleman
who had actually written the transcript, and
then she worked with the originators to come
up with this translation and notes, and this
program, so why did she get the credit?
And it's because she looked beyond.
And she realized that it wasn't just calculations
this machine could do.
It could run the world!
So then we skip a few years, and we have Herman
Hollerith's and his doctoral thesis was using
punchcards to keep track of information.
And essentially what that meant is you had
two electrical plates and they would touch
and wherever electricity currents were coming
through and touching the other side, it would
be recorded, which meant if there's a hole
in the paper of the punch card, you got a
recording and if there's not, you don't.
Pretty simple.
But revolutionary.
So the first census a year later used punchcards
to record and then you had this business that
he developed straight out of his thesis, ended
up combining with three other companies to
become a fifth company called computing tabulating
recording company.
13 years later that company was renamed to
IBM and four years later they created what
you see at the top of the screen here, which
is a rectangular hole punch system, which
allowed 80 characters wide and 24 characters
tall and if you don't know, all of our IDEs
still are defaulting to 80 characters wide.
Many CLIs for hardware systems are still 80
characters wide and 24 pixels tall.
So that was much faster.
I mean it was 1800 to 1924.
There weren't as many gaps, it was a lot more
stable growth, but what's interesting about
this is the fact that we went from the Jacquard
loom, which used punchcards, to Charles Babbage,
who based his analytical engine on running
with punchcards and Ada Lovelace who took
those punchcards and wrote the first systems,
the first programs, algorithms, who then handed
those punchcards on, and those punchcards
became how we recorded information using electrical
circuits, and electrical signals.
So we're going to change gears.
Because at this point, we're going to dive
a little bit more deeply into World War I,
World War II.
And I love this quote.
It's so mysterious and so -- it just makes
me smile.
During wartime, where there were knitters,
there were often spies, pairs of eyes watching
between the click of two needles.
And the question there is how much did we
code into our knitting?
The very first reference to cryptography in
knitting was Charles Dickens in A Tale of
Two Cities.
Madam DeFarge was a ruthless, blood-thirsty
woman who would sit in meetings while they
argued the fates of the aristocracy and knitted
their names into their projects, more specifically
those that she wanted to die.
Don't mess with knitters!
[laughter]
When doing research for this, I was looking
for stories, trying to find examples of when
knitting was actually used as part of the
cryptography work that we've all seen, right?
And I discovered that Belgium created some
really incredible knitters.
So get this: This one woman she took her knitting
and she jumped out of an airplane and landed
in Germany and biked across, being helpful
while just knitting away and getting information
from German soldiers and immediately passing
that back to the allies.
This other woman would sit at her window,
and look at the train station, and she'd knit
and rock and tap her feet.
While her children below were converting that
Morse code into messages, all while a German
sergeant was living in their house.
There's another woman who also had a window
over a train station, and based on her rate
of knitting, and the fact that she would purl
when there was a supply train and yarn-over
when there was a personnel train, they could
figure out when those trains showed up, and
what their schedule was.
In fact, it got to the point where in WWII,
the British office of censorship prevented
knitting patterns from being published.
For the most part it was abroad, but oftentimes
it was also there, just in the off chance
that someone had somehow encoded a message.
So let's look at these.
These are mine.
So I knitted a sweater, and I do this a lot,
clearly.
So I knitted a sweater that converted a message
to binary, binary to knitting stitches.
Each letter is 8 characters wide and in between
each character is a space, a yarn-over, allowing
me to put these messages of React Rally 2017
and JSConf 2017 into my sweater and and those
are the first two conferences that ever accepted
me to speak.
[applause]
You know, and it goes beyond cryptography
into mathematics.
This woman, Daina Taiminy was learning hyperbolic
geometry in the '70s, you know that in the
normal geometry these two top lines are parallel,
they're never going to cross, but in hyperbolic
geometry, all three of these intersecting
lines are parallel with the line below it
and she looked at that and went what?
How is it even possible?
And they're like you're just going to have
to imagine it and she's like, fine, fine,
got past the class and thought thank goodness
I'll never have to think about hyperbolic
geometry again until she found herself teaching
hyperbolic geometry and she was not thrilled.
But the more she real looked into it she realized
that the math was for hyperbolic geometry
was a crochet pattern.
She was able to replicate a hyperbolic plane
in crochet and for the very first time in
the '90s, we were actually able to see it.
And the reason this is important is because
it's not just things like Coral that apply
with hyperbolic geometry, it's things like
the shape of our universe.
First time.
Not only that, but she was also the first
mathematician to publish in a major journal
a crochet pattern and they fought her tooth
and nail.
Mathematicians do mathematics, they don't
do crocheting!
Crochet is something women do when they have
nothing else to do.
Which is why a few years later that same journal
published the Lorenz manifold, also crocheted,
because again, the ability to see thermal
confection, the rising and cooling of hot
air in the atmosphere was captured for just
a moment or forever in this crochet piece.
They could see it, they could interact with
it.
And it's due to the unique properties of crochet.
And I would be remiss as a knitter if I didn't
mention the Mobius strip which most women
wear all fall long.
And you can make it out of paper, but it's
just not as warm.
[laughter]
But the Klein bottle we've developed and used
and made out of glass, but it's not quite
the same, you can't just touch one side and
spin it and realize that you can such every
surface without lifting your finger, both
inside and out, and the Klein bottle is a
3D depiction of a Mobius strip.
Knitters make hats but we can interact with
those hats and turn them out and flip them
around and see it and feel it and experience
it.
And that's the thing with knitting and crocheting
and all of the fiber arts from embroidery
to cross stitch is the fact that we can see
it and we can feel it.
There is a fad that I love, where people would
go through and every day they would knit a
color based on the temperature of that day.
This, however, is a little bit different.
It doesn't take one day for a year.
It takes today for the last hundred years.
Just let that sink in for a second second.
So there are in fact 366 scarves showing the
temperature on one day for 100 years, and
they all look like this.
And then there's this lovely person who actually
knit their son's sleep pattern into a blanket,
the first-year sleep pattern, watching them
go from erratic as a newborn all the way to
very structured by the time they were a year
old, and then there's the woman who knit on
the train and every time she got stuck in
a delay, she knitted a different color and
that sold really well.
She's making another one.
And these data visualizations have the impact
to touch you.
You can wear them.
You can see them, you can hold them, you can
use them.
But the fact that you can actually physically
tactilely interact with them changes it from
a chart that no one cares about or maybe you
care about, but to something that you hold,
to something that becomes real.
And then the same tactile senses can then
control our technology.
We have at this point taken IoT to the place
where you can use sensor motion to control
your phone from your jacket cuff you can make
pianos that you can roll up and shove in your
bag.
Our clothing becomes the technology.
In fact, there's a project called Google Jacquard
that has paired with Levi to make that jacket.
You could buy it.
So moving beyond that, I want to pose a question:
Is knitting programming?
Who says yes?
You're cheating.
Who says no?
Who wants to see the next slide?
All right.
Well, I'm not going to give you the answer
yet.
So this is knitting.
There's three things that you need to keep
track of in knitting.
OK, you have a knit stitch and a purl stitch
and a yarnover stitch except really you have
a knit stitch and the back of a knit stitch
and a yarnover, but this lends very beautifully
to that binary that I showed you before.
But when you're looking at a knitting pattern,
this is what it is.
How many of you can read this?
I see like 6 hands and I'm so happy.
There's multiples of 8 plus 1.
That's fairly easy to figure out but what
if you want 18 inches worth?
What if you want 30 inches worth?
And you have these asterisks that are everywhere
and these parentheses and these random to
last 6 stitches things and there's a lot of
things to keep track of.
So I converted it into a program and you can
see it on GitHub and it took about 250 lines.
To do with this does.
All right?
So let's walk through this a little bit, OK?
So for each row you are going to work the
preloop stitches or the prerepeats, right
so in this case it's a knit 2.
And the asterisks are what wrap a loop.
So then we're going to do the knit stitches
and we're going to do that over and over again
and last I checked that was a do while.
Do this while you have more than 3 stitches
on the needle, and then you do your post loop
stitches.
That's it.
But in that, we've learned how to write a
function through each row, do something if
it's the first one, make our repeats, loop
through those, and if it's not the first one,
and you've got nothing at the end, you know,
maybe it's an else, do the last set of stitches.
They've actually used knitting in third world
countries that have less access to computers
as a programming simulator in the same way
that you would give a pilot a flight simulator,
to teach them the basics of programming until
they can get ahold of a computer, because
it teaches you the same thought models.
When you're writing a pattern, reading a pattern,
you're dealing with do whiles, if elses, for
eachs, the things that when you were first
learning, I certainly did, why would I ever
use a do while?
To do this.
Is it a Turing-complete programming language?
I don't know, but I can tell you that this
made my learning how to program ridiculously
easily, because as soon as I started seeing
how those programs functioned, I was like,
oh, yeah, I've done this before.
This is easy.
It trains your brain to think that way.
So I'm going to share a very, very long quote
and I am going to read it because I think
it's special and that's why no one recognized
that when I was conjugating French irregular
verbs I was actually practicing my pattern
recognition skills and when I was excited
about knitting I was actually following a
sequence of symbolic commands that included
loops inside of them, and that Bernard Russell's
lifelong quest to find an exact language between
English and mathematics found its home inside
of a computer.
I was a programmer, but no one knew it.
And with this, I want to say that computers
are magical, technology is beautiful.
There's logic and there's beauty and there's
math and there's music, but sometimes you
have to step away from the computer to find
that inspiration.
Maybe it's in your dad's left-over piece of
paper that he threw on the ground after trying
to develop a wheel for a music box that makes
the next revolution happen.
Maybe it's reading a mathematical equation
and realizing it's a pattern, and creating
the first ability to interact with a hyperbolic
plane.
And maybe it's learning a new language that
teaches you the ability to recognize the patterns
behind syntax.
So when you're looking for that next technology,
remember that every single technology that
we have out there, whether it be React, whether
it be Angular, whether it be Vue, every single
one of them is bringing something to the table
and we are all learning from each of them.
All of them have a place, and the competition
is fun.
So maybe step out of your wheelhouse for a
minute, and see what's out there.
And then bring it back.
What will you create?
My name is Jen Luker, I am a senior frontend
engineer at gremlin, as you can absolutely
reach out to me at Twitter.
It is the best way to collect to me and if
you would like more information, I have a
lot to share.
Thank you.
[cheers and applause]
