Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Thoughs on Ruby libraries design
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
速習iPhone Duo対応
yuukiw00w
2
980
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
780
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
380
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.6k
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.3k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
ジョジョの世界をXRで再現する
mofurune
0
150
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
Workers Cache を知る
syumai
0
350
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Docker and Python
trallard
47
4.2k
So, you think you're a good person
axbom
PRO
2
2.2k
For a Future-Friendly Web
brad_frost
184
10k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
The Invisible Side of Design
smashingmag
301
52k
Product Roadmaps are Hard
iamctodd
55
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