SlideShare ist ein Scribd-Unternehmen logo
1 von 77
Downloaden Sie, um offline zu lesen
Crafting Rails Culture 
to Your Company 
Hiroshi SHIBATA 
@hsbt 
RailsPacific
Thank you!
SHIBATA 
Hiroshi 
@hsbt
Tokyo 
Matze
RailsGirls in Japan
asakusa.rb
RubyKaigi 2014 
RubyConf Taiwan 
2014 
RedDotRubyConf 
2014 
RailsPacific 
OedoRubyKaigi04
Ruby Committer
commit bit collector 
ruby 
rubygems 
rake 
rdoc 
psych 
syck 
ruby-build 
railsgirls 
railsgirls-jp 
kaminari 
tdiary 
hiki 
jenkins.rb 
fastladder
My work of Ruby 2.2.0 
Update test-unit and minitest 
(removed from repository but 
bundled in tarball) 
coordinate to Ruby committers 
negotiate to sponsors 
make development environment
A long time ago..
Pepabo 
Hosting EC Media
Over 250 people
organizations which design systems ... are constrained to 
produce designs which are copies of the communication 
structures of these organizations 
— M. Conway
PHP 
MySQL5 
PHP 
MySQL4 
Ruby and PHP 
Rails 
MySQL5 
Pepabo
ミドルウェアのアップグレード 
アクセス解析基盤の構築 
セキュリティ監査 
Ruby/Rails 
技術リ基ーンス盤タートチアップ 
ーム 
社内開発基盤の構築 
JSOXの運用整備 
統計基盤の構築 
github 
テスト基盤の構築コードレビュー 
新人教育 
開発プロセス 
原稿執筆 
カンファレンス発表 
Jenkins 
RDBMS 
OSS開発サーバー構成管理の刷新
Pepabo 
技術基盤チーム 
PHP 
MySQL5 
PHP 
MySQL4 
Ruby and PHP 
Rails 
MySQL5
Ruby 
Rails 
MySQL5 
Ruby 
Rails 
MySQL5 
Ruby and PHP 
Rails 
MySQL5 
Pepabo 
技術基盤チーム
Why Ruby?
Why Ruby? 
1. testing 
2. environment 
3. references
Testing
powerful testing 
framework 
1. test-unit 
2. minitest 
3. rspec
Capybara
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
testcase 
class TestPowerAssert < Minitest::Test 
def test_power_assert_failed 
assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } 
end 
end 
assertion 
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
Typical usecase 
1. run test -> fail 
2. add inspection code 
3. run test -> fail -> detect fail reason 
4. fix code 
5. run test -> success
Typical usecase 
1. run test -> fail 
2. add inspection code 
3. run test -> fail -> detect fail reason 
4. fix code 
5. run test -> fail!!! -> turn to 2
Typical usecase 
1. run test -> fail 
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 } 
4. fix code 
| | | | | 
| | | | Array 
| | | [1, 2, 3] 
| | #<Enumerator: 3:times> 
| 3 
String 
5. run test -> fail!!! -> turn to 4
Development 
Environment 
1. osx + homebrew 
2. rbenv + ruby-build
Many references
Rails Good Parts 
Why 
Rails?
Why Rails? 
1. modern architecture 
2. oss way 
3. admin integration
enforce 
modern architecture
case.1 
Ruby 1.8.6 to Ruby 2.1.2
Ruby 1.8.6 
Rails 2.0.2 
Ruby 2.1.3 
Rails 4.1.6 new!
Ruby 
1.8.6 1.8.7 1.9.3 2.0.0 2.1 
Rails 
2.0/2.1 
2.3 
3.0 
3.2 
4.0/4.1
case.2 
replace legacy middleware 
KyotoTycoon 
to 
memcached
app1 
app2
rails4 need to dalli 
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
kyoto tycoon is slower 
than mysql… 
dalli is not support 
to kyoto tycoon…
enforce oss way
Ruby 
Rails 
MySQL5 
Ruby 
Rails 
MySQL5 
Ruby and PHP 
Rails 
MySQL5 
Pepabo 
技術基盤チーム
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
% 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
admin integration
What’s admin? 
1. customer support 
2. payment/refund 
3. no console
organizations which design systems ... are constrained to 
produce designs which are copies of the communication 
structures of these organizations 
— M. Conway
Our Typical Team 
Developer Director 
Customer 
Support
unmaintained…
better admin 
1. app internal 
2. Rails Engine 
3. other app
app internal 
pros 
better testing 
better deploy 
cons 
including difference application 
including effective code
Rails Engine 
pros 
splitting application code 
better deploy 
cons 
difficulty testing 
can’t use production code directly
Other app 
pros 
definitely splitting app 
cons 
separated develop cycle 
duplicated code
No silver bullet
Optimize Your Company 
Rails 
like a php 
MySQL5 
Rails 
like a java 
MySQL5 
Rails 
like a php 
MySQL5 
技術基盤チーム
Lern to 
Rails 
Internal 
step 
by 
step
Lern to 
Active 
Record 
Internal
github workflow
ChatOps 
github issue 
costomer’s 
contact 
nagios
DevOps
Go to the 
next 
10 years

Weitere ähnliche Inhalte

Was ist angesagt?

20140626 red dotrubyconf2014
20140626 red dotrubyconf201420140626 red dotrubyconf2014
20140626 red dotrubyconf2014
Hiroshi SHIBATA
 
How to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHow to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rb
Hiroshi SHIBATA
 

Was ist angesagt? (20)

How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
 
