Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby on Rails Lazy Developer
Search
phamon
April 26, 2015
Programming
0
95
Ruby on Rails Lazy Developer
Ruby on Rails
www.symbolet.com
phamon
April 26, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
Software Architecture
hschwentner
6
2.4k
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.2k
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
230
CSC305 Lecture 12
javiergs
PRO
0
240
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
170
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
340
CSC305 Lecture 11
javiergs
PRO
0
310
React Nativeならぬ"Vue Native"が実現するかも?_新世代マルチプラットフォーム開発フレームワークのLynxとLynxのVue.js対応を追ってみよう_Vue Lynx
yut0naga1_fa
2
1.9k
Researchlyの開発で参考にしたデザイン
adsholoko
0
100
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
110
One Enishi After Another
snoozer05
PRO
0
170
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Why Our Code Smells
bkeepers
PRO
340
57k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
GitHub's CSS Performance
jonrohan
1032
470k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Transcript
Lazy developer www.symbolet.com Symbolet
สิ่งที่คิด www.symbolet.com 2
สิ่งที่ลูกค้ามอง www.symbolet.com 3
ความเป็นจริง อยากกลับบ้าน ทุกครั้งที่แก้ต้อง restart server reproduce บั๊กไม่ได้เจอ แต่บน production ไม่ได้กลับบ้านมา
2 วัน โปรเจคเลย deadline มาแล้ว 1 เดือน www.symbolet.com 4
มันเกิดอะไรขึ้นกับการพัฒนา Software บ้านเรา ? www.symbolet.com 5
lazy developer www.symbolet.com 6
lazy developer be productive www.symbolet.com 7
but.. How ? www.symbolet.com 8
1. less code 9
less code solve more problems 10
ธรรมชาติของ html html 11
html เปิด tags ปิด tags ย่อหน้า ตัวอักษร < > 12
ธรรมชาติของ html
html เปิด tags ปิด tags ย่อหน้า ตัวอักษร < > 13
ธรรมชาติของ html
html เปิด tags ปิด tags ย่อหน้า ตัวอักษร < > 14
ธรรมชาติของ html ความไม่สอดคล้องกันของ html และ css class=“navbar” -> .navbar id=“app” -> #app
html -> slim lightweight template engine 15 www.symbolet.com
16 www.symbolet.com
js -> little language that compile to javascript 17 www.symbolet.com
http://coffeescript.org 18 www.symbolet.com
ถ้าต้องการ reuse font และ css หล่ะ ? css 19 www.symbolet.com
css -> ใช้ Sass เพื่อเพิ่มความสามารถให้ css 20 www.symbolet.com
21 www.symbolet.com
22 www.symbolet.com
hello world java php ruby 23 www.symbolet.com
find element in array java php ruby 24 www.symbolet.com
find element in array java 25 www.symbolet.com
find element in array java php 26 www.symbolet.com
find element in array java php ruby 27 www.symbolet.com
“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
less code solve more problems 29 www.symbolet.com
less code solve more problems less mistakes 30 www.symbolet.com
less code solve more problems less mistakes fast development 31
www.symbolet.com
don’t build from scratch 32 www.symbolet.com
don’t build from scratch framework 33 www.symbolet.com
Rails mvc / db-migrate / scaffold / i18n / log
34 www.symbolet.com
Ruby Stack slim + sass + coffeescript nginx / apache
unicorn / passenger memcached / redis postgresql / mysql / .. rails / sinatra / lotus 35 www.symbolet.com
2. use available library 36 www.symbolet.com
Dependency management maven / gradle bundler composer bower npm cocoapod
37 www.symbolet.com
Library = Gem 38 www.symbolet.com
Gem supermarket https://www.ruby-toolbox.com/categories/by_group 39 www.symbolet.com
Gem supermarket https://www.ruby-toolbox.com/categories/rails_authentication 40 www.symbolet.com
Devise - Authentication Features 41 www.symbolet.com
https://github.com/plataformatec/devise Devise - Authentication 42 www.symbolet.com
Devise - Authentication 43 www.symbolet.com
Devise - Authentication 44 www.symbolet.com
Library networking Device 45 www.symbolet.com
Library networking Cancancan Device OmniAuth (Authorization) (OAuth) Active Admin (User
Management) 46 www.symbolet.com
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
3. use available tools 48 www.symbolet.com
Query N+1 Problem Places Categories m 1 49 www.symbolet.com
Query N+1 Problem @places = Place.all place.title place.category.name place.latitude place.longitude
50 www.symbolet.com
Query N+1 Problem @places = Place.all 1 n 4 queries
!! 51 www.symbolet.com
Solve Query N+1 Problem @places = Place.includes(:place_category) 1 2 tuning
query -> 2 queries 52 www.symbolet.com
Solve Query N+1 Problem Bullet 53 www.symbolet.com
Solve Query N+1 Problem auto detect & how to fix
line of code 54 www.symbolet.com
https://github.com/bbatsov/ruby-style-guide Ruby Guide Style 55 www.symbolet.com
Ruby Guide Style 56 www.symbolet.com
Ruby Guide Style 57 www.symbolet.com
https://github.com/bbatsov/rubocop Ruby Guide Style 58 www.symbolet.com
Ruby Guide Style 59 www.symbolet.com
Ruby Guide Style 60 www.symbolet.com
4. Automate 61 www.symbolet.com
–Mike Co-founder Instagram “Replace all components of a car while
driving it at 100 mph” 62 www.symbolet.com
Chef - Provision 63 www.symbolet.com
Vagrant - Test config 64 www.symbolet.com
Docker 65 www.symbolet.com
Mina - Deploy 1. ssh 2. git pull master 3.
build 4. create new version 5. restart 66 www.symbolet.com
5. Invest 67 www.symbolet.com
68 www.symbolet.com www.symbolet.com ลงทุนกับความรู้
Summary 1. less code 2. use available library 3. use
available tools 4. automate 5. Invest 69 www.symbolet.com
lazy developer be productive Focus More 70 www.symbolet.com