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
Hacking Home
Search
Akira Matsuda
April 19, 2014
Programming
31
6.3k
Hacking Home
大江戸Ruby会議04の講演"Hacking Home"のスライド
http://regional.rubykaigi.org/oedo04
#oedo04
Akira Matsuda
April 19, 2014
Tweet
Share
More Decks by Akira Matsuda
See All by Akira Matsuda
初心者のためのRubyKaigi入門/RubyKaigi Introduction
a_matsuda
13
4.7k
Hanamiを支える技術 2023 / Asakusa.rb Hanami 2023
a_matsuda
2
530
Rails 7.1をn倍速くした話
a_matsuda
11
12k
RubyKaigi 2022 After Talk
a_matsuda
0
400
Coming Soon…💎 / coming soon
a_matsuda
12
7.7k
Rails Performance Issues and Solutions
a_matsuda
9
35k
Extending Rails for Real World App Development
a_matsuda
9
7.4k
A RubyKaigi Talk
a_matsuda
8
2.3k
Ginza Rails 1
a_matsuda
6
1.2k
Other Decks in Programming
See All in Programming
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Contemporary Test Cases
maaretp
0
130
イベント駆動で成長して委員会
happymana
1
320
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
250
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
RubyLSPのマルチバイト文字対応
notfounds
0
120
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
最新TCAキャッチアップ
0si43
0
140
Quine, Polyglot, 良いコード
qnighy
4
640
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Featured
See All Featured
A better future with KSS
kneath
238
17k
Six Lessons from altMBA
skipperchong
27
3.5k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Why Our Code Smells
bkeepers
PRO
334
57k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Writing Fast Ruby
sferik
627
61k
Designing for Performance
lara
604
68k
A Philosophy of Restraint
colly
203
16k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Gamification - CAS2011
davidbonilla
80
5k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Transcript
Hacking (My) Home Akira Matsuda
self • GitHub: amatsuda • Twitter: @a_matsuda
Asakusa.rbओ࠵ͯ͠·͢
None
աڈͷେߐށRubyձٞ • 01 => جௐߨԋ • 02 => Dave Thomas͔ͬͯ͠ͳ͍
(͚ͲDaveݺΜͩͷΦϨΦϨ) • 03 => جௐߨԋ
04 (Date.today) • Ebi & Aaron • aamine • ko1
& Yuki Sasada • zzak • hone • Kawamoto • ...
No technical talk from me today!
Actually, no code in the slides!
ʮੜ׆ൃදձʯ
My next technical talk will be at RailsConf 2014 •
At Chicago • Next week
ʮAsakusa.rbͷ ୈ256ճͷmeetupʯ
ઙ.rbཱϝϯόʔ • amatsuda => ઙ • kakutani => ྆ࠃ •
ko1 => ຊॴޗ࠺ڮ
ઙ.rbཱϝϯόʔ • amatsuda => ઙ • kakutani => ྆ࠃ •
ko1 => ຊॴޗ࠺ڮ Ͳ͔ͬӈͷ΄͏
TBH I do no more live in ઙ • amatsuda
=> ઙ ࠜ • kakutani => ྆ࠃ • ko1 => ຊॴޗ࠺ڮ
Life in ઙ • 2004ʹఆՁ3,800ສԁͷ ৽ஙϚϯγϣϯΛߪೖ • 10ؒډॅ • ϚϯγϣϯݱࡏିͰӡ༻த
ച٫ʁିʁ
ച٫ʹ͋ͨͬͯ • ࢿ࢈ධՁֹͷݟੵΓ
2012࣌ • 3,500ສԁ (by େखۜߦܥۚ༥ػؔ)
ࢿ࢈ՁͷݮΓֹ • 2004: 3800ສ • 2012: 3500ສ • => 37.5ສ
/ year • => 3.125ສ / month
Α͋͘Δޡղ (1)
ିऩೖ • 18.5ສ / month • 18.5ສ * 12 =
222ສ / year • 3800.0ສ / 222ສ = 17.117...
ି݅ͷݪࢿճऩ17
େՈ͞ΜΛͬͯΈͯ Θ͔ͬͨ͜ͱ • Ոͱ͔ཧඅͱ͔ͷઃఆ͖ͯͱ͏ • ΒΕΔ͜ͱΛݟࠐΜͩՁ֨ઃఆ
େՈۀ·ͱΊ • ࢿ࢈ՁͷݮΓ: 3.125ສ / month • ିऩೖ: 18.5ສ /
month
Α͋͘Δޡղ (2) • ෆಈ࢈Λങͬͯ͠·͏ͱ Ҿͬӽͤͳ͘ͳΔʁ
ઙʹ10ॅΜͩͷͰ Ҿͬӽͯ͠Έ·ͨ͠ɻ
લճϚϯγϣϯ͔ͩͬͨΒ ࠓށݐͯʹͯ͠Έ·ͨ͠ɻ
ށݐͯ vs. Ϛϯγϣϯ • ށݐͯͷ΄͏͕͍Ζ͍Ζ͍͠ • ށݐͯͷ΄͏͕͍Ζ͍Ζࣗ༝͕ߴ͍
ށݐͯͷ΄͏͕͍͠ • ษڧ͠ͳ͖Ό͍͚ͳ͍͜ͱ͕ଟ͍ • εςʔΫϗϧμʔ͕ଟ͍
ϚϯγϣϯߪೖλΠϜϥΠϯ • ݅બఆ • आۚ & ܖ • ɺೖډ
ށݐͯߪೖλΠϜϥΠϯ • ͷܖ • आۚ • ͷߪೖ • ݐͷܖ •
आۚ • ݐͷߪೖ • ɺೖډ
ͷߪೖ
ͷબఆ • ॅΈ͍ͨҬΛܾΊΔ • ͏ͪͷ߹ʮ୩ࠜઍʯʹݶఆ • ͦͷҬͷͷෆಈ࢈ΛճΔ • Πϯλʔωοτ(جຊతʹ)ʹཱͨ ͳ͍
आۚ
ۚ༥ػ͍ؔΖ͍Ζ • ࢢۜ • ۜ • ৴ୗۜߦ • ωοτۜߦ •
৴ۚ • Ώ͏ͪΐ
ʮࣗ༝ۀʯआ͕͍ۚ͠ • αϥϦʔϚϯ͕͏Β·͍͠Ͱ͢ • ʮࣾձత৴༻ʯॏཁ
ʮࣗ༝ۀʯͲͷΑ͏ʹ ධՁ͞ΕΔ͔ʁ
ʮࣾձత৴༻ʯͷௐࠪ • They use Internet!
ʮࣾձత৴༻ʯ on the net • ஶ࡞ • Rails3ϨγϐϒοΫɺHead First Rails
• ݞॻ͖ • φκͷऔకɺϑΣϩʔۀ • ߨԋ • ͍ΖΜͳࠃͰͬͨΓͯ͠Δ • ΠϯλϏϡʔ • Δͼ·ɺଜ͞Μɺߴڮ৴པ͞Μ
Δͼ·͍͢͝ʂ • ৴ୗۜߦͷ୲ऀ͕Δͼ·ͷ ΠϯλϏϡʔಡΜͰͯϏϏͬͨʂ
2ͭͷੈքଓ͖ͩͬͨʂ • RubyίϛϡχςΟͰͷϓϨθϯε্ => ݱ࣮ࣾձͰͷ৴༻্ • ʑͷίϛοτͷੵΈॏͶ => RubyίϛϡχςΟͰͷϓϨθϯε্
ͭ·Γɺ • RubyͷίʔυΛॻ͚आ͕ۚͰ͖Δʂ
ݐΛݐͯΔ
γεςϜ։ൃʹࣅ͍ͯΔ
๏ͷબఆ • • మࠎ • RC • etc.
మࠎ vs. • ॏްɺେن vs. খճΓɺࣗ༝ • ੩తܕ͚ݴޠ vs.
ಈతݴޠ • JEE vs. LL
ݐங • ࡏདྷ • 2 x 4ɹ • ֤ࣾಠࣗͷ৭ʑ
࡞Γํ͍Ζ͍Ζ • εΫϥον • ϑϧελοΫϑϨʔϜϫʔΫɹ • ࣗࣾFWɺࣗࣾϥΠϒϥϦ
εςʔΫϗϧμʔ͍Ζ͍Ζ • ചΓͷෆಈ࢈ • ॴ༗ऀ • ϋεϝʔΧʔ • ઃܭ࢜ •
σβΠφʔ • େ • ۜߦ
ϓϩϚωʁ
ϓϩϚωʁ • ސ٬ == ϓϩϚω
ϓϩϚωʁ • ސ٬ == ϓϩϚω • ՈΛݐͯΔͱϓϩϚωۀ͕ ܦݧͰ͖·͢ʂ
ઃܭ
ʮιʔείʔυ: ιϑτΣΞͷઃܭਤ Έ͍ͨͳͷʯ
ͱ͍͏͜ͱɺ
ઃܭਤ == ιʔείʔυΈ͍ͨͳͷ • ઃܭ࢜ͷݸੑ͕ग़Δ • ઃܭ࢜ͷ͍͕͍ͬͯ͜Δ • ಡΜͰָ͍ͯ͠ʂ
ઃܭϑΣʔζ • ͏ͪͷ߹ 4ʙ5ϲ݄͙Β͍ (ि2ʙ3ճ͙Β͍ଧͪ߹Θͤ) • ଧͪ߹Θͤฏͷޕલத͕͓͢͢Ί • ઃܭCAD()Ͱ •
ଧͪ߹ΘͤPCͷը໘Λݟͳ͕Β • ຖճଧͪ߹Θͤޙʹ࠷৽൛ͷઃܭਤ͕ࢴͰΒ͑Δ
ઃܭਤ • ຖճຖճຖճຖճɺʮࢴͰʯ
ʮσʔλͰ͘Εʯ • ͑ͬʁ • ͑ͬʁ • ʮͦΜͳ͜ͱΛݴΘΕͨͷॳΊͯͩʯ
ʮσʔλͰ͘Εʯ • ΦʔϓϯͳCADϑΥʔϚοτͱ͔͋Δ ͡ΌΜ • ͦΜͳΦϞνϟʹରԠͯ͠·ͤΜ…
ΥʔλʔϑΥʔϧ vs. ΞδϟΠϧ
ΥʔλʔϑΥʔϧͳͱ͜Ζ • ܖͷ࣌Ͱͯ͢ͷఔ͕ܾΊΒΕͨ ఔද͕Ͱ͖͍ͯΔ • ͪΌΜͱఔදʹԊ࣮͕ͬͯਐΜͰɺ ͪΌΜͱೲظʹϞϊ͕͕͋Δʂ
ΥʔλϑΥʔϧΛࢧ͑Δٕज़ • ྺ࢙ͱܦݧʹཪଧͪ͞Εͨ ਫ਼ͷߴ͍ݟੵΓ • దͳϘϦϡʔϜͷόοϑΝ
ΞδϟΠϧͳͱ͜Ζ • ࣮࣮தʹ݁ߏઃܭόά͕ݟ͔ͭΔ • ࣮͕ਐΉʹ࿈Εͯސ٬͔Β ৽ͨͳཁ͕͋Ε͜Εग़ͯ͘Δ
ΞδϟΠϧͳͱ͜Ζ • ͍͍ͩͨݱͰ͍͍۩߹ʹٵऩͯ͠ Ͳ͏ʹ͔ղܾͯ͘͠ΕΔ • Embrace Changes!
ݐஙۀքਐΜͰ͍Δ • ΥʔλʔϑΥʔϧͬΆ͞ͱΞδϟΠϧ ͬΆ͕͞ͱͯྑ͍όϥϯεͰಉډ
࣮ϑΣʔζ • ओ୲ͷେ1ਓ • جૅɺࠨɺΫϩεɺ֎ߏɺ ͳͲͳͲ৭ʑ
࣮ϑΣʔζ • γεςϜ։ൃͰͨͱ͑ΔͳΒɺ αʔόʔଆͷίʔυ΄΅1ਓͰॻ͍ͯɺ ΫΤϦɺJSɺϚʔΫΞοϓɺetc. ʹपΓΛৼΔΠϝʔδ
ઃܭ͕ݟΕΔޣຯ • ෦ࡐ͕ѲɺબఆͰ͖Δ • ϑϩʔϦϯάɺλΠϧɺนࡐɺυΞɺ૭ɺ Ϋϩεɺ෩࿊ɾΩονϯɾτΠϨɺࣨɺ etc. • ސ٬͕bundleͯ͠Δgemͱ͔ʹ·Ͱ ޱग़͠Ͱ͖ΔΠϝʔδ
(ϓϩάϥϚʔతʹ)໘ന͍෦ࡐ • ਓײηϯαʔ͖র໌ • ిಈεΫϦʔϯ
ਓײηϯαʔ͖র໌ • ηϯαʔ + র໌ ͷ all in one
ྫ͑ɺτΠϨͷ߹ • ୭͔͕τΠϨʹೖΔ • => ηϯαʔ͕ಇ͍ͯిؾ͕͘ • τΠϨ͔Βग़Δ • =>
ిؾ͕ফ͑Δ
ͱ͍͏͜ͱɺ • ηϯαʔͷ͕औΕΕɺτΠϨͷ ۭ͖ঢ়گ͕ϦϞʔτͰѲͰ͖Δʂ
ʮηϯαʔͷAPIͳ͍ͷʁʯ • ʁ • ʮͦΜͳ͜ͱΛݴΘΕͨͷॳΊͯͩʯ • વͦΜͳͷͳ͍
ݱঢ় • ݐஙݱ෦ࡐϝʔΧʔ·Ͱ ϓϩάϥϚʔͷ͕ಧ͍͍ͯͳ͍ • ͍ΖΜͳ෦ࡐ͕APIΛఏڙͯ͘͠ΕΔ Α͏ʹͳͬͨΒͬͱՈ͕ศརʹͳΔ ͣʂ
Ideas • ਓ͕͍ۙͮͨ͜ͱΛݕ͢Δݰؔ • ਓ͕͍ͬͯΔ͜ͱΛݕ͢Δচ֊ஈ • ૭Λ։͚ΔAPI • υΞΛ։͚ΔAPI
Hacking My Home
৭ʑHackͰ͖ΔΞΠςϜ • IRKit • Future Home Controller
IRKit • ֎ઢΛ௨͍ͯ͡Ζ͍ΖϋοΫ͢Δ ָ͍ͭ͠
IRKit • ҙͷ֎ઢϦϞίϯ͔ΒIRKitʹ֎ઢ ৴߸Λૹग़ • => IRKitʹऔΓࠐΜͰJSONͰอଘ • IRKitʹHTTPͰҙͷJSONΛૹΓ͚ͭΔ •
=> IRKit͔Β֎ઢ৴߸ͱͯ͠ૹग़
༻ྫ • ϦϏϯάϧʔϜͷిಈεΫϦʔϯΛɺ ৗ࣌ىಈ͍ͯ͠ΔMacMini͔Β curlίϚϯυͰ։ด • ͜ΕΛcronͰຖே൩ࣗಈ࣮ߦ
Demo
༻ྫ(not implemented yet) • Թηϯαʔͱ࿈ಈͯ͠ɺ ॵ͘ͳͬͨΒউखʹΤΞίϯΛ͚ͭΔ ʗॵ͘ͳ͘ͳͬͨΒউखʹফ͢ • ຖܾ·ͬͨ࣌ؒʹRoombaΛىಈͯ͠ উखʹআ͢Δ
Conclusion • Hack home everyday, and that'll buy you a
house.
Conclusion (2) • ͓͏ͪΛݐͯΑ͏ʂ • Programmableͳ෦ࡐΛબ΅͏ʂ • ຖͷΒ͠ΛϋοΫ͠Α͏ʂ