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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Pedro Costa
September 22, 2017
Programming
0
120
The Functional Discipline
Slides of my talk at PartialConf 2017
Pedro Costa
September 22, 2017
Tweet
Share
More Decks by Pedro Costa
See All by Pedro Costa
Interruption Engineering - Part I
pfac
0
54
Spree
pfac
0
120
Workshop Git 2013
pfac
2
130
Other Decks in Programming
See All in Programming
Fluid Templating in TYPO3 14
s2b
0
130
CSC307 Lecture 09
javiergs
PRO
1
830
CSC307 Lecture 02
javiergs
PRO
1
770
AI時代の認知負荷との向き合い方
optfit
0
150
ぼくの開発環境2026
yuzneri
0
100
CSC307 Lecture 01
javiergs
PRO
0
690
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
高速開発のためのコード整理術
sutetotanuki
1
390
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
Basic Architectures
denyspoltorak
0
660
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
100
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
A designer walks into a library…
pauljervisheath
210
24k
Bash Introduction
62gerente
615
210k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
RailsConf 2023
tenderlove
30
1.3k
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?