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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Pedro Costa
September 22, 2017
Programming
120
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
59
Spree
pfac
0
120
Workshop Git 2013
pfac
2
130
Other Decks in Programming
See All in Programming
Webフレームワークの ベンチマークについて
yusukebe
0
170
OSもどきOS
arkw
0
580
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
170
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
290
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.2k
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
590
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
550
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
Lessons from Spec-Driven Development
simas
PRO
0
220
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
600
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
130
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
11
6.1k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
So, you think you're a good person
axbom
PRO
2
2.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
150
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Docker and Python
trallard
47
3.9k
RailsConf 2023
tenderlove
30
1.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
610
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.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?