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
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
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.1k
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
0
200
感情を設計する
ichimichi
5
1.3k
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
230
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
180
Java 21/25 Virtual Threads 소개
debop
0
340
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.8k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
290
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
570
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Coding as Prompting Since 2025
ragingwind
0
770
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
160
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
150
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The untapped power of vector embeddings
frankvandijk
2
1.7k
The browser strikes back
jonoalderson
0
930
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
690
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
340
Product Roadmaps are Hard
iamctodd
PRO
55
12k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
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