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
2022 - COSCUP - 打造高速 Ruby 專案開發流程
Search
蒼時弦や
July 31, 2022
Programming
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2022 - COSCUP - 打造高速 Ruby 專案開發流程
現代軟體開發對於品質跟速度的要求越來越高,然而當我們開始一個全新專案的時候,總是難以很好的兼顧這些問題,這場演講將會分享如何實踐。
蒼時弦や
July 31, 2022
More Decks by 蒼時弦や
See All by 蒼時弦や
2024 - COSCUP - Clean Architecture in Rails
elct9620
2
210
2023 - RubyConfTW - Rethink Rails Architecture
elct9620
0
260
20230916 - DDDTW - 導入 Domain-Driven Design 的最佳時機
elct9620
0
500
2023 - WebConf - 選擇適合你的技能組合
elct9620
0
720
20230322 - Generative AI 小聚 ft. Happy Designer
elct9620
0
480
2022 - 默默會 - 重新學習 MVC 的 Model
elct9620
1
520
MOPCON 2022 - 從 Domain-Driven Design 看網站開發框架隱藏
elct9620
1
540
2022 - COSCUP - 我想慢慢寫程式該怎麼辦?
elct9620
0
310
2021 - RubyKaigi - It is time to build your mruby VM on the microcontroller?
elct9620
0
310
Other Decks in Programming
See All in Programming
数百円から始めるRuby電子工作
tarosay
0
120
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
210
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
350
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
520
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
640
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
530
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
140
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
4.6k
What's New in Android 2026
veronikapj
0
240
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
430
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
360
Marketing to machines
jonoalderson
1
5.6k
Building AI with AI
inesmontani
PRO
1
1.1k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
360
A Modern Web Designer's Workflow
chriscoyier
698
190k
エンジニアに許された特別な時間の終わり
watany
108
250k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Designing Experiences People Love
moore
143
24k
Transcript
打造⾼速 Ruby 產品 開發流程
@elct9620 THE PROGRAMMER OF CREATIVE ႏָࣛɰ
#Consulting Job
#Ruby/Rails Course and Tools Product
https://blog.aotoki.me Blog
https://discord.com/invite/t2Kd6PNvvA Discord
https://www.youtube.com/channel/UCcABbJfCL0DfNh3wDk_-7lg YouTube
慢在哪裡
None
初始化 當我們做完 rails new 命令後,還有多少設定要調整
規格 確認規格後到實現功能要多久的時間
審查 撰寫的程式碼符合團隊風格、沒有太多技術債、壞味道的檢查時間有多長
測試 完成的功能測試所需的時間,是否有⾃動測試和⼈⼯測試
部署 安裝伺服器、完整的網路、雲端等設定所需的時間
監控 產品部署後是否可以順利監控效能、錯誤並且得以持續改善
敏捷⽅法
完成 Done 跟 Finished 不同在於前者是「堪⽤」後者是「結束」
可驗證 在「堪⽤」狀態下表⽰「功能不完整」但可⽤,因此可以透過⾃動測試驗證完成狀況
由上⾄下 從完整的設計系統改為「可以看到畫⾯」或「可以呼叫 API」的⽅式開始開發
關注功能 開發產品需要關⼼的是功能的可⽤,因此⽬標是打造「最⼩可⾏」的功能(產品)
持續整合 產品只有⼀個主幹分⽀所有⼈直接推到 main branch,隨時都保持在最新的狀態
⾃動測試 為了可以持續整合,我們需要⼤量的⾃動測試確保「功能」正常
重構 在有測試保護的狀況下已不改變功能的前提「持續改善」程式碼
持續部署 產品的所有功能隨時都是可⽤的狀態,隨時都可以部署給使⽤者使⽤
功能開關 尚未準備好釋出的功能使⽤ Feature Flag 保護起來,讓持續部署得以實現隨時部署
敏捷開發是⽂化、流程上的改變
思考 無法改變⽂化、流程的狀況下,還能做些什麼?
使⽤⼯具
Bankai 預先設定好習慣的 Rails 專案設定,初始化專案只需要數分鐘 https://github.com/5xRuby/bankai
Cucumber E2E 測試⼯具,⽅便溝通規格以及確認使⽤者⾓度的「使⽤」是沒問題的
RSpec 夠熟練的話⽤來寫單元測試非常好⽤,適合針對 Cucumber 的細部功能做測試
Rubocop 減少 Code Review 針對寫法的檢查,⾃動化的檢查撰寫的風格和避開容易出問題的寫法
Brakeman 針對 Rails 常⾒資安問題的寫法做檢查,可以減少常⾒的⼈為疏失
Bundler Audit ⽤來檢查 Ruby Gem 的漏洞,來確保可以持續更新到沒問題的版本
Bundler Leak 跟 Bundler Audit 類似,可以⽤來找到使⽤的 Ruby Gem 是否有記憶體洩漏的問題
Ruby GitLab CI Tempalte 預先設定從靜態分析到測試和部署所有步驟的樣板,可以快速的完成 CI/CD 流程的建置 https://github.com/elct9620/ruby-gitlab-ci
⾃動⽣成 Production ⽤的 Dockerfile 可以節省⾃⼰撰寫跟設計的時間 Boxing
容器的 Entrypoint ⼯具,可以增加安全性以及確保 Rails 在資料庫準備好後才啟動 Openbox https://github.com/elct9620/openbox
Health Check ⽤的套件,可以⾃訂檢查規則來快速讓 AWS ALB 這類服務能做檢查 Liveiness https://github.com/elct9620/liveness
⼯具、技術、⽂化漸進式的改善
#Thanks Q&A