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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
AgentCoreとHuman in the Loop
har1101
5
230
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
Basic Architectures
denyspoltorak
0
660
Implementation Patterns
denyspoltorak
0
280
SourceGeneratorのススメ
htkym
0
190
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
990
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
180
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
250
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
79
The SEO Collaboration Effect
kristinabergwall1
0
350
Building AI with AI
inesmontani
PRO
1
680
Ethics towards AI in product and experience design
skipperchong
2
190
A better future with KSS
kneath
240
18k
Darren the Foodie - Storyboard
khoart
PRO
2
2.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Documentation Writing (for coders)
carmenintech
77
5.2k
Designing Experiences People Love
moore
144
24k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Designing Powerful Visuals for Engaging Learning
tmiket
0
220
Side Projects
sachag
455
43k
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