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
Thoughs on Ruby libraries design
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Vasily Kolesnikov
February 26, 2019
Programming
41
2
Share
Thoughs on Ruby libraries design
Vasily Kolesnikov
February 26, 2019
Other Decks in Programming
See All in Programming
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
2
260
Java 21/25 Virtual Threads 소개
debop
0
340
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
310
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
360
Don't Prompt Harder, Structure Better
kitasuke
0
640
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
240
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
170
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
860
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
730
飯MCP
yusukebe
0
490
ファインチューニングせずメインコンペを解く方法
pokutuna
0
280
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Evolving SEO for Evolving Search Engines
ryanjones
0
180
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Thoughts on Productivity
jonyablonski
76
5.1k
Designing for Timeless Needs
cassininazir
0
190
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Utilizing Notion as your number one productivity tool
mfonobong
4
290
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
370
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
330
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
290
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Transcript
Thoughts on Ruby libraries design 1
Library • Fulfils its purpose • No negative effects on
the target code • (Optional) Simple and extendable code 2
• Libraries may conflict with other parts of your code
• Clash top-level constant names • Incompatible versions of mutual dependencies • Change the target code process behaviour Negative effects 3
Dependencies 4
Dependencies 5
Version locking 6
• Versioning is important: • Change-logs • Semantic versioning •
Back-porting • Optimistic vs. Pessimistic version lock Dependencies 7
Top-level constants 8
Integration 9
Faraday::Typheus 10
Faraday::Typheus 11
Faraday::Typheus 12
13
14
15
16
Ran for 2 hrs 3 min 3sec. Total time 10
hrs 16 min 5 sec 17
Environment variables • The process attribute • Should not be
used inside a library code directly 18
Environment variables 19
20
Example: Redis 21
Example: Redis 22
Optional dependency 23
Core extensions 24
vs. Core extensions 25
26
27
28
29
Consider harmful • Extra dependencies • Out of scope work
(configuration of 3-rd libs) • Process modification (at_exit, signal traps) • Singleton and/or global (class level) configuration • Monkey patches • Common names of top-level modules 30
Thanks! 31
[email protected]
Moscow 2019