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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Vasily Kolesnikov
February 26, 2019
Programming
43
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Thoughs on Ruby libraries design
Vasily Kolesnikov
February 26, 2019
Other Decks in Programming
See All in Programming
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
290
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
210
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
270
Claude Team Plan導入・ガイド
tk3fftk
0
250
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
140
Cloudflare is Agents
chimame
0
110
React本体のコードリーディング
high_g_engineer
1
130
テーブルをDELETEした
yuzneri
0
130
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
4
1.3k
霧の中の代数的エフェクト
funnyycat
1
460
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
1
210
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
440
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
760
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
400
Designing for Timeless Needs
cassininazir
1
430
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
460
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
350
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
A better future with KSS
kneath
240
18k
So, you think you're a good person
axbom
PRO
2
2.1k
How GitHub (no longer) Works
holman
316
150k
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