Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Functional Discipline
Search
Pedro Costa
September 22, 2017
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Functional Discipline
Slides of my talk at PartialConf 2017
Pedro Costa
September 22, 2017
More Decks by Pedro Costa
See All by Pedro Costa
Interruption Engineering - Part I
pfac
0
60
Spree
pfac
0
130
Workshop Git 2013
pfac
2
140
Other Decks in Programming
See All in Programming
初めての模倣学習とVLA
natsutan
0
270
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
210
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
550
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
520
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
7.8k
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
470
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.1k
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
230
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
2k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
React本体のコードリーディング
high_g_engineer
1
160
Oxlintはいいぞ(続)
yug1224
1
460
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Invisible Side of Design
smashingmag
301
52k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
470
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Crafting Experiences
bethany
1
270
Writing Fast Ruby
sferik
630
63k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Transcript
! " The Functional Discipline Pedro Costa @pfac @iampfac
None
Meet John
Meet John
Meet John
Meet John $ 100
None
An over-engineer
€ 1.0 for SOMEONE
New ideas
New ideas
New ideas
New ideas
New ideas
A functional way 1 2
1 class GenerateBillText 2 attr_accessor :currency, :value 3 4 def
initialize(currency:, value:) 5 @currency = currency 6 @value = value 7 end 8 9 def call 10 # ... generate image through ImageMagick ... 11 end 12 13 private 14 15 # ... any auxiliar method .. 16 end 17 18 GenerateBillText.new(currency: :eur, value: 1)
1 class StepChain 2 attr_accessor :klasses 3 4 def initialize(*klasses)
5 @klasses = klasses 6 end 7 8 def call(initial) 9 klasses.reduce(initial) do |current, klass| 10 klass.new(current).call 11 end 12 end 13 end 14 15 StepChain. 16 new(GenerateBillText, ...). 17 call(currency: :eur, value: 1)
1 class BillTextImage 2 attr_reader :path 3 4 def initialize(path:)
5 @path = path 6 end 7 end 8 9 BillTextImage.new(path: "~/tmp/bill_text.png")
None
None
None
None
None
None
None
?
None
None
?
None
None
OMG
None
None
HELP
– Cambridge Dictionary http://dictionary.cambridge.org/dictionary/english/discipline “the ability to control yourself (…),
even in difficult situations.”
– Cambridge Dictionary http://dictionary.cambridge.org/dictionary/english/discipline “the ability to control yourself (…),
even in difficult situations.”
Discipline is hard
Discipline is optional • You can reinvent the wheel, every
time • You can be inconsistent • You can break boundaries • You just should not.
Who’s disciplined?
None
–Daniel Kahneman, “Thinking, Fast and Slow” “System 1 operates automatically
and quickly, with little or no effort and no sense of voluntary control.”
–Daniel Kahneman, “Thinking, Fast and Slow” “System 2 allocates a!ention
to the effortful mental activities that demand it, (…). The operations (…) are often associated with (…) agency, choice and concentration.”
Habits?
None
–Admiral William H. McRaven “University of Texas at Austin 2014
Commencement Address” https://www.youtube.com/watch?v=pxBQLFLei70 “If you can’t do the little things right, you will never do the big things right.”
None
None
None
None
None
None
None
None
Explore
None
But take caution
None
None
Don’t go too far
In the end
All you need is Discipline
Thank you
! " The Functional Discipline Pedro “John” Costa @pfac @iampfac
Questions?