Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Limits of Modularity
Search
Samuel E. Giddins
May 19, 2015
Technology
89
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Limits of Modularity
Samuel E. Giddins
May 19, 2015
More Decks by Samuel E. Giddins
See All by Samuel E. Giddins
Funding Ruby Infrastructure as a Non-Profit
segiddins
0
62
Evolution of Rails within RubyGems.org
segiddins
0
56
The Challenges of Building a Sigstore Client from Scratch
segiddins
0
170
Keeping the Gems Sparkling
segiddins
0
110
A Survey of RubyGems CVEs
segiddins
0
110
Handling 225k requests per second to RubyGems.org
segiddins
0
130
State of the RubyGems 2023
segiddins
0
170
Building Broken Gems
segiddins
0
120
Switching Disciplines as a Tech Lead
segiddins
0
71
Other Decks in Technology
See All in Technology
Why Agent Cost Needs Observability
nttcom
0
120
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
120
.NET WebAssemblyで実現するクライアントサイドAI推論:NuGetからViteまで、2つのエコシステムを繋ぐビルド戦略
yamachu
1
430
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
1.1k
事業課題から技術的負債に向き合う
sansantech
PRO
2
2.2k
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.5k
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
3
580
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
240
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
2026-09-08 そのJavaモダナイゼーション、AIに丸投げで大丈夫?IBM Bobで変わる品質と効率
yutanonaka
1
130
CLIライブラリ開発を支える技術
htnabe
0
140
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
530
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
RailsConf 2023
tenderlove
30
1.6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Documentation Writing (for coders)
carmenintech
77
5.5k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
670
Abbi's Birthday
coloredviolet
4
10k
Prompt Engineering for Job Search
mfonobong
0
460
Test your architecture with Archunit
thirion
2
2.4k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
We Have a Design System, Now What?
morganepeng
55
8.3k
Transcript
The Limits of Modularity Samuel Giddins
Samuel Giddins Realm CocoaPods Bundler RestKit
Bundler & CocoaPods Two Dependency Managers
None
• ruby -e "$(curl -fsSL https:// raw.githubusercontent.com/Homebrew/install/master/ install)" • brew
install python • easy_install pip • pip install pygments • brew install rbenv ruby-install • rbenv install 2.2.2 • gem install pygments.rb
Let’s take a peek at the architecture behind CocoaPods
None
In an iOS App
Let’s start at the networking layer
We have ’s NSURLConnection / NSURLSession to base things off
of So far, so good
We then use JXHTTP or AFNetworking, since both provide some
features and a nicer API
We then make a TMAPIClient (inside a pod called TMTumblrSDK),
since we want to abstract away the network calls we make
We then make a TumblrCore pod, to be able to
share code between our app and its extensions
And now, we have Tumblr.app! Whew.
That’s what’s called a deep dependency graph.
aside: Those things are really hard to fully ‘resolve’ It’s
a problem I’ve sunk many hours into
So, this is great! We’ve re-used lots of code, made
things modular, ‘componentized’ everything... Life is wonderful!
Until...
We need to change things. (And yes, this is where
we get to the interesting parts)
Let’s say we want to update our UI to show
upload progress for a new post
(I went through nearly this exact scenario when I worked
on the Tumblr app)
OK, so the first step is going to be figuring
out where, exactly, in this stack we can even start.
Start in the wrong place, and you’ll be working at
the wrong level of abstraction, and you’ll be contorting to even make simple changes.
I just need to rearchitect sockets and everything will work
beautifully!
Have fun.
Well, I just need to swizzle these three methods, and
I can do everything in my app!
And again in my share extension. And then again in
the right place because who in their right mind wants to swizzle the same method in three places!?
Again & Again & Again
So we settle upon making this change inside JXHTTP. Excellent.
@property JXHTTPRequestProgressBlock progressBlock;
While we're in there, we choose to move a few
things around to make adding support for that progressBlock easier.
And this is great! !
So now we release a new minor version, and go
back up one level to incorporate those changes.
s/~> 1.2.4/~> 1.3.0
And our tests now fail !
Imagine this happening all the way up the dependency chain
Dependency Paralysis
When our frameworks aren't perfect, the gaps between them can
easily fissure
And our frameworks are never perfect
Edge cases and implicit assumptions propogate through each dependency
One subtle change can be in just the wrong place
And everything collapses
Our usual measures for keeping things sane & safe will
work against us
• Tests • Documentation • Encapsulation • Stable releases
All of those work by applying the brakes on drastic
changes
But N levels deep, every change at the bottom is
drastic
And you'll find that almost every change requires touching something
near the bottom
We also have to decide where to put everything
And choosing wrong? => !
We hear stories of Facebooks and the like with their
mono-repos
And all of this is why Move fast vs. being
"really" modular
So, Samuel, what's the right answer?
Available now on Speaker Deck. https://speakerdeck.com/segiddins/limits-of-modularity
for (Question *question in self.audience.questions) { NSLog(@"%@", [[question ask] valueForKey:@"answer"]);
}
Samuel Giddins Realm @segiddins