Slide 1

Slide 1 text

Pattern Language for Rubyists @irohiroki

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Overview “Pattern Language” Pattern Language and software Whether it matters to us

Slide 4

Slide 4 text

@irohiroki "HJMFDPBDI 8FCEFWFMPQFS l3BJMT%FWFMPQNFOU1BUUFSOTz "TJBO1-P1

Slide 5

Slide 5 text

A pattern language is a method of describing good design practices within a field of expertise. – Wikipedia, “Pattern language”

Slide 6

Slide 6 text

Christopher Alexander

Slide 7

Slide 7 text

Quality Without A Name Picture by Lies Thru a Lens 

Slide 8

Slide 8 text

Beyond its elements each building is defined by certain patterns of relationships among the the elements. –Christopher Alexander, “The Timeless Way of Building”

Slide 9

Slide 9 text

“Courtyard which live” –Christopher Alexander et al, “A Pattern Language”

Slide 10

Slide 10 text

And each law of pattern is itself a pattern of relationships among still other laws, which are themselves just patterns of relationships again. –Christopher Alexander, “The Timeless Way of Building”

Slide 11

Slide 11 text

–Christopher Alexander, “A City is not a Tree”

Slide 12

Slide 12 text

From a mathematical point of view, the simplest kind of language is a system which contains two sets: 1. A set of elements, or symbols. 2. A set of rules for combining these symbols. –Christopher Alexander, “The Timeless Way of Building”

Slide 13

Slide 13 text

“Pattern Language”

Slide 14

Slide 14 text

Natural Language Pattern Language Words Patterns Rules of grammar and meaning which give connections Patterns which specify connections between patterns Sentences Buildings and places –Christopher Alexander, “The Timeless Way of Building”

Slide 15

Slide 15 text

Each pattern is a rule which describes what you have to do to generate the entity which it defines. –Christopher Alexander, “The Timeless Way of Building”

Slide 16

Slide 16 text

Picture by Liz Castro

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

The specific patterns out of which a building a town is made may be alive or dead. To the extent they are alive, they let our inner forces loose, and set us free; but when they are dead they keep us locked in inner conflict. –Christopher Alexander, “The Timeless Way of Building”

Slide 19

Slide 19 text

Dead Pattern

Slide 20

Slide 20 text

Living Pattern

Slide 21

Slide 21 text

“Window Place” –Christopher Alexander et al, “A Pattern Language”

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

1. Independent Regions 2. Distribution of Towns 3. City Country Fingers 4. Agricultural Valleys 5. Lace of Country Streets 6. Country Towns 7. The Countryside Pattern #1~7

Slide 24

Slide 24 text

105. South Facing Outdoors 106. Positive Outdoor Space 107. Wings of Light 108. Connected Buildings 109. Long Thin House Pattern #105~109

Slide 25

Slide 25 text

197. Thick Walls 198. Closets Between Rooms 199. Sunny Counter 200. Open Shelves 201. Waist-high Shelf 202. Built-in Seats Pattern #197~202

Slide 26

Slide 26 text

You can use it to design a house for yourself, with your family; or to work with other people to design an office or a workshop or a public building like a school. –Christopher Alexander et al, “A Pattern Language”

Slide 27

Slide 27 text

Back to the binary world…

Slide 28

Slide 28 text

Discoverer of Pattern Language Kent Beck eXtreme Programming Ward Cunningham Wikiwiki “Technical debt”

Slide 29

Slide 29 text

The Starting Point of Software Patterns - youtu.be/_V0kVOLOCrY

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

A Small Pattern Language for GUI 1. Window Per Task 2. Few Panes Per Window 3. Standard Panes 4. Short Menus 5. Nouns and Verbs

Slide 32

Slide 32 text

“We presented these patterns to a team of application specialists writing a specification for a special purpose programming environment. Without detailed understanding of any of Smalltalk's interface mechanisms (MVC for example) they were able to specify very reasonable interfaces after one day of practice.” –Kent Beck, Ward Cunningham, “Using Pattern Languages for Object-Oriented Programs”

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Do you have a pattern language in your mind?

Slide 39

Slide 39 text

We have written this book as a first step in the society-wide process by which people will gradually become conscious of their own pattern languages, and work to improve them. –Christopher Alexander et al, “A Pattern Language”

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

@irohiroki @ukstudio @mochiz @tatsuoSakurai @kei_s @moro @ttakuru88 @takkanm

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

How we found Rails dev. patterns 1. Kick off meeting 2. Discuss development knacks (pristine “patlets”) 3. Group patlets in KJ-method 4. Rewrite the groups in pattern form 5. Find sequence of patterns (WIP) 6. Refine the patterns (WIP)

Slide 45

Slide 45 text

Rails Development Patterns 18 patlets / 6 patterns in form Reviewed at AsianPLoP 2015 Work in progress on GitHub (rails- patterns/rails_dev_patterns)

Slide 46

Slide 46 text

“ެࣜ৘ใ”
 (Official Information) Context: You are going to use a new or unfamiliar feature of Rails. Problem: You may copy and paste misinformation from the web. Solution: Refer the official Rails guide or the API reference.

Slide 47

Slide 47 text

“ެવͷSQL”
 (Not-so-Secret SQL) Context: You are going to use an ActiveRecord to make a database query. Problem: You may make ineffective, wasteful queries. Solution: Confirm what SQL the ActiveRecord generates.

Slide 48

Slide 48 text

Do you have a pattern language in your mind?

Slide 49

Slide 49 text

We have written this book as a first step in the society-wide process by which people will gradually become conscious of their own pattern languages, and work to improve them. –Christopher Alexander et al, “A Pattern Language”

Slide 50

Slide 50 text

Thank you! @irohiroki [email protected]