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
Life Without Footguns (Part 2)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Chew Choon Keat
March 26, 2021
Programming
200
0
Share
Life Without Footguns (Part 2)
Chew Choon Keat
March 26, 2021
More Decks by Chew Choon Keat
See All by Chew Choon Keat
Life Without Footguns (Part 1)
choonkeat
0
180
A Programmer’s Red Pill: Pure, Functional, and Typed
choonkeat
0
250
GraphQL for web devs who don't need it
choonkeat
1
240
TDD for people who don't need it
choonkeat
1
110
File Upload 2015
choonkeat
0
150
Other Decks in Programming
See All in Programming
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
160
Agentic Elixir
whatyouhide
0
460
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
400
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
1
400
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
110
Sans tests, vos agents ne sont pas fiables
nabondance
0
140
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
2
210
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
380
inferと仲良くなる10分間
ryokatsuse
1
120
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
190
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
120
Featured
See All Featured
The Language of Interfaces
destraynor
162
26k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
300
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
130
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Building the Perfect Custom Keyboard
takai
2
770
GitHub's CSS Performance
jonrohan
1033
470k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
Designing for humans not robots
tammielis
254
26k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
510
Navigating Weather and Climate Data
rabernat
0
190
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
530
Transcript
Life Without Footguns @choonkeat March 2021
About • Basic • C, Perl, Java • Javascript &
Ruby on Rails for 10 years • Go and Elm in the past few years • @choonkeat
About • Basic • C, Perl, Java • Javascript &
Ruby on Rails for 10 years • Go and Elm in the past few years • @choonkeat How to do things How to NOT do things
Anyone happy with this? nope
Why is it common to see this? well…
It was clean when I started
Since data is all here, add a Method
A magnet to add more Method
Does every Method use all the data? nope
“You wanted a banana but what you got was a
gorilla holding the banana and the entire jungle.” — Joe Armstrong (Erlang) Funny quip
“You wanted to call the formatUserName method but you’d have
to wait for Zookeeper to boot and Kafka to connect” — Me Has costs
:. Method = Footgun banana-gorilla-jungle code is less maintainable and
less reusable
Write plain functions instead
A Function With Exact Arguments just the banana without gorilla
or jungle
A Good Thing ™ a function with exact arguments is
a maintainable and reusable unit of code
No Method = No Interface? But Interface is a Good
Thing ™, right?
❤ Interface is a Good Thing ™
Any Writer can “Write” 😘
Different Dependency Same “Write” 🥰
Can “interface” be a function?
But Different Dependency… 😖
Digression
Nobody: Functional programming articles: instead of add(3, 5) when
you curry, you can get add3(5) !!!11!!1 Digression
What’s “currying” actually good for
What’s “currying” actually good for
None
Call without that last argument…
Currying 🥘
Different Dependency Same “Write” sounds familiar?
Different Dependency Same “Write” sounds familiar?
Currying = Interface with Functions no wonder these functions are
always so simple. no ceremony to use
Implementing an “interface” is… hint: not method
sounds familiar? A Function With Exact Arguments
sounds familiar? A Function With Exact Arguments
A Good Thing ™ a function with exact arguments is
a maintainable and reusable unit of code