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.4k
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.8k
Hanamiを支える技術 2023 / Asakusa.rb Hanami 2023
a_matsuda
2
550
Rails 7.1をn倍速くした話
a_matsuda
11
12k
RubyKaigi 2022 After Talk
a_matsuda
0
420
Coming Soon…💎 / coming soon
a_matsuda
12
7.8k
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.4k
Ginza Rails 1
a_matsuda
6
1.2k
Other Decks in Programming
See All in Programming
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
750
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
410
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
290
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
300
Zoneless Testing
rainerhahnekamp
0
130
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
420
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
590
CloudflareStack でRAGに入門
asahiiwm
0
130
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.1k
どうして手を動かすよりもチーム内のコードレビューを優先するべきなのか
okashoi
3
660
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.6k
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
96
5.2k
Practical Orchestrator
shlominoach
186
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
180
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Making Projects Easy
brettharned
116
6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
96
17k
4 Signs Your Business is Dying
shpigford
182
21k
A better future with KSS
kneath
238
17k
Mobile First: as difficult as doing things right
swwweet
222
9k
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ͳ෦ࡐΛબ΅͏ʂ • ຖͷΒ͠ΛϋοΫ͠Α͏ʂ