20141210 rakuten techtalk
20141210 rakuten techtalk20141210 rakuten techtalk
20141210 rakuten techtalk
 
The Future of Dependency Management for Ruby
The Future of Dependency Management for RubyThe Future of Dependency Management for Ruby
The Future of Dependency Management for Ruby
 
RubyGems 3 & 4
RubyGems 3 & 4RubyGems 3 & 4
RubyGems 3 & 4
 
The Future of Bundled Bundler
The Future of Bundled BundlerThe Future of Bundled Bundler
The Future of Bundled Bundler
 
20140626 red dotrubyconf2014
20140626 red dotrubyconf201420140626 red dotrubyconf2014
20140626 red dotrubyconf2014
 
Leave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraLeave end-to-end testing to Capybara
Leave end-to-end testing to Capybara
 
How to distribute Ruby to the world
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
 
Gate of Agile Web Development
Gate of Agile Web DevelopmentGate of Agile Web Development
Gate of Agile Web Development
 
How to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHow to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rb
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
Ruby Security the Hard Way
Ruby Security the Hard WayRuby Security the Hard Way
Ruby Security the Hard Way
 
What's new in RubyGems3
What's new in RubyGems3What's new in RubyGems3
What's new in RubyGems3
 
OSS Security the hard way
OSS Security the hard wayOSS Security the hard way
OSS Security the hard way
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
 
The Future of library dependency management of Ruby
 The Future of library dependency management of Ruby The Future of library dependency management of Ruby
The Future of library dependency management of Ruby
 
The Future of library dependency manageement of Ruby
The Future of library dependency manageement of RubyThe Future of library dependency manageement of Ruby
The Future of library dependency manageement of Ruby
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
 
An introduction and future of Ruby coverage library
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage library
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
 

Ähnlich wie 20140925 rails pacific

Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
True-Vision
 

Ähnlich wie 20140925 rails pacific (20)

Lessons Learnt in 2009
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009
 
Ruby on Rails workshop for beginner
Ruby on Rails workshop for beginnerRuby on Rails workshop for beginner
Ruby on Rails workshop for beginner
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)
 
Serverless in production, an experience report (London DevOps)
Serverless in production, an experience report (London DevOps)Serverless in production, an experience report (London DevOps)
Serverless in production, an experience report (London DevOps)
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)Rails Presentation (Anton Dmitriyev)
Rails Presentation (Anton Dmitriyev)
 
Rails Performance
Rails PerformanceRails Performance
Rails Performance
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
 
Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)Serverless in production, an experience report (FullStack 2018)
Serverless in production, an experience report (FullStack 2018)
 
Continuous Integration Testing in Django
Continuous Integration Testing in DjangoContinuous Integration Testing in Django
Continuous Integration Testing in Django
 
Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)Serverless in Production, an experience report (AWS UG South Wales)
Serverless in Production, an experience report (AWS UG South Wales)
 
Azure from scratch part 4
Azure from scratch part 4Azure from scratch part 4
Azure from scratch part 4
 
2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your Software
 
Speedy TDD with Rails
Speedy TDD with RailsSpeedy TDD with Rails
Speedy TDD with Rails
 
Supa fast Ruby + Rails
Supa fast Ruby + RailsSupa fast Ruby + Rails
Supa fast Ruby + Rails
 
DevOps and AWS
DevOps and AWSDevOps and AWS
DevOps and AWS
 

Mehr von Hiroshi SHIBATA

Mehr von Hiroshi SHIBATA (16)

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Deep dive into Ruby's require - RubyConf Taiwan 2023
Deep dive into Ruby's require - RubyConf Taiwan 2023Deep dive into Ruby's require - RubyConf Taiwan 2023
Deep dive into Ruby's require - RubyConf Taiwan 2023
 
How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?
 
How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?
 
Ruby コミッターと歩む Ruby を用いたプロダクト開発
Ruby コミッターと歩む Ruby を用いたプロダクト開発Ruby コミッターと歩む Ruby を用いたプロダクト開発
Ruby コミッターと歩む Ruby を用いたプロダクト開発
 
Why ANDPAD commit Ruby and RubyKaigi?
Why ANDPAD commit Ruby and RubyKaigi?Why ANDPAD commit Ruby and RubyKaigi?
Why ANDPAD commit Ruby and RubyKaigi?
 
RailsGirls から始める エンジニアリングはじめの一歩
RailsGirls から始める エンジニアリングはじめの一歩RailsGirls から始める エンジニアリングはじめの一歩
RailsGirls から始める エンジニアリングはじめの一歩
 
Dependency Resolution with Standard Libraries
Dependency Resolution with Standard LibrariesDependency Resolution with Standard Libraries
Dependency Resolution with Standard Libraries
 
Roadmap for RubyGems 4 and Bundler 3
Roadmap for RubyGems 4 and Bundler 3Roadmap for RubyGems 4 and Bundler 3
Roadmap for RubyGems 4 and Bundler 3
 
Productive Organization with Ruby
Productive Organization with RubyProductive Organization with Ruby
Productive Organization with Ruby
 
Gems on Ruby
Gems on RubyGems on Ruby
Gems on Ruby
 
RubyGems 3 & 4
RubyGems 3 & 4RubyGems 3 & 4
RubyGems 3 & 4
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
 
The secret of programming language development and future
The secret of programming  language development and futureThe secret of programming  language development and future
The secret of programming language development and future
 
Gemification plan of Standard Library on Ruby
Gemification plan of Standard Library on RubyGemification plan of Standard Library on Ruby
Gemification plan of Standard Library on Ruby
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
 

20140925 rails pacific