ruby on rails lazy developer
TRANSCRIPT
![Page 4: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/4.jpg)
ความเป็นจริง
อยากกลับบ้าน
ทุกครั้งที่แก้ต้อง restart server
reproduce บั๊กไม่ได้เจอแต่บน production
ไม่ได้กลับบ้านมา 2 วัน
โปรเจคเลย deadline มาแล้ว 1 เดือน
www.symbolet.com4
![Page 9: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/9.jpg)
1. less code
9
![Page 10: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/10.jpg)
less codesolve more problems
10
![Page 11: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/11.jpg)
ธรรมชาติของ html
html
11
![Page 12: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/12.jpg)
htmlเปิด tags
ปิด tags
ย่อหน้า
ตัวอักษร < >
12
ธรรมชาติของ html
![Page 13: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/13.jpg)
htmlเปิด tags
ปิด tags
ย่อหน้า
ตัวอักษร < >
13
ธรรมชาติของ html
![Page 14: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/14.jpg)
htmlเปิด tags
ปิด tags
ย่อหน้า
ตัวอักษร < >
14
ธรรมชาติของ html
ความไม่สอดคล้องกันของ html และ css class=“navbar” -> .navbar
id=“app” -> #app
![Page 28: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/28.jpg)
“I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the
primary purpose of Ruby language.”
หลักปรัชญา Ruby
–Matz, the creator of Ruby
28 www.symbolet.com
![Page 31: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/31.jpg)
less codesolve more problems
less mistakes
fast development
31 www.symbolet.com
![Page 35: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/35.jpg)
Ruby Stackslim + sass + coffeescript
nginx / apache
unicorn / passenger
memcached / redis
postgresql / mysql / ..
rails / sinatra / lotus
35 www.symbolet.com
![Page 37: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/37.jpg)
Dependency management
maven / gradle bundler
composer bower npm
cocoapod
37 www.symbolet.com
![Page 39: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/39.jpg)
Gem supermarket
https://www.ruby-toolbox.com/categories/by_group
39 www.symbolet.com
![Page 40: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/40.jpg)
Gem supermarket
https://www.ruby-toolbox.com/categories/rails_authentication
40 www.symbolet.com
![Page 42: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/42.jpg)
https://github.com/plataformatec/devise
Devise - Authentication
42 www.symbolet.com
![Page 46: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/46.jpg)
Library networking
Cancancan
Device
OmniAuth(Authorization) (OAuth)
Active Admin(User Management)
46 www.symbolet.com
![Page 47: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/47.jpg)
Ruby supermarket•Tagging •Background Job •Json parser •Blog engine •CRM •Shopping cart •Cache engine
•PDF Generate •Payment •Server monitor •CDN •File upload •A/B Testing •more more …
47 www.symbolet.com
![Page 50: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/50.jpg)
Query N+1 Problem@places = Place.all
place.title place.category.name place.latitude place.longitude
50 www.symbolet.com
![Page 52: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/52.jpg)
Solve Query N+1 Problem@places = Place.includes(:place_category)
1
2
tuning query -> 2 queries
52 www.symbolet.com
![Page 54: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/54.jpg)
Solve Query N+1 Problem
auto detect & how to fix
line of code
54 www.symbolet.com
![Page 55: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/55.jpg)
https://github.com/bbatsov/ruby-style-guide
Ruby Guide Style
55 www.symbolet.com
![Page 58: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/58.jpg)
https://github.com/bbatsov/rubocop
Ruby Guide Style
58 www.symbolet.com
![Page 62: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/62.jpg)
–Mike Co-founder Instagram
“Replace all components of a car while driving it at 100 mph”
62 www.symbolet.com
![Page 66: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/66.jpg)
Mina - Deploy
1. ssh 2. git pull master 3. build 4. create new version 5. restart
66 www.symbolet.com
![Page 68: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/68.jpg)
68
www.symbolet.com
www.symbolet.com
ลงทุนกับความรู้
![Page 69: Ruby on Rails Lazy developer](https://reader030.vdocuments.mx/reader030/viewer/2022032421/55a808f31a28abdf2f8b48d6/html5/thumbnails/69.jpg)
Summary
1. less code 2. use available library 3. use available tools 4. automate 5. Invest
69 www.symbolet.com