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
Laravel Boost 超入門
fire_arlo
2
180
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
390
CSC305 Summer Lecture 12
javiergs
PRO
0
130
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
810
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
310
Honoアップデート 2025年夏
yusukebe
1
900
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
330
サーバーサイドのビルド時間87倍高速化
plaidtech
PRO
0
690
Updates on MLS on Ruby (and maybe more)
sylph01
1
170
AI OCR API on Lambdaを Datadogで可視化してみた
nealle
0
230
Kiroで始めるAI-DLC
kaonash
2
520
OSS開発者という働き方
andpad
5
1.6k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Site-Speed That Sticks
csswizardry
10
810
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
284
13k
It's Worth the Effort
3n
187
28k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Balancing Empowerment & Direction
lara
3
610
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
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