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
GitHub Copilot CLIのいいところ
htkym
2
1.2k
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
330
LLM Plugin for Node-REDの利用方法と開発について
404background
0
150
Claspは野良GASの夢をみるか
takter00
0
150
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
5
2.3k
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
110
さぁV100、メモリをお食べ・・・
nilpe
0
120
JavaDoc 再入門
nagise
0
230
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
5k
iOS26時代の新規アプリ開発
yuukiw00w
0
230
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
520
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
410
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
600
Odyssey Design
rkendrick25
PRO
2
660
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
410
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
540
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Test your architecture with Archunit
thirion
1
2.3k
Paper Plane
katiecoart
PRO
1
50k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
260
Raft: Consensus for Rubyists
vanstee
141
7.5k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
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