Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hacking Home

Hacking Home

大江戸Ruby会議04の講演"Hacking Home"のスライド http://regional.rubykaigi.org/oedo04 #oedo04

Akira Matsuda

April 19, 2014
Tweet

More Decks by Akira Matsuda

Other Decks in Programming

Transcript

  1. Hacking
    (My) Home
    Akira Matsuda

    View full-size slide

  2. self
    • GitHub: amatsuda
    • Twitter: @a_matsuda

    View full-size slide

  3. Asakusa.rbओ࠵ͯ͠·͢

    View full-size slide

  4. աڈͷେߐށRubyձٞ
    • 01 => جௐߨԋ
    • 02 => Dave Thomas͔͠஻ͬͯͳ͍
    (͚ͲDaveݺΜͩͷΦϨΦϨ)
    • 03 => جௐߨԋ

    View full-size slide

  5. 04 (Date.today)
    • Ebi & Aaron
    • aamine
    • ko1 & Yuki Sasada
    • zzak
    • hone
    • Kawamoto
    • ...

    View full-size slide

  6. No technical talk
    from me today!

    View full-size slide

  7. Actually, no code
    in the slides!

    View full-size slide

  8. ʮੜ׆ൃදձʯ

    View full-size slide

  9. My next technical talk will be at
    RailsConf 2014
    • At Chicago
    • Next week

    View full-size slide

  10. ʮAsakusa.rbͷ
    ୈ256ճ໨ͷmeetupʯ

    View full-size slide

  11. ઙ૲.rb૑ཱϝϯόʔ
    • amatsuda => ੢ઙ૲
    • kakutani => ྆ࠃ
    • ko1 => ຊॴޗ࠺ڮ

    View full-size slide

  12. ઙ૲.rb૑ཱϝϯόʔ
    • amatsuda => ੢ઙ૲
    • kakutani => ྆ࠃ
    • ko1 => ຊॴޗ࠺ڮ Ͳ͔ͬӈͷ΄͏

    View full-size slide

  13. TBH I do no more live in ઙ૲
    • amatsuda => ੢ઙ૲ ࠜ௡
    • kakutani => ྆ࠃ
    • ko1 => ຊॴޗ࠺ڮ

    View full-size slide

  14. Life in ઙ૲
    • 2004೥ʹఆՁ3,800ສԁ୅ͷ
    ৽ஙϚϯγϣϯΛߪೖ
    • ໿10೥ؒډॅ
    • Ϛϯγϣϯ͸ݱࡏ͸௞ିͰӡ༻த

    View full-size slide

  15. ച٫ʁ௞ିʁ

    View full-size slide

  16. ച٫ʹ͋ͨͬͯ
    • ࢿ࢈ධՁֹͷݟੵ΋Γ

    View full-size slide

  17. 2012೥࣌఺
    • 3,500ສԁ୅
    (by ๭େखۜߦܥۚ༥ػؔ)

    View full-size slide

  18. ࢿ࢈Ձ஋ͷ໨ݮΓֹ
    • 2004: 3800ສ
    • 2012: 3500ສ
    • => 37.5ສ / year
    • => 3.125ສ / month

    View full-size slide

  19. Α͋͘Δޡղ (1)

    View full-size slide

  20. ௞ିऩೖ
    • 18.5ສ / month
    • 18.5ສ * 12 = 222ສ / year
    • 3800.0ສ / 222ສ = 17.117...

    View full-size slide

  21. ௞ି෺݅ͷݪࢿճऩ͸໿17೥

    View full-size slide

  22. େՈ͞ΜΛ΍ͬͯΈͯ
    Θ͔ͬͨ͜ͱ
    • Ո௞ͱ͔؅ཧඅͱ͔ͷઃఆ͸௒͖ͯͱ͏
    • ஋੾ΒΕΔ͜ͱΛݟࠐΜͩՁ֨ઃఆ

    View full-size slide

  23. େՈۀ·ͱΊ
    • ࢿ࢈Ձ஋ͷ໨ݮΓ: 3.125ສ / month
    • ௞ିऩೖ: 18.5ສ / month

    View full-size slide

  24. Α͋͘Δޡղ (2)
    • ෆಈ࢈Λങͬͯ͠·͏ͱ
    Ҿͬӽͤͳ͘ͳΔʁ

    View full-size slide

  25. ઙ૲ʹ10೥ॅΜͩͷͰ
    Ҿͬӽͯ͠Έ·ͨ͠ɻ

    View full-size slide

  26. લճ͸Ϛϯγϣϯ͔ͩͬͨΒ
    ࠓ౓͸ށݐͯʹͯ͠Έ·ͨ͠ɻ

    View full-size slide

  27. ށݐͯ vs. Ϛϯγϣϯ
    • ށݐͯͷ΄͏͕͍Ζ͍Ζ೉͍͠
    • ށݐͯͷ΄͏͕͍Ζ͍Ζࣗ༝౓͕ߴ͍

    View full-size slide

  28. ށݐͯͷ΄͏͕೉͍͠
    • ษڧ͠ͳ͖Ό͍͚ͳ͍͜ͱ͕ଟ͍
    • εςʔΫϗϧμʔ͕ଟ͍

    View full-size slide

  29. ϚϯγϣϯߪೖλΠϜϥΠϯ
    • ෺݅બఆ
    • आۚ & ܖ໿
    • ׬੒ɺೖډ

    View full-size slide

  30. ށݐͯߪೖλΠϜϥΠϯ
    • ౔஍ͷܖ໿
    • आۚ
    • ౔஍ͷߪೖ
    • ݐ෺ͷܖ໿
    • आۚ
    • ݐ෺ͷߪೖ
    • ׬੒ɺೖډ

    View full-size slide

  31. ౔஍ͷߪೖ

    View full-size slide

  32. ౔஍ͷબఆ
    • ॅΈ͍ͨ஍ҬΛܾΊΔ
    • ͏ͪͷ৔߹͸ʮ୩ࠜઍʯʹݶఆ
    • ͦͷ஍Ҭͷ஍৔ͷෆಈ࢈԰ΛճΔ
    • Πϯλʔωοτ͸(جຊతʹ)໾ʹཱͨ
    ͳ͍

    View full-size slide

  33. ۚ༥ػ͍ؔΖ͍Ζ
    • ౎ࢢۜ
    • ஍ۜ
    • ৴ୗۜߦ
    • ωοτۜߦ
    • ৴ۚ
    • Ώ͏ͪΐ

    View full-size slide

  34. ʮࣗ༝ۀʯ͸आ͕ۚ೉͍͠
    • αϥϦʔϚϯ͕͏Β΍·͍͠Ͱ͢
    • ʮࣾձత৴༻ʯॏཁ

    View full-size slide

  35. ʮࣗ༝ۀʯ͸ͲͷΑ͏ʹ
    ධՁ͞ΕΔ͔ʁ

    View full-size slide

  36. ʮࣾձత৴༻ʯͷௐࠪ
    • They use Internet!

    View full-size slide

  37. ʮࣾձత৴༻ʯ on the net
    • ஶ࡞෺
    • Rails3ϨγϐϒοΫɺHead First Rails
    • ݞॻ͖
    • φκͷऔక໾ɺϑΣϩʔۀ
    • ߨԋ
    • ͍ΖΜͳࠃͰ஻ͬͨΓͯ͠Δ
    • ΠϯλϏϡʔ
    • Δͼ·ɺ੢ଜ͞Μɺߴڮ৴པ͞Μ

    View full-size slide

  38. Δͼ·͍͢͝ʂ
    • ৴ୗۜߦͷ୲౰ऀ͕Δͼ·ͷ
    ΠϯλϏϡʔಡΜͰͯϏϏͬͨʂ

    View full-size slide

  39. 2ͭͷੈք͸஍ଓ͖ͩͬͨʂ
    • RubyίϛϡχςΟͰͷϓϨθϯε޲্
    => ݱ࣮ࣾձͰͷ৴༻޲্
    • ೔ʑͷίϛοτͷੵΈॏͶ
    => RubyίϛϡχςΟͰͷϓϨθϯε޲্

    View full-size slide

  40. ͭ·Γɺ
    • RubyͷίʔυΛॻ͚͹आ͕ۚͰ͖Δʂ

    View full-size slide

  41. ݐ෺ΛݐͯΔ

    View full-size slide

  42. γεςϜ։ൃʹࣅ͍ͯΔ

    View full-size slide

  43. ޻๏ͷબఆ
    • ໦଄
    • మࠎ
    • RC
    • etc.

    View full-size slide

  44. మࠎ vs. ໦଄
    • ॏްɺେن໛ vs. খճΓɺࣗ༝
    • ੩తܕ෇͚ݴޠ vs. ಈతݴޠ
    • JEE vs. LL

    View full-size slide

  45. ໦଄ݐங
    • ࡏདྷ
    • 2 x 4ɹ
    • ֤ࣾಠࣗͷ৭ʑ

    View full-size slide

  46. ࡞Γํ͍Ζ͍Ζ
    • εΫϥον
    • ϑϧελοΫϑϨʔϜϫʔΫɹ
    • ࣗࣾFWɺࣗࣾϥΠϒϥϦ

    View full-size slide

  47. εςʔΫϗϧμʔ͍Ζ͍Ζ
    • ౔஍ചΓͷෆಈ࢈԰
    • ౔஍ॴ༗ऀ
    • ϋ΢εϝʔΧʔ
    • ઃܭ࢜
    • σβΠφʔ
    • େ޻
    • ۜߦ

    View full-size slide

  48. ϓϩϚωʁ
    • ސ٬ == ϓϩϚω

    View full-size slide

  49. ϓϩϚωʁ
    • ސ٬ == ϓϩϚω
    • ՈΛݐͯΔͱϓϩϚωۀ͕
    ܦݧͰ͖·͢ʂ

    View full-size slide

  50. ʮιʔείʔυ: ιϑτ΢ΣΞͷઃܭਤ
    Έ͍ͨͳ΋ͷʯ

    View full-size slide

  51. ͱ͍͏͜ͱ͸ɺ

    View full-size slide

  52. ઃܭਤ == ιʔείʔυΈ͍ͨͳ΋ͷ
    • ઃܭ࢜ͷݸੑ͕ग़Δ
    • ઃܭ࢜ͷ૝͍͕͜΋͍ͬͯΔ
    • ಡΜͰָ͍ͯ͠ʂ

    View full-size slide

  53. ઃܭϑΣʔζ
    • ͏ͪͷ৔߹͸ 4ʙ5ϲ݄͙Β͍
    (ि2ʙ3ճ͙Β͍͸ଧͪ߹Θͤ)
    • ଧͪ߹Θͤ͸ฏ೔ͷޕલத͕͓͢͢Ί
    • ઃܭ͸CAD(಺੡)Ͱ
    • ଧͪ߹Θͤ͸PCͷը໘Λݟͳ͕Β
    • ຖճଧͪ߹Θͤޙʹ࠷৽൛ͷઃܭਤ͕ࢴͰ΋Β͑Δ

    View full-size slide

  54. ઃܭਤ
    • ຖճຖճຖճຖճɺʮࢴͰʯ

    View full-size slide

  55. ʮσʔλͰ͘Εʯ
    • ͑ͬʁ
    • ͑ͬʁ
    • ʮͦΜͳ͜ͱΛݴΘΕͨͷ͸ॳΊͯͩʯ

    View full-size slide

  56. ʮσʔλͰ͘Εʯ
    • ΦʔϓϯͳCADϑΥʔϚοτͱ͔͋Δ
    ͡ΌΜ
    • ͦΜͳΦϞνϟʹ͸ରԠͯ͠·ͤΜ…

    View full-size slide

  57. ΢ΥʔλʔϑΥʔϧ vs. ΞδϟΠϧ

    View full-size slide

  58. ΢ΥʔλʔϑΥʔϧͳͱ͜Ζ
    • ܖ໿ͷ࣌఺Ͱ͢΂ͯͷ޻ఔ͕ܾΊΒΕͨ
    ޻ఔද͕Ͱ͖͍ͯΔ
    • ͪΌΜͱ޻ఔදʹԊ࣮ͬͯ૷͕ਐΜͰɺ
    ͪΌΜͱೲظʹϞϊ͕͕͋Δʂ

    View full-size slide

  59. ΢ΥʔλϑΥʔϧΛࢧ͑Δٕज़
    • ྺ࢙ͱܦݧʹཪଧͪ͞Εͨ
    ਫ਼౓ͷߴ͍ݟੵ΋Γ
    • ద੾ͳϘϦϡʔϜͷόοϑΝ

    View full-size slide

  60. ΞδϟΠϧͳͱ͜Ζ
    • ࣮͸࣮૷தʹ݁ߏઃܭόά͕ݟ͔ͭΔ
    • ࣮૷͕ਐΉʹ࿈Εͯސ٬͔Β
    ৽ͨͳཁ๬͕͋Ε͜Εग़ͯ͘Δ

    View full-size slide

  61. ΞδϟΠϧͳͱ͜Ζ
    • ͍͍ͩͨݱ৔Ͱ͍͍۩߹ʹٵऩͯ͠
    Ͳ͏ʹ͔ղܾͯ͘͠ΕΔ
    • Embrace Changes!

    View full-size slide

  62. ݐஙۀք͸ਐΜͰ͍Δ
    • ΢ΥʔλʔϑΥʔϧͬΆ͞ͱΞδϟΠϧ
    ͬΆ͕͞ͱͯ΋ྑ͍όϥϯεͰಉډ

    View full-size slide

  63. ࣮૷ϑΣʔζ
    • ओ୲౰ͷେ޻͸1ਓ
    • جૅ԰ɺࠨ׭԰ɺΫϩε԰ɺ֎ߏ԰ɺ
    ͳͲͳͲ৭ʑ

    View full-size slide

  64. ࣮૷ϑΣʔζ
    • γεςϜ։ൃͰͨͱ͑ΔͳΒɺ
    αʔόʔଆͷίʔυ͸΄΅1ਓͰॻ͍ͯɺ
    ΫΤϦ԰ɺJS԰ɺϚʔΫΞοϓ԰ɺetc.
    ʹपΓΛৼΔΠϝʔδ

    View full-size slide

  65. ઃܭ͕ݟΕΔ୉ޣຯ
    • ෦ࡐ͕೺ѲɺબఆͰ͖Δ
    • ϑϩʔϦϯάɺλΠϧɺนࡐɺυΞɺ૭ɺ
    Ϋϩεɺ෩࿊ɾΩονϯɾτΠϨɺ࿨ࣨɺ
    etc.
    • ސ٬͕bundleͯ͠Δgemͱ͔ʹ·Ͱ
    ޱग़͠Ͱ͖ΔΠϝʔδ

    View full-size slide

  66. (ϓϩάϥϚʔతʹ)໘ന͍෦ࡐ
    • ਓײηϯαʔ෇͖র໌
    • ిಈεΫϦʔϯ

    View full-size slide

  67. ਓײηϯαʔ෇͖র໌
    • ηϯαʔ + র໌ ͷ all in one

    View full-size slide

  68. ྫ͑͹ɺτΠϨͷ৔߹
    • ୭͔͕τΠϨʹೖΔ
    • => ηϯαʔ͕ಇ͍ͯిؾ͕఺͘
    • τΠϨ͔Βग़Δ
    • => ిؾ͕ফ͑Δ

    View full-size slide

  69. ͱ͍͏͜ͱ͸ɺ
    • ηϯαʔͷ஋͕औΕΕ͹ɺτΠϨͷ
    ۭ͖ঢ়گ͕ϦϞʔτͰ೺ѲͰ͖Δʂ

    View full-size slide

  70. ʮηϯαʔͷAPIͳ͍ͷʁʯ
    • ͸ʁ
    • ʮͦΜͳ͜ͱΛݴΘΕͨͷ͸ॳΊͯͩʯ
    • ౰વͦΜͳ΋ͷ͸ͳ͍

    View full-size slide

  71. ݱঢ়
    • ݐஙݱ৔΍෦ࡐϝʔΧʔ·Ͱ
    ϓϩάϥϚʔͷ੠͕ಧ͍͍ͯͳ͍
    • ͍ΖΜͳ෦ࡐ͕APIΛఏڙͯ͘͠ΕΔ
    Α͏ʹͳͬͨΒ΋ͬͱՈ͕ศརʹͳΔ
    ͸ͣʂ

    View full-size slide

  72. Ideas
    • ਓ͕͍ۙͮͨ͜ͱΛݕ஌͢Δݰؔ
    • ਓ͕৐͍ͬͯΔ͜ͱΛݕ஌͢Δচ΍֊ஈ
    • ૭Λ։͚ΔAPI
    • υΞΛ։͚ΔAPI

    View full-size slide

  73. Hacking My Home

    View full-size slide

  74. ৭ʑHackͰ͖ΔΞΠςϜ
    • IRKit
    • Future Home Controller

    View full-size slide

  75. IRKit
    • ੺֎ઢΛ௨͍ͯ͡Ζ͍ΖϋοΫ͢Δ
    ָ͍͠΍ͭ

    View full-size slide

  76. IRKit
    • ೚ҙͷ੺֎ઢϦϞίϯ͔ΒIRKitʹ੺֎ઢ
    ৴߸Λૹग़
    • => IRKitʹऔΓࠐΜͰJSONͰอଘ
    • IRKitʹHTTPͰ೚ҙͷJSONΛૹΓ͚ͭΔ
    • => IRKit͔Β੺֎ઢ৴߸ͱͯ͠ૹग़

    View full-size slide

  77. ࢖༻ྫ
    • ϦϏϯάϧʔϜͷిಈεΫϦʔϯΛɺ
    ৗ࣌ىಈ͍ͯ͠ΔMacMini͔Β
    curlίϚϯυͰ։ด
    • ͜ΕΛcronͰຖே൩ࣗಈ࣮ߦ

    View full-size slide

  78. ࢖༻ྫ(not implemented yet)
    • Թ౓ηϯαʔͱ࿈ಈͯ͠ɺ
    ॵ͘ͳͬͨΒউखʹΤΞίϯΛ͚ͭΔ
    ʗॵ͘ͳ͘ͳͬͨΒউखʹফ͢
    • ຖ೔ܾ·ͬͨ࣌ؒʹRoombaΛىಈͯ͠
    উखʹ૟আ͢Δ

    View full-size slide

  79. Conclusion
    • Hack home everyday,
    and that'll buy you a house.

    View full-size slide

  80. Conclusion (2)
    • ͓͏ͪΛݐͯΑ͏ʂ
    • Programmableͳ෦ࡐΛબ΅͏ʂ
    • ຖ೔ͷ฻Β͠ΛϋοΫ͠Α͏ʂ

    View full-size slide