Knit One Compute One - For Knitters!

Kristine Howard
Kristine HowardDirector of Developer Relations at YOW! Australia
P H O T O : L I S A C O C K B U R N
KNIT ONE
COMPUTE ONE
Kris Howard
@web_goddess
Knit One Compute One - For Knitters!
for num in number {
if num%15 == 0{
print("(num) fizz buzz")
}
else if num % 3 == 0 {
print("(num) fizz")
}
else if num % 5 == 0 {
print("(num) buzz")
}
else {
print(num)
}
}
Knit One Compute One - For Knitters!
Worked over a multiple of 24 stitches.
Row 1 (RS): Knit
Row 2: Purl
Row 3: *(k2tog) 4 times, (yo, k1) 8
times, (k2tog) 4 times; rep from * to
end.
Row 4: Purl
Repeat rows 1-4 until desired length.
Programming Knitting
Knit One Compute One - For Knitters!
Programming Knitting
Programming Knitting
Me
BASIC
CONCEPTS
COMPUTERS
ARE DUMB
Knit One Compute One - For Knitters!
VARIABLES
Integers, strings, Booleans
$needlesize = 4;
$hooksize = “G”;
$mysize = 38;
$mysize = “large”;
$increases = 75;
$rows = 14;
$length = 80;
$neckline = “crew”;
$pockets = 1;
CONTROL
STRUCTURES
if ($mysize == “small”) {
dothis;
}
else {
dothis;
}
if ($length == 85) {
dothis;
}
else {
dothis;
}
if ($neckline == “crew”) {
dothis;
}
else if ($neckline == “boat”) {
dothis;
}
else {
dothis;
}
IF STATEMENT
Cast on 24 stitches.
FOR LOOP
$stitches = 24;
for ($i = 0; $i < $stitches; i++)
{
caston();
}
Repeat to end of row.
WHILE LOOP
$currentStitch = 0;
$lastStitch = 60;
while ($currentStitch < $lastStitch) {
knit();
currentStitch++;
}
Cast on 242 (256,
270, 284) sts.
SWITCH
STATEMENT
$mysize = 38;
switch ($mysize) {
case 38:
caston(242);
case 41:
caston(256);
case 43:
caston(270);
case 45:
caston(284);
}
SUBROUTINES
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
COROUTINES
Knit One Compute One - For Knitters!
Row 1: Side,O,*D,C,F,X,F,O,F,X*,
D,B,D,A,E,B,E,**X,F,O,F,X,F,X,E**,
O,Side,O,rep from * to * once,
pm,F,O,F,X,F,C,F,W,F,O,F,pm,
rep from ** to ** once, O.
Knit One Compute One - For Knitters!
PATTERN
LANGUAGES
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
stitch-maps.com
Rows 1 and 3 (WS): Purl.
Row 2: K1, *k2tog, k2, yo, k1,
yo, k2, ssk, repeat from *.
Row 4: *K2tog, k2, yo, k1, yo,
k2, ssk, repeat from * to last
st, k1.
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
https://knitml.sourceforge.io/
<pattern:pattern xmlns:pattern="http://www.knitml.com/schema/pattern"
xmlns="http://www.knitml.com/schema/operations" xmlns:common="http://
www.knitml.com/schema/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.knitml.com/schema/pattern http://www.knitml.com/
schema/pattern-0.7.xsd http://www.knitml.com/schema/operations http://
www.knitml.com/schema/operations-0.7.xsd http://www.knitml.com/schema/common
http://www.knitml.com/schema/common-0.7.xsd" version="0.7" xml:lang="en">
<pattern:directives>
<pattern:instruction-definitions>
<inline-instruction id="cross-2-over-2" label="2/2 LC">
<cross-stitches first="2" next="2" type="front" />
<knit>4</knit>
</inline-instruction>
<inline-instruction id="cross-2-behind-2" label="2/2 RC">
<cross-stitches first="2" next="2" type="back" />
<knit>4</knit>
</inline-instruction>
</pattern:instruction-definitions>
</pattern:directives>
<pattern:general-information>
<pattern:name>Color Sampler Swatch</pattern:name>
<pattern:description>A basic 2-color swatch sampler</pattern:description>
<pattern:dimensions />
<pattern:gauge type="stockinette">
Pattern "en" {
Directives {
InstructionDefinitions {
InlineInstruction 'cross-2-over-2' [label:"2/2 LC"] { cross 2 inFrontOf
2, k4 }
InlineInstruction 'cross-2-behind-2' [label:"2/2 RC"] { cross 2 behind
2, k4 }
}
}
GeneralInformation {
Name: "Color Sampler Swatch"
Description: "A basic 2-color swatch sampler"
Dimensions
Gauge 'stockinette' {
StitchGauge: 5 stitchesPerInch
RowGauge: 7 rowsPerInch
}
Techniques {
Technique: "stranded knitting"
KnittingEL
Time for some knitting…
KNITTING IS BINARY
F L I C K R : S T E P H A N I E A S H E R
“DECODERHAT”BYZABETSTEWART
“BINARYSCARF”BYHEYCARRIEANN
“THEVIRALKNITTINGPROJECT"
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
“MORSECODE”BYKATEATHERLEY
“BRAILLESOCKS”BYJESSICALANDERS
Knit One Compute One - For Knitters!
“ S C O R E B O A R D ” B Y M I C H E L L E H U N T E R
F L I C K R : T O N Y & W A Y N E
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
Knit One Compute One - For Knitters!
F L I C K R : W E M A K E M I L A N O
FLICKR:MARCANET
SMEECH.CO.UK
SMEECH.CO.UK
A N D R E W S A L O M O N E
P H O T O : B E C K Y S T E R N
knityak.com
F L I C K R : B E R Z O W S K A
E - T E X T I L E S
Knit One Compute One - For Knitters!
F L I C K R : K A T H Y R E I D
Knitty: Know It All Bag
FLICKR:ST3F4N
@web_goddess
Kris Howard
1 of 81

Recommended

Knit One, Compute One - Software Art Thou? by
Knit One, Compute One - Software Art Thou?Knit One, Compute One - Software Art Thou?
Knit One, Compute One - Software Art Thou?Kristine Howard
627 views118 slides
Gate level minimization (2nd update) by
Gate level minimization (2nd update)Gate level minimization (2nd update)
Gate level minimization (2nd update)Aravir Rose
989 views55 slides
5 1. character processing by
5 1. character processing5 1. character processing
5 1. character processing웅식 전
509 views8 slides
Vcs23 by
Vcs23Vcs23
Vcs23Malikireddy Bramhananda Reddy
302 views15 slides
Knit One, Compute One - YOW! Night Perth by
Knit One, Compute One - YOW! Night PerthKnit One, Compute One - YOW! Night Perth
Knit One, Compute One - YOW! Night PerthKristine Howard
243 views94 slides
Knit One, Compute One - YOW! 2016 by
Knit One, Compute One - YOW! 2016Knit One, Compute One - YOW! 2016
Knit One, Compute One - YOW! 2016Kristine Howard
811 views120 slides

More Related Content

More from Kristine Howard

Machine Learning for Software Developers (...and Knitters) by
Machine Learning for Software Developers (...and Knitters)Machine Learning for Software Developers (...and Knitters)
Machine Learning for Software Developers (...and Knitters)Kristine Howard
96 views58 slides
Knitted Disruption - Build Stuff LIthuania 2019 by
Knitted Disruption - Build Stuff LIthuania 2019Knitted Disruption - Build Stuff LIthuania 2019
Knitted Disruption - Build Stuff LIthuania 2019Kristine Howard
266 views74 slides
Knitted Disruption - Build Stuff Ukraine 2019 by
Knitted Disruption - Build Stuff Ukraine 2019Knitted Disruption - Build Stuff Ukraine 2019
Knitted Disruption - Build Stuff Ukraine 2019Kristine Howard
355 views78 slides
Building Software That Lasts - Voxxed Days Singapore by
Building Software That Lasts - Voxxed Days SingaporeBuilding Software That Lasts - Voxxed Days Singapore
Building Software That Lasts - Voxxed Days SingaporeKristine Howard
629 views42 slides
Building Software That Lasts by
Building Software That LastsBuilding Software That Lasts
Building Software That LastsKristine Howard
504 views40 slides
All About Ravelry (Weavers and Spinners edition!) by
All About Ravelry (Weavers and Spinners edition!)All About Ravelry (Weavers and Spinners edition!)
All About Ravelry (Weavers and Spinners edition!)Kristine Howard
752 views87 slides

More from Kristine Howard(20)

Machine Learning for Software Developers (...and Knitters) by Kristine Howard
Machine Learning for Software Developers (...and Knitters)Machine Learning for Software Developers (...and Knitters)
Machine Learning for Software Developers (...and Knitters)
Kristine Howard96 views
Knitted Disruption - Build Stuff LIthuania 2019 by Kristine Howard
Knitted Disruption - Build Stuff LIthuania 2019Knitted Disruption - Build Stuff LIthuania 2019
Knitted Disruption - Build Stuff LIthuania 2019
Kristine Howard266 views
Knitted Disruption - Build Stuff Ukraine 2019 by Kristine Howard
Knitted Disruption - Build Stuff Ukraine 2019Knitted Disruption - Build Stuff Ukraine 2019
Knitted Disruption - Build Stuff Ukraine 2019
Kristine Howard355 views
Building Software That Lasts - Voxxed Days Singapore by Kristine Howard
Building Software That Lasts - Voxxed Days SingaporeBuilding Software That Lasts - Voxxed Days Singapore
Building Software That Lasts - Voxxed Days Singapore
Kristine Howard629 views
All About Ravelry (Weavers and Spinners edition!) by Kristine Howard
All About Ravelry (Weavers and Spinners edition!)All About Ravelry (Weavers and Spinners edition!)
All About Ravelry (Weavers and Spinners edition!)
Kristine Howard752 views
The Campsite Rule - Leaving the Tech Industry Better Than We Found It by Kristine Howard
The Campsite Rule - Leaving the Tech Industry Better Than We Found ItThe Campsite Rule - Leaving the Tech Industry Better Than We Found It
The Campsite Rule - Leaving the Tech Industry Better Than We Found It
Kristine Howard1K views
My Website is Old Enough to Vote - My Website Can Vote - Building Sites That ... by Kristine Howard
My Website is Old Enough to Vote - My Website Can Vote - Building Sites That ...My Website is Old Enough to Vote - My Website Can Vote - Building Sites That ...
My Website is Old Enough to Vote - My Website Can Vote - Building Sites That ...
Kristine Howard647 views
My Website Can Vote - Building Sites That Last by Kristine Howard
My Website Can Vote - Building Sites That LastMy Website Can Vote - Building Sites That Last
My Website Can Vote - Building Sites That Last
Kristine Howard361 views
My Website Can Vote - The Challenges of Maintaining a 20-year-old Website by Kristine Howard
My Website Can Vote - The Challenges of Maintaining a 20-year-old WebsiteMy Website Can Vote - The Challenges of Maintaining a 20-year-old Website
My Website Can Vote - The Challenges of Maintaining a 20-year-old Website
Kristine Howard578 views
Granny Was a Hacker - TEDx Melbourne by Kristine Howard
Granny Was a Hacker - TEDx MelbourneGranny Was a Hacker - TEDx Melbourne
Granny Was a Hacker - TEDx Melbourne
Kristine Howard345 views
Granny Was a Hacker (CampJS Version) by Kristine Howard
Granny Was a Hacker (CampJS Version)Granny Was a Hacker (CampJS Version)
Granny Was a Hacker (CampJS Version)
Kristine Howard6.7K views
The Tyranny of the Business Card by Kristine Howard
The Tyranny of the Business CardThe Tyranny of the Business Card
The Tyranny of the Business Card
Kristine Howard1.4K views
Wireframing Workshop - TiE Women Create-a-Thon by Kristine Howard
Wireframing Workshop - TiE Women Create-a-ThonWireframing Workshop - TiE Women Create-a-Thon
Wireframing Workshop - TiE Women Create-a-Thon
Kristine Howard2K views
Leveraging Content and Design to Grow Your Food Startup by Kristine Howard
Leveraging Content and Design to Grow Your Food StartupLeveraging Content and Design to Grow Your Food Startup
Leveraging Content and Design to Grow Your Food Startup
Kristine Howard31.2K views
How to Win Hackathon - SheHacks 2015 by Kristine Howard
How to Win Hackathon - SheHacks 2015How to Win Hackathon - SheHacks 2015
How to Win Hackathon - SheHacks 2015
Kristine Howard1.6K views

Recently uploaded

GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...James Anderson
66 views32 slides
6g - REPORT.pdf by
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdfLiveplex
10 views23 slides
20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
33 views73 slides
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
33 views69 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
30 views43 slides
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院IttrainingIttraining
41 views8 slides

Recently uploaded(20)

GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson66 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex10 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker33 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman30 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291616 views
From chaos to control: Managing migrations and Microsoft 365 with ShareGate! by sammart93
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
sammart939 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10237 views
Lilypad @ Labweek, Istanbul, 2023.pdf by Ally339821
Lilypad @ Labweek, Istanbul, 2023.pdfLilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdf
Ally3398219 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg16 views
Attacking IoT Devices from a Web Perspective - Linux Day by Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri15 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi126 views

Knit One Compute One - For Knitters!