惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
F
Full Disclosure
Microsoft Azure Blog
Microsoft Azure Blog
Jina AI
Jina AI
Recent Announcements
Recent Announcements
美团技术团队
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
M
MIT News - Artificial intelligence
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Engineering at Meta
Engineering at Meta
S
Security @ Cisco Blogs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
S
Secure Thoughts
O
OpenAI News
Hacker News - Newest:
Hacker News - Newest: "LLM"
A
About on SuperTechFans
NISL@THU
NISL@THU
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
T
Tailwind CSS Blog
T
The Blog of Author Tim Ferriss
Recent Commits to openclaw:main
Recent Commits to openclaw:main
F
Fortinet All Blogs
B
Blog
IT之家
IT之家
T
Tor Project blog
L
Lohrmann on Cybersecurity
Webroot Blog
Webroot Blog
博客园 - 叶小钗
Simon Willison's Weblog
Simon Willison's Weblog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
量子位
Security Latest
Security Latest
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cisco Blogs
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Last Week in AI
Last Week in AI
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
Cisco Talos Blog
Cisco Talos Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Google DeepMind News
Google DeepMind News
SecWiki News
SecWiki News

hwchiu learning note Blog

Kubernetes 怎麼計算 imageFS | hwchiu learning note Nginx Proxy_Pass 不會重新查詢 DNS | hwchiu learning note Multus 下如何透過 network policy 設定 | hwchiu learning note Linux Bridge MTU | hwchiu learning note Kubevirt 初體驗 | hwchiu learning note [MacOS ]隨手筆記 Sed 與 Rename 的使用 | hwchiu learning note Docusaurus 使用 blog mode 後連結一直反白的問題 | hwchiu learning note gcloud 切換帳號 | hwchiu learning note k8s 內安裝 redis-cluster | hwchiu learning note Helm Chart 中如何根據條件來動態安裝 Template 內的物件 | hwchiu learning note GCS 操作上注意事項 | hwchiu learning note istio 操作記錄 | hwchiu learning note terraform | hwchiu learning note Kubernetes GKE 維運上小筆記 | hwchiu learning note Git 修改 author/committer | hwchiu learning note GCP NAT 相關筆記 | hwchiu learning note gcloud ssh 到 GCP VM | hwchiu learning note CloudSQL 收費注意事項 | hwchiu learning note Loki 安裝上的參數調整以及 Ring 的問題除錯 | hwchiu learning note kustomize + helm | hwchiu learning note 觀測 K8s 內 OOM 事件 | hwchiu learning note GKE 上的 RBAC 筆記 | hwchiu learning note 本地產生 jwt token | hwchiu learning note ArgoCD 安裝筆記 | hwchiu learning note CircleCI Context 的使用 | hwchiu learning note 透過 GCP IAP Gateway 來保護 GKE 內的網站 | hwchiu learning note 閱讀筆記: 「SRE 的工作介绍」 | hwchiu learning note 閱讀筆記: 「DevOps is a failure」 | hwchiu learning note 閱讀筆記: 「面試人生 - 設計一個簡易的分散式 Job Scheduler」 | hwchiu learning note 閱讀筆記: 「Cloudflare 06/21 災後報告」 | hwchiu learning note 閱讀筆記: 「啟動 container 直接 kernel panic 的 bug」 | hwchiu learning note 閱讀筆記: 「分散式系統上的常見網路謬誤」 | hwchiu learning note 閱讀筆記: 「為什麼有些工程師不相信 Best Practices 」 | hwchiu learning note 閱讀筆記: 「使用 StressChaos 的經驗來學習 Pod Memory 使用情況」 | hwchiu learning note 閱讀筆記: 「/proc/meminfo 與 free 指令的內容比較」 | hwchiu learning note 閱讀筆記: 「goss, 一個簡易且迅速的 server 驗證工具」 | hwchiu learning note 閱讀筆記: 「如何寫出有意義的討論訊息 」 | hwchiu learning note 閱讀筆記: 「Mizu, 一套用來檢視 Kubernetes Traffic 的視覺化工具」 | hwchiu learning note 閱讀筆記: 「Tetragon, 基於 eBPF 的 Kubernetes 資安管理工具」 | hwchiu learning note 閱讀筆記: 「Datree, Kubernetes Configuration 檢查工具」 | hwchiu learning note 閱讀筆記: 「基於 eBPF 的 ServiceMesh」 | hwchiu learning note 閱讀筆記: 「提升 DevOps 技術的免費書籍」 | hwchiu learning note 閱讀筆記: 「新手閱讀,我踩過的 Terraform 各種雷」 | hwchiu learning note 閱讀筆記: 「容器的除錯之路,遇到 Permission Denied 該怎麼辦」 | hwchiu learning note 閱讀筆記: 「成為軟體架構師的閱讀之路」 | hwchiu learning note 閱讀筆記: 「使用 serverless 5年後的心酸經驗談」 | hwchiu learning note 閱讀筆記: 「istio 下因為YAML 與 Go template 結合產生的 CVE」 | hwchiu learning note 閱讀筆記: 「三座獨立 k8s cluster 還是一個跨三個地區的 k8s cluster ?」 | hwchiu learning note 閱讀筆記: 「DevOps 的 2022 學習之路」 | hwchiu learning note 閱讀筆記: 「強化 Kubernetes 叢集的必備工具」 | hwchiu learning note 閱讀筆記: 「你真的有正確使用 SSH 嗎?」 | hwchiu learning note 閱讀筆記: 「透過 Kubernetes Event-Driver Autoscaler(KEDA) 來根據各種指標動態擴充容器」 | hwchiu learning note 閱讀筆記: 「升級 Kubernetes 1.22 的注意事項」 | hwchiu learning note 閱讀筆記: 「kubectl delete 的行為跟 docker delete 完全不同」 | hwchiu learning note 閱讀筆記: 「Dockerfile 中透過 COPY --chomd 比透過 RUN chomd 可以省下更多空間」 | hwchiu learning note 閱讀筆記: 「軟體工程師你真的工作的很開心嗎??」 | hwchiu learning note 閱讀筆記: 「如何於 Docker 環境中運行 rootless 模式」 | hwchiu learning note 閱讀筆記: 「一個用來管理 Kubernetes 開源工具的開源工具」 | hwchiu learning note 閱讀筆記: 「為什麼 3A 大作的遊戲室都不愛喜歡使用 STL」 | hwchiu learning note 閱讀筆記: 「Terraform 生態下的五個相關輔助工具」 | hwchiu learning note 閱讀筆記: 「Facebook 內的文化特別之處」 | hwchiu learning note 閱讀筆記: 「Package Maintainers 應該要具備的資安概念」 | hwchiu learning note 閱讀筆記: 「如何判別到底要不要使用 Service Mesh」 | hwchiu learning note 閱讀筆記: 「透過 Helm 與 Terraform 來自動 Re-new Cloudflare origin CA」 | hwchiu learning note 閱讀筆記: 「20年工程師生涯教會我的 20 件事情」 | hwchiu learning note 閱讀筆記: 「Kubernetes 紀錄片 」 | hwchiu learning note 閱讀筆記: 「Golang 原始碼的的版本控制歷史」 | hwchiu learning note 閱讀筆記: 「大家總是喜歡誇大自己的工作時數」 | hwchiu learning note 閱讀筆記: 「ClickHouse 與 Elasticsearch 的比較」 | hwchiu learning note 閱讀筆記: 「Paypal 如何調整 Kubernetes 讓其規模達到四千節點,20萬個 Pod」 | hwchiu learning note 閱讀筆記: 「macOS 的 fsync 實作其實跟大家想像的完全不同 」 | hwchiu learning note 閱讀筆記: 「 取代 Docker Desktop 的高效率開發環境」 | hwchiu learning note 閱讀筆記: 「 Kubernetes 四種不同開發環境的比較」 | hwchiu learning note 閱讀筆記: 「 談談遷移應用程式到 Kubernetes 內的失敗經驗談」 | hwchiu learning note 閱讀筆記: 「GitHub 上常常看到的奇妙 commit 到底是什麼?」 | hwchiu learning note 閱讀筆記: 「透過一點小技巧讓你的 Makefile 有一個更好的 Help說明」 | hwchiu learning note 閱讀筆記: 「視覺化系統內 iptables 規則」 | hwchiu learning note hwchiu learning note 閱讀筆記: 「如何使用 jq 讓你的 kubectl更為強大」 | hwchiu learning note 閱讀筆記: 「PwnKit, 長達 12 年可以讓一般使用者輕鬆變成 Root 的 CVE」 | hwchiu learning note 閱讀筆記: 「Linux 5.17 將使用 BLAKE2s 來替代 SAH1 來達到更安全更快速的隨機亂數產生器」 | hwchiu learning note 閱讀筆記: 「Kubernetes 內透過 DNS-01 處理 wildcard TLS 的兩三事」 | hwchiu learning note 閱讀筆記: 「透過 Crossplane 與 ArgoCD 來達成應用程式與基礎建設的 GitOps 部署方式」 | hwchiu learning note 閱讀筆記: 「The pains of GitOps 1.0」 | hwchiu learning note 閱讀筆記: 「NPM 的 colors modules 打亂一堆人...」 | hwchiu learning note 閱讀筆記: 「2021年回顧,因為 DB 的效能的爭論所以我女友跟我分手了....」 | hwchiu learning note 閱讀筆記: 「使用 OpenKruise v1.0 提供更進階的 workload 部署與升級」 | hwchiu learning note 閱讀筆記: 「透過 Kubefarm 來自動化幫實體機器打造基於 Kubernetes in Kubernetes 的 Kubernetes 環境」 | hwchiu learning note 閱讀筆記: 「Meta 如何打造一個供多團隊使用的 SLI/SLO 設定與觀測平台」 | hwchiu learning note 閱讀筆記: 「多年工作經驗總是搞砸電話面試, why ?」 | hwchiu learning note 系統設計文,探討交友app背後的設計理念 | hwchiu learning note 2021-年度回顧 | hwchiu learning note [Cloud Design Pattern] - Ambassador 模式 | hwchiu learning note 是時候停止使用 python 3.6 | hwchiu learning note 工作20 餘年的軟體架構經驗談 | hwchiu learning note Dockerfile 內 Shell/Exec 的用法差異 | hwchiu learning note Bash 下要如何處理 Signal | hwchiu learning note Infrastructure 各種踩雷經驗 | hwchiu learning note 建置 Container Image 中的 Anti-Patterns | hwchiu learning note 又一個 0-day... | hwchiu learning note
閱讀筆記: 「如何提供專業 Code Review 意見」 | hwchiu learning note
HungWei ChiuBlogger · 2022-05-27 · via hwchiu learning note Blog

