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
Lightweight Objects Seattle.rb
Search
pete higgins
March 05, 2013
Programming
1
84
Lightweight Objects Seattle.rb
pete higgins
March 05, 2013
Tweet
Share
More Decks by pete higgins
See All by pete higgins
Help Seattle.rb
phiggins
0
88
Rails Archeology
phiggins
2
120
Webmock
phiggins
0
76
Ruby Stdlib's Benchmark
phiggins
0
67
Rails Maintainance Headaches
phiggins
0
140
Hacking Ruby
phiggins
3
220
Cute Animals You've Never Heard Of
phiggins
0
480
Other Decks in Programming
See All in Programming
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
4
330
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
AgentCoreとHuman in the Loop
har1101
5
220
組織で育むオブザーバビリティ
ryota_hnk
0
170
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
AI & Enginnering
codelynx
0
110
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
高速開発のためのコード整理術
sutetotanuki
1
390
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
Oxlintはいいぞ
yug1224
5
1.3k
AI巻き込み型コードレビューのススメ
nealle
0
130
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
180
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How to Ace a Technical Interview
jacobian
281
24k
Designing Powerful Visuals for Engaging Learning
tmiket
0
220
Believing is Seeing
oripsolob
1
53
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
Being A Developer After 40
akosma
91
590k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Transcript
Lightweight Objects Pete Higgins Seattle.rb
Me twitter: @pete_higgins github: @phiggins
Not me
Also not me
Me
Me
Me
Why? * Fast development * boilerplate == typos * less
typing, laziness
Hash/Array/etc * Familiar * Builtin * (Relatively) efficient * Do
a lot out of the box
Downsides * Bad at conveying purpose
OpenStruct
Configuration
Simple Stubs
Result/Status
Default is nil
Struct
Simple stubs
Result/Status
Downsides * Not much more work to just use a
class * Not easy to initialize with a hash
Struct creation
OpenStruct vs. Hash ¯\_( ツ )_/¯
Minitest::Mock
Questions? twitter: @pete_higgins github: @phiggins