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.6k
Hanamiを支える技術 2023 / Asakusa.rb Hanami 2023
a_matsuda
2
520
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
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
160
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
4
1.6k
CSC509 Lecture 08
javiergs
PRO
0
110
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
7
2.8k
macOS でできる リアルタイム動画像処理
biacco42
7
1.9k
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
330
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
210
Featured
See All Featured
BBQ
matthewcrist
85
9.3k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Teambox: Starting and Learning
jrom
132
8.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Code Review Best Practice
trishagee
64
17k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Making Projects Easy
brettharned
115
5.9k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
YesSQL, Process and Tooling at Scale
rocio
167
14k
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ͳ෦ࡐΛબ΅͏ʂ • ຖͷΒ͠ΛϋοΫ͠Α͏ʂ