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
2
41
Thoughs on Ruby libraries design
Vasily Kolesnikov
February 26, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
CSC307 Lecture 01
javiergs
PRO
0
690
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
3
290
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.9k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
Data-Centric Kaggle
isax1015
2
760
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
970
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Side Projects
sachag
455
43k
Test your architecture with Archunit
thirion
1
2.1k
Paper Plane
katiecoart
PRO
0
46k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Claude Code のすすめ
schroneko
67
210k
Chasing Engaging Ingredients in Design
codingconduct
0
110
Git: the NoSQL Database
bkeepers
PRO
432
66k
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