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

How to Change Organization

SHIBATA Hiroshi
December 12, 2014
290

How to Change Organization

SHIBATA Hiroshi

December 12, 2014
Tweet

Transcript

  1. ruby rubygems rake rdoc psych syck ruby-build railsgirls railsgirls-jp kaminari

    tdiary hiki jenkins.rb fastladder commit bit collector
  2. organizations which design systems ... are constrained to produce designs

    which are copies of the communication structures of these organizations — M. Conway
  3. ϛυϧ΢ΣΞͷΞοϓάϨʔυ ࣾ಺։ൃج൫ͷߏங ౷ܭج൫ͷߏங +409ͷӡ༻੔උ HJUIVC ηΩϡϦςΟ؂ࠪ ίʔυϨϏϡʔ ςετج൫ͷߏங ΞΫηεղੳج൫ͷߏங ։ൃϓϩηε

    ৽ਓڭҭ ݪߘࣥච ΧϯϑΝϨϯεൃද 044։ൃ αʔόʔߏ੒؅ཧͷ࡮৽ ϦʔϯελʔτΞοϓ +FOLJOT 3VCZ3BJMT 3%#.4 ٕज़ج൫νʔϜ
  4. 1) Failure: TestPowerAssert#test_power_assert_failed [test/test_power_assert.rb:10]: assert { "0".class == "3".to_i.times.map {|i|

    i + 1 }.class } | | | | | | | | | Array | | | [1, 2, 3] | | #<Enumerator: 3:times> | 3 String Power Assert
  5. 1) Failure: TestPowerAssert#test_power_assert_failed [test/test_power_assert.rb:10]: assert { "0".class == "3".to_i.times.map {|i|

    i + 1 }.class } | | | | | | | | | Array | | | [1, 2, 3] | | #<Enumerator: 3:times> | 3 String class TestPowerAssert < Minitest::Test! def test_power_assert_failed! assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class }! end! end testcase assertion
  6. 3. run test -> fail -> detect fail reason Typical

    usecase 2. add inspection code 1. run test -> fail 5. run test -> success 4. fix code
  7. 3. run test -> fail -> detect fail reason Typical

    usecase 2. add inspection code 1. run test -> fail 5. run test -> fail!!! -> turn to 2 4. fix code
  8. Typical usecase 1. run test -> fail 5. run test

    -> fail!!! -> turn to 4 4. fix code 1) Failure: TestPowerAssert#test_power_assert_failed [test/test_power_assert.rb:10]: assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } | | | | | | | | | Array | | | [1, 2, 3] | | #<Enumerator: 3:times> | 3 String
  9. Our Rails app 46 models 5000 lines in controllers 400

    lines in routes.rb 1:1.3 code to test ratio
  10. begin! require 'dalli'! rescue LoadError => e! $stderr.puts "You don't

    have dalli installed in your application. Please add it to your Gemfile and run bundle install"! raise e! end rails4 need to dalli
  11. class Bar! def bar(foo = foo())! foo! end! ! def

    buzz(foo = foo)! foo! end! ! def foo! :buzz! end! end! ! p Bar.new.bar! p Bar.new.buzz
  12. % ruby -v r45272.rb! ruby 2.2.0dev (2014-04-13 trunk 45580) [x86_64-darwin13]!

    :buzz! nil! ! ! ! ! ! ! ! % ruby -v r45272.rb! ruby 2.1.2p80 (2014-03-01 revision 45231) [x86_64-darwin13.0]! :buzz! :buzz
  13. source 'https://rubygems.org'! ! gem 'rails', '~> 2.3.18'! gem 'rake', '~>

    0.9.2'! gem 'rdoc'! gem 'rake-confirm'! ! gem 'mysql'! gem "mysql_retry_lost_connection"! gem 'acts_as_paranoid', :github => 'paperboy-30days/acts_as_paranoid'! gem 'passenger', '~> 3.0'! gem 'memcache-client', :require => 'memcache'! gem 'system_timer'! gem 'yajl-ruby', :require => 'yajl'! gem 'will_paginate', '~> 2.3'! gem 'mail'! ! gem 'sass'! gem 'compass-rails'! ! gem 'osaipo_client', :git => '[email protected]:paperboy-all/ osaipo_client.git', :branch => 'legacy'! gem 'jugem_client', :git => '[email protected]:paperboy-all/ jugem_client.git'! gem 'ppb_footer', :github => 'paperboy-all/ppb_footer'!
  14. organizations which design systems ... are constrained to produce designs

    which are copies of the communication structures of these organizations — M. Conway
  15. Rails like a php MySQL5 Rails like a java MySQL5

    Rails like a php MySQL5 Optimize Your Company ٕज़ج൫νʔϜ
  16. Ͱ͖Δ͚ͩ௕͍ؒ ϢʔβʹՁ஋Λ ఏڙ͠ ར५ΛੜΈଓ͚Δ8FCαʔ ϏεΛӡӦ͢ΔͨΊʹ͸ ܧଓతͳ վળΛߦ͏͜ͱ͕ඞཁͰ͢ɻ8FCαʔ ϏεΛվળ͢Δʹ͸ ٕज़తͳऔΓ૊ Έ͸΋ͪΖΜ

    ։ൃ౤ࢿͱͦͷϦλʔ ϯͱ͍͏ܦӦతͳ؍఺ νʔϜϏϧ σΟϯάͳͲͷ։ൃϓϩηε Ϗδω εϝτϦΫε΁ͷ஫ࢹͳͲ ߟྀ͢΂ ͖͜ͱ͕ͨ͘͞Μ͋Γ·͢ɻ