標題: 「如何提供專業 Code Review 意見」 類別: others 連結: https://medium.com/@yar.dobroskok/how-to-review-the-code-like-a-pro-6b656101eb89

作者開門見山提到,如果團隊中沒有任何 code review 文化的話,請直接忽略這篇文章。 當團隊真的有 code review 的經驗時,才有機會透過本篇文章分享的一些概念來改善整個 code review 的流程,高效率低耗時。

作者認為一個好品質的 code review 能夠幫助團隊帶來下列好處

  1. 避免合併一些充滿 bug, 難讀, 無效率的程式碼到專案中
  2. 開發者可以互相分享彼此的知識
  3. 獲得關於實作上的各種意見
  4. 確保團隊內的 coding style 一致

為了讓上述概念可以充分的導入到團隊專案中,作者分享了一些自己常用的概念與招式

事先準備一份 Checklist 一個好的 review 流程就是要有一份檢查清單,這份清單上面描述的是每次程式碼合併都“必須”要符合的規則,同時也是團隊很重視的規則 這份清單沒有絕對標準,主要是根據團隊去思考哪些東西是最重要的,舉例來說

  1. Branch, Commit 內容與名稱是否符合規範
  2. Code 是否有足夠的可讀性
  3. Codesytle 以及命名規範是否符合團隊文化
  4. 資料夾/檔案結構是否符合團隊文化
  5. 是否有包含相關測試
  6. 文件是否有一起準備

這份清單的重點是只要列入那些被視為是非常必須且重要的項目就好,不然整個清單落落長其實意義也不高

盡可能的自動化上述檢查 準備好前述清單後,下一個步驟就是想辦法將上述清單規範給自動化,譬如

  1. 透過 linters 來檢查 codesytle
  2. 運行一些如 SonarQube, Codacy 等工具來幫忙檢查是否有潛在的低效率或是有漏洞的程式碼
  3. 透過相關框架運行自動化測試並且得到相關的覆蓋率報表

當有辦法自動化這些操作後,下一個步驟就是要思考什麼時候執行?

  1. 針對一些快速檢查,譬如 linter, beautifer 等工具,可以考慮整合到 pre-commit hook/ pre-push Git hook 等時間點運行 這樣就可以讓開發者快速檢查簡單錯誤
  2. 針對一些比較花時間的檢查,譬如分析工具,測試以及相關建置流程這些都可以放到 CI pipeline 去運行

一切都準備完畢後就可以將其整合到整個 git 工具中,譬如只有當 CI pipeline 通過的 PR 才有被人 review 的需求,如果連自動化測試都沒有辦法通過,那就是開發者的 責任要去將其完成,一切準備就緒後才要開始最後一步

  • 人工介入 review * 開始人工 review 時,因為前述自動化的過程已經幫忙檢查非常多的事項,所以這時候要專注的就是運作邏輯。 能的話作者建議 review 與其慢慢看 code 猜想不如直接跟開發者一起討論 review,可以避免來回溝通花費的無效時間 此外開發者也可以更清楚地去解釋所有實作的背後理由與考量。

作者也推薦採用 IDE 來進行 code review,很多 IDE 強大的功能都能夠幫助開發者更有效率地去檢視程式碼,譬如快速找到宣告點,被呼叫點以及整個資料結構的面貌等 這些都可以省下不少時間

最後最重要的是每次 PR 的大小不能太大,這點其實也是 Linux Kernel 內一直奉行的原則,過大的修改有太多檔案要看,同時也有更多可能潛在的不相容問題要注意 這對開發者與 reviewer 來說都是個沈重的負擔,因此能的話將修改以拆分成數個有意義的 PR 分別檢視會使得整體流程更講有效率,同時也可以避免 檔案太多時可能看不下去就直接無腦 +2 的蓋章行為