Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Life Without Footguns (Part 2)
Search
Chew Choon Keat
March 26, 2021
Programming
0
190
Life Without Footguns (Part 2)
Chew Choon Keat
March 26, 2021
Tweet
Share
More Decks by Chew Choon Keat
See All by Chew Choon Keat
Life Without Footguns (Part 1)
choonkeat
0
170
A Programmer’s Red Pill: Pure, Functional, and Typed
choonkeat
0
240
GraphQL for web devs who don't need it
choonkeat
1
230
TDD for people who don't need it
choonkeat
1
95
File Upload 2015
choonkeat
0
140
Other Decks in Programming
See All in Programming
Graviton と Nitro と私
maroon1st
0
130
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
170
GoLab2025 Recap
kuro_kurorrr
0
780
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.7k
SwiftUIで本格音ゲー実装してみた
hypebeans
0
490
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
620
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.9k
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
150
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
3
1.1k
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
gunshi
kazupon
1
110
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
400
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Writing Fast Ruby
sferik
630
62k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
31
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
94
How to Ace a Technical Interview
jacobian
281
24k
HDC tutorial
michielstock
0
260
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
80
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
580
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
400
4 Signs Your Business is Dying
shpigford
186
22k
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