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
42
2
Share
Thoughs on Ruby libraries design
Vasily Kolesnikov
February 26, 2019
Other Decks in Programming
See All in Programming
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
140
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
110
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.4k
Moments When Things Go Wrong
aurimas
3
130
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
320
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
0
310
AI開発を加速するためにテスト戦略を言語化した
yoshihiro_shu
0
100
inferと仲良くなる10分間
ryokatsuse
1
300
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
330
3Dシーンの圧縮
fadis
1
560
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
300
Are puppies a ranking factor?
jonoalderson
1
3.5k
Building Applications with DynamoDB
mza
96
7.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
130
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Unsuck your backbone
ammeep
672
58k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
370
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
810
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
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