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
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
C++でシェーダを書く
fadis
6
4.1k
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
950
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
690
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
Jakarta EE meets AI
ivargrimstad
0
660
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
Macとオーディオ再生 2024/11/02
yusukeito
0
370
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
KATA
mclloyd
29
14k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
4 Signs Your Business is Dying
shpigford
180
21k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Scaling GitHub
holman
458
140k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
We Have a Design System, Now What?
morganepeng
50
7.2k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Building Applications with DynamoDB
mza
90
6.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ͳ෦ࡐΛબ΅͏ʂ • ຖͷΒ͠ΛϋοΫ͠Α͏ʂ