Hacking Home

Hacking Home

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

76a777ff80f30bd3b390e275cce625bc?s=128

Akira Matsuda

April 19, 2014
Tweet

Transcript

  1. Hacking (My) Home Akira Matsuda

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

  3. Asakusa.rbओ࠵ͯ͠·͢

  4. None
  5. աڈͷେߐށRubyձٞ • 01 => جௐߨԋ • 02 => Dave Thomas͔͠஻ͬͯͳ͍

    (͚ͲDaveݺΜͩͷΦϨΦϨ) • 03 => جௐߨԋ
  6. 04 (Date.today) • Ebi & Aaron • aamine • ko1

    & Yuki Sasada • zzak • hone • Kawamoto • ...
  7. No technical talk from me today!

  8. Actually, no code in the slides!

  9. ʮੜ׆ൃදձʯ

  10. My next technical talk will be at RailsConf 2014 •

    At Chicago • Next week
  11. ʮAsakusa.rbͷ ୈ256ճ໨ͷmeetupʯ

  12. ઙ૲.rb૑ཱϝϯόʔ • amatsuda => ੢ઙ૲ • kakutani => ྆ࠃ •

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

    ko1 => ຊॴޗ࠺ڮ Ͳ͔ͬӈͷ΄͏
  14. TBH I do no more live in ઙ૲ • amatsuda

    => ੢ઙ૲ ࠜ௡ • kakutani => ྆ࠃ • ko1 => ຊॴޗ࠺ڮ
  15. Life in ઙ૲ • 2004೥ʹఆՁ3,800ສԁ୅ͷ ৽ஙϚϯγϣϯΛߪೖ • ໿10೥ؒډॅ • Ϛϯγϣϯ͸ݱࡏ͸௞ିͰӡ༻த

  16. ച٫ʁ௞ିʁ

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

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

  19. ࢿ࢈Ձ஋ͷ໨ݮΓֹ • 2004: 3800ສ • 2012: 3500ສ • => 37.5ສ

    / year • => 3.125ສ / month
  20. Α͋͘Δޡղ (1)

  21. ௞ିऩೖ • 18.5ສ / month • 18.5ສ * 12 =

    222ສ / year • 3800.0ສ / 222ສ = 17.117...
  22. ௞ି෺݅ͷݪࢿճऩ͸໿17೥

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

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

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

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

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

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

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

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

  31. ށݐͯߪೖλΠϜϥΠϯ • ౔஍ͷܖ໿ • आۚ • ౔஍ͷߪೖ • ݐ෺ͷܖ໿ •

    आۚ • ݐ෺ͷߪೖ • ׬੒ɺೖډ
  32. ౔஍ͷߪೖ

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

  34. आۚ

  35. ۚ༥ػ͍ؔΖ͍Ζ • ౎ࢢۜ • ஍ۜ • ৴ୗۜߦ • ωοτۜߦ •

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

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

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

  39. ʮࣾձత৴༻ʯ on the net • ஶ࡞෺ • Rails3ϨγϐϒοΫɺHead First Rails

    • ݞॻ͖ • φκͷऔక໾ɺϑΣϩʔۀ • ߨԋ • ͍ΖΜͳࠃͰ஻ͬͨΓͯ͠Δ • ΠϯλϏϡʔ • Δͼ·ɺ੢ଜ͞Μɺߴڮ৴པ͞Μ
  40. Δͼ·͍͢͝ʂ • ৴ୗۜߦͷ୲౰ऀ͕Δͼ·ͷ ΠϯλϏϡʔಡΜͰͯϏϏͬͨʂ

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

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

  43. ݐ෺ΛݐͯΔ

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

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

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

    ಈతݴޠ • JEE vs. LL
  47. ໦଄ݐங • ࡏདྷ • 2 x 4ɹ • ֤ࣾಠࣗͷ৭ʑ

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

  49. εςʔΫϗϧμʔ͍Ζ͍Ζ • ౔஍ചΓͷෆಈ࢈԰ • ౔஍ॴ༗ऀ • ϋ΢εϝʔΧʔ • ઃܭ࢜ •

    σβΠφʔ • େ޻ • ۜߦ
  50. ϓϩϚωʁ

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

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

  53. ઃܭ

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

  55. ͱ͍͏͜ͱ͸ɺ

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

  57. ઃܭϑΣʔζ • ͏ͪͷ৔߹͸ 4ʙ5ϲ݄͙Β͍ (ि2ʙ3ճ͙Β͍͸ଧͪ߹Θͤ) • ଧͪ߹Θͤ͸ฏ೔ͷޕલத͕͓͢͢Ί • ઃܭ͸CAD(಺੡)Ͱ •

    ଧͪ߹Θͤ͸PCͷը໘Λݟͳ͕Β • ຖճଧͪ߹Θͤޙʹ࠷৽൛ͷઃܭਤ͕ࢴͰ΋Β͑Δ
  58. ઃܭਤ • ຖճຖճຖճຖճɺʮࢴͰʯ

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  77. Hacking My Home

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

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

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

    => IRKit͔Β੺֎ઢ৴߸ͱͯ͠ૹग़
  81. ࢖༻ྫ • ϦϏϯάϧʔϜͷిಈεΫϦʔϯΛɺ ৗ࣌ىಈ͍ͯ͠ΔMacMini͔Β curlίϚϯυͰ։ด • ͜ΕΛcronͰຖே൩ࣗಈ࣮ߦ

  82. Demo

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

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

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