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
40
Thoughs on Ruby libraries design
Vasily Kolesnikov
February 26, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
実はすごいスピードで進化しているCSS
hayato_yokoyama
0
110
[初登壇@jAZUG]アプリ開発者が気になるGoogleCloud/Azure+wasm/wasi
asaringo
0
130
イベントストーミングから始めるドメイン駆動設計
jgeem
4
810
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
280
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
22
5.9k
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
350
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
110
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
910
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
110
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
120
単体テストの始め方/作り方
toms74209200
0
430
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
440
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
780
Unsuck your backbone
ammeep
671
58k
Designing for Performance
lara
609
69k
Code Review Best Practice
trishagee
68
18k
For a Future-Friendly Web
brad_frost
179
9.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Bash Introduction
62gerente
614
210k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Raft: Consensus for Rubyists
vanstee
139
7k
Documentation Writing (for coders)
carmenintech
71
4.9k
Building Adaptive Systems
keathley
43
2.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
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