Slide 1

Slide 1 text

How to Make a Spaghetti スパゲッティの作り方

Slide 2

Slide 2 text

.。oO(さっちゃんですよヾ(〃l _ l)ノ゙☆)

Slide 3

Slide 3 text

How to Make a Spaghetti スパゲッティの作り方 m4sh.3d "Spaghetti Bolognaise" 2013-06-16 CC by-sa 2.0 https://flic.kr/p/f7AzxG

Slide 4

Slide 4 text

Take dry spaghetti from refrigerator. Take salt from refrigerator. Take water from refrigerator. Put dry spaghetti into pot. Put salt into pot. Boil until good. Marco Verch "Ungekochte Spaghetti mit Bastschnur gebunden vor weißem Hintergrund" 2018-12-04 CC by 2.0 https://flic.kr/p/Rwmq6G Rebecca Siegel "Clothbound Cheddar - Cheese salt" 2010-07-11 CC by 2.0 https://flic.kr/p/8im1Cb

Slide 5

Slide 5 text

Serves spaghetti.

Slide 6

Slide 6 text

DONE. cf. DM's Esoteric Programming Languages - Chef http://www.dangermouse.net/esoteric/chef.html

Slide 7

Slide 7 text

How to Make a Spaghetti スパゲッティの作り方 Michael Coghlan "Electrical Madness" 2017-09-27 CC by-sa 2.0 https://flic.kr/p/DK1D3b

Slide 8

Slide 8 text

cf. Rich Hickey "Simple Made Easy" 2011-09 https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/SimpleMadeEasy.md エリック・エヴァンス "エリック・エヴァンスのドメイン駆動設計 " https://www.amazon.co.jp/dp/4798121967 スコット W アンブラー, ピラモド・サダラージ "データベース・リファクタリング " https://www.amazon.co.jp/dp/4894715007 クリストファー・アレグザンダー "パタン・ランゲージ ―環境設計の手引 " https://www.amazon.co.jp/dp/4306041719 ジル・ドゥルーズ "襞:ライプニッツとバロック " https://www.amazon.co.jp/dp/4309247199

Slide 9

Slide 9 text

Software source code often may be complicated. We want to our software be simple. What is simple ?

Slide 10

Slide 10 text

simple → sim-plek sim : one (一つ) plek : to plate (編む) Online Etymology Dictionary https://www.etymonline.com/

Slide 11

Slide 11 text

simple → sim-plek In software, simple is ● One concept ● One task

Slide 12

Slide 12 text

simple duplicate → dwo (two 二つ)-plek complect, complicated, complex → com (たくさん)-plek

Slide 13

Slide 13 text

OK, we know “what is simple? (Simpleとは何か?)”. But we don’t know Is this simple ? / How to make it simple ? (何がsimpleか?)

Slide 14

Slide 14 text

Is this simple?

Slide 15

Slide 15 text

Is this simple?

Slide 16

Slide 16 text

We can’t decide that an isolated thing is simple or not. We need a system that contains the thing.

Slide 17

Slide 17 text

We can’t decide that an isolated thing is simple or not. We need a system that contains the thing.

Slide 18

Slide 18 text

We can’t decide that an isolated thing is simple or not. We need a system that contains the thing.

Slide 19

Slide 19 text

Keep our language simple. Human language Software code Outer world Some works

Slide 20

Slide 20 text

Human doesn't know the actual concept of the code. (Only computers know.) Don’t accumulate diff + diff + … Simple abstraction reduces diffs. diff (Function) Actual concept Human concept

Slide 21

Slide 21 text

Spaghetti code comes from spaghetti data. Example : Data Complect Temporal field {:x 42 :tmp nil} x & tmp Multi purpose field {:for_a_or_for_b a} a & b Extensible tuple [a b nil] Order & meaning Extensible function arguments [a b nil] -> c Order & meaning

Slide 22

Slide 22 text

Design simple data & compose them. (do-something {:x x :tmp tmp}) ↓ (with-tmp do-something tmp {:x x})

Slide 23

Slide 23 text

Design simple data & compose them. (if (= “dev” env) (do-as-dev) (do-as-prod)) ↓ Use extensible effect.