SlideShare a Scribd company logo
1 of 22
Download to read offline
提高 Code 品質心得
呂宗螢
Outline
• 英文
• 思考
•
•
• 工欲善其事,必先利其器
英文
• 程式之母
• 看不懂也要強迫自己練習看
思考
• 了解要做什麼
• 詢問,詢問, 再詢問
• 做錯的代價
• 重做!!!
• 思考 整理邏輯 詢問 歸納
… 完成
Flow
• 專注,專注,還是專注
•
• 所以
• 中斷再重來的代價是很大的
• 訓練自己持續專注 分鐘
• 休息 分鐘
• 番茄時鐘工作法
Debug
• 一要做
•
•
•
•
•
•
版本控制很重要 !!!
寫程式常常…
• 檔案被別人或自己覆蓋,甚至遺失
• 想復原前幾天寫的版本
• 想知道跟昨天寫的差在哪裡
• 是誰改了這段程式碼,為什麼
• 軟體發行,需要分成維護版跟開發版
所以…
• 可以隨時復原修改,回到之前的版本
• 多人協作時,不會把別人的東西蓋掉
• 保留修改歷史記錄,以供查詢
• 軟體發行時,可以方便管理不同版本
• 根本
沒有版本控制時
Git
•
•
•
•
•
一個好習慣
1. 在本地端測試自己新的功能是正確完成的
2. 取得最新的狀態
3. 請一隻一隻程式確定
• 禁用
4. 請也一隻一隻程式去確定這次改變的
5. 寫
6.
7. 到 去驗證本次寫的功能
請思考…
• 為什麼會有公司規定
• 如果有人 造成了系統錯誤或是
• 要留下來加班完成並請大家喝啡咖
請思考…
• 每次你們跟我說完成,結果我到機器 一看
國防布!?
惰性 > 理性
• 只好硬性規定一下
• 如果…
• 未來…
• 因前述的方法做得不夠徹底造成的錯誤…
工欲善其事,必先利其器
•
•
•
Editor
•
•
Diff
•
Git GUI
•
•
Books
•
•
•
•
•
Other
•
• 心智圖可以整理思緒
Reference
•
•
•
•

More Related Content

Viewers also liked

Rencana pelaksanaan pembelajaran
Rencana pelaksanaan pembelajaranRencana pelaksanaan pembelajaran
Rencana pelaksanaan pembelajaranAbu Hamzah
 
Programme on recently recruited clerks of UCB/DCC/State Cooperative Banks
Programme on recently recruited clerks of UCB/DCC/State Cooperative BanksProgramme on recently recruited clerks of UCB/DCC/State Cooperative Banks
Programme on recently recruited clerks of UCB/DCC/State Cooperative Banksvamnicom123
 
Cs437 lecture 10-12
Cs437 lecture 10-12Cs437 lecture 10-12
Cs437 lecture 10-12Aneeb_Khawar
 
PKN tentang Rakyat :)
PKN tentang Rakyat :)PKN tentang Rakyat :)
PKN tentang Rakyat :)ichaa17
 
Cs437 lecture 16-18
Cs437 lecture 16-18Cs437 lecture 16-18
Cs437 lecture 16-18Aneeb_Khawar
 
Why I love the Rain and You Will too - Guarenteed
Why I love the Rain and You Will too - GuarenteedWhy I love the Rain and You Will too - Guarenteed
Why I love the Rain and You Will too - GuarenteedJane Coombs
 
Lights in world
Lights in worldLights in world
Lights in worldAlka Sahni
 
經濟部訴願委員會第A410501007號決定書
經濟部訴願委員會第A410501007號決定書經濟部訴願委員會第A410501007號決定書
經濟部訴願委員會第A410501007號決定書Max Chang
 
Lu siau vay_616_wds_
Lu siau vay_616_wds_Lu siau vay_616_wds_
Lu siau vay_616_wds_Vay Lu
 
Tata cara perijinan pendakian g
Tata cara perijinan pendakian gTata cara perijinan pendakian g
Tata cara perijinan pendakian gUlfann
 

Viewers also liked (13)

Creative Business Development Briefing - April 2015
Creative Business Development Briefing - April 2015Creative Business Development Briefing - April 2015
Creative Business Development Briefing - April 2015
 
Rencana pelaksanaan pembelajaran
Rencana pelaksanaan pembelajaranRencana pelaksanaan pembelajaran
Rencana pelaksanaan pembelajaran
 
Programme on recently recruited clerks of UCB/DCC/State Cooperative Banks
Programme on recently recruited clerks of UCB/DCC/State Cooperative BanksProgramme on recently recruited clerks of UCB/DCC/State Cooperative Banks
Programme on recently recruited clerks of UCB/DCC/State Cooperative Banks
 
Cs437 lecture 10-12
Cs437 lecture 10-12Cs437 lecture 10-12
Cs437 lecture 10-12
 
PKN tentang Rakyat :)
PKN tentang Rakyat :)PKN tentang Rakyat :)
PKN tentang Rakyat :)
 
Cs437 lecture 16-18
Cs437 lecture 16-18Cs437 lecture 16-18
Cs437 lecture 16-18
 
Alkali
Alkali Alkali
Alkali
 
Why I love the Rain and You Will too - Guarenteed
Why I love the Rain and You Will too - GuarenteedWhy I love the Rain and You Will too - Guarenteed
Why I love the Rain and You Will too - Guarenteed
 
Lights in world
Lights in worldLights in world
Lights in world
 
經濟部訴願委員會第A410501007號決定書
經濟部訴願委員會第A410501007號決定書經濟部訴願委員會第A410501007號決定書
經濟部訴願委員會第A410501007號決定書
 
Creative Business Development Briefing - February 2015
Creative Business Development Briefing - February 2015Creative Business Development Briefing - February 2015
Creative Business Development Briefing - February 2015
 
Lu siau vay_616_wds_
Lu siau vay_616_wds_Lu siau vay_616_wds_
Lu siau vay_616_wds_
 
Tata cara perijinan pendakian g
Tata cara perijinan pendakian gTata cara perijinan pendakian g
Tata cara perijinan pendakian g
 

Similar to 提高 Code 品質心得

我怎么做前端分享
我怎么做前端分享我怎么做前端分享
我怎么做前端分享明 李
 
2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?
2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?
2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?Miles Chou
 
20180615 @ 家防中心
20180615 @ 家防中心20180615 @ 家防中心
20180615 @ 家防中心佩琪 羅
 
Java SE 7 技術手冊投影片第 07 章 - 介面與多型
Java SE 7 技術手冊投影片第 07 章 - 介面與多型Java SE 7 技術手冊投影片第 07 章 - 介面與多型
Java SE 7 技術手冊投影片第 07 章 - 介面與多型Justin Lin
 
拥抱开源-关于程序员的自我提高
拥抱开源-关于程序员的自我提高拥抱开源-关于程序员的自我提高
拥抱开源-关于程序员的自我提高Yihua Huang
 
李成银:前端编译平台
李成银:前端编译平台李成银:前端编译平台
李成银:前端编译平台taobao.com
 
前端编译平台
前端编译平台前端编译平台
前端编译平台Welefen Lee
 
Joomla! 網站規劃 簡報-i love joomla! 5月小聚
Joomla! 網站規劃 簡報-i love joomla! 5月小聚Joomla! 網站規劃 簡報-i love joomla! 5月小聚
Joomla! 網站規劃 簡報-i love joomla! 5月小聚Asika Simon
 
Joomla! 網站規劃 簡報 - I love joomla! 5月小聚
Joomla! 網站規劃 簡報 - I love joomla! 5月小聚Joomla! 網站規劃 簡報 - I love joomla! 5月小聚
Joomla! 網站規劃 簡報 - I love joomla! 5月小聚ilovejoomla
 
我要活下來 - Ruby Junior 工程師的存活術
我要活下來 - Ruby Junior 工程師的存活術我要活下來 - Ruby Junior 工程師的存活術
我要活下來 - Ruby Junior 工程師的存活術Li Hsuan Hung
 
Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)
Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)
Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)JoXuZi
 
不妥協的河蟹之道
不妥協的河蟹之道不妥協的河蟹之道
不妥協的河蟹之道Ken Kuan
 
Developer vs designer
Developer vs designerDeveloper vs designer
Developer vs designerRobert Luo
 
设计模式浅析
设计模式浅析设计模式浅析
设计模式浅析Xcat Liu
 
Duck Typing and Multiple Inheritance
Duck Typing and Multiple InheritanceDuck Typing and Multiple Inheritance
Duck Typing and Multiple InheritanceSway Wang
 
Running a Service in Production without Losing Your Sanity
Running a Service in Production without Losing Your SanityRunning a Service in Production without Losing Your Sanity
Running a Service in Production without Losing Your SanityPoga Po
 
Djt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.comDjt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.comdrewz lin
 
Djt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.comDjt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.comdrewz lin
 
与Python一路走来
与Python一路走来与Python一路走来
与Python一路走来leejd
 

Similar to 提高 Code 品質心得 (20)

我怎么做前端分享
我怎么做前端分享我怎么做前端分享
我怎么做前端分享
 
2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?
2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?
2019/7/27 先別開 Branch 了,你聽過 Feature Toggle 嗎?
 
20180615 @ 家防中心
20180615 @ 家防中心20180615 @ 家防中心
20180615 @ 家防中心
 
Java SE 7 技術手冊投影片第 07 章 - 介面與多型
Java SE 7 技術手冊投影片第 07 章 - 介面與多型Java SE 7 技術手冊投影片第 07 章 - 介面與多型
Java SE 7 技術手冊投影片第 07 章 - 介面與多型
 
猛犸浏览器
猛犸浏览器猛犸浏览器
猛犸浏览器
 
拥抱开源-关于程序员的自我提高
拥抱开源-关于程序员的自我提高拥抱开源-关于程序员的自我提高
拥抱开源-关于程序员的自我提高
 
李成银:前端编译平台
李成银:前端编译平台李成银:前端编译平台
李成银:前端编译平台
 
前端编译平台
前端编译平台前端编译平台
前端编译平台
 
Joomla! 網站規劃 簡報-i love joomla! 5月小聚
Joomla! 網站規劃 簡報-i love joomla! 5月小聚Joomla! 網站規劃 簡報-i love joomla! 5月小聚
Joomla! 網站規劃 簡報-i love joomla! 5月小聚
 
Joomla! 網站規劃 簡報 - I love joomla! 5月小聚
Joomla! 網站規劃 簡報 - I love joomla! 5月小聚Joomla! 網站規劃 簡報 - I love joomla! 5月小聚
Joomla! 網站規劃 簡報 - I love joomla! 5月小聚
 
我要活下來 - Ruby Junior 工程師的存活術
我要活下來 - Ruby Junior 工程師的存活術我要活下來 - Ruby Junior 工程師的存活術
我要活下來 - Ruby Junior 工程師的存活術
 
Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)
Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)
Scrum Gathering 2012 Shanghai_团队合作与团队指导分会场演讲话题:自组织?你开玩笑吧!(艾永亮)
 
不妥協的河蟹之道
不妥協的河蟹之道不妥協的河蟹之道
不妥協的河蟹之道
 
Developer vs designer
Developer vs designerDeveloper vs designer
Developer vs designer
 
设计模式浅析
设计模式浅析设计模式浅析
设计模式浅析
 
Duck Typing and Multiple Inheritance
Duck Typing and Multiple InheritanceDuck Typing and Multiple Inheritance
Duck Typing and Multiple Inheritance
 
Running a Service in Production without Losing Your Sanity
Running a Service in Production without Losing Your SanityRunning a Service in Production without Losing Your Sanity
Running a Service in Production without Losing Your Sanity
 
Djt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.comDjt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.com
 
Djt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.comDjt22 justinliu djt.qq.com
Djt22 justinliu djt.qq.com
 
与Python一路走来
与Python一路走来与Python一路走来
与Python一路走来
 

More from ZongYing Lyu

Architecture of the oasis mobile shared virtual memory system
Architecture of the oasis mobile shared virtual memory systemArchitecture of the oasis mobile shared virtual memory system
Architecture of the oasis mobile shared virtual memory systemZongYing Lyu
 
A deep dive into energy efficient multi core processor
A deep dive into energy efficient multi core processorA deep dive into energy efficient multi core processor
A deep dive into energy efficient multi core processorZongYing Lyu
 
Libckpt transparent checkpointing under unix
Libckpt transparent checkpointing under unixLibckpt transparent checkpointing under unix
Libckpt transparent checkpointing under unixZongYing Lyu
 
Device Driver - Chapter 6字元驅動程式的進階作業
Device Driver - Chapter 6字元驅動程式的進階作業Device Driver - Chapter 6字元驅動程式的進階作業
Device Driver - Chapter 6字元驅動程式的進階作業ZongYing Lyu
 
Device Driver - Chapter 3字元驅動程式
Device Driver - Chapter 3字元驅動程式Device Driver - Chapter 3字元驅動程式
Device Driver - Chapter 3字元驅動程式ZongYing Lyu
 
Web coding principle
Web coding principleWeb coding principle
Web coding principleZongYing Lyu
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocolsZongYing Lyu
 
Compiler optimization
Compiler optimizationCompiler optimization
Compiler optimizationZongYing Lyu
 
MPI use c language
MPI use c languageMPI use c language
MPI use c languageZongYing Lyu
 

More from ZongYing Lyu (12)

Architecture of the oasis mobile shared virtual memory system
Architecture of the oasis mobile shared virtual memory systemArchitecture of the oasis mobile shared virtual memory system
Architecture of the oasis mobile shared virtual memory system
 
A deep dive into energy efficient multi core processor
A deep dive into energy efficient multi core processorA deep dive into energy efficient multi core processor
A deep dive into energy efficient multi core processor
 
Libckpt transparent checkpointing under unix
Libckpt transparent checkpointing under unixLibckpt transparent checkpointing under unix
Libckpt transparent checkpointing under unix
 
Device Driver - Chapter 6字元驅動程式的進階作業
Device Driver - Chapter 6字元驅動程式的進階作業Device Driver - Chapter 6字元驅動程式的進階作業
Device Driver - Chapter 6字元驅動程式的進階作業
 
Device Driver - Chapter 3字元驅動程式
Device Driver - Chapter 3字元驅動程式Device Driver - Chapter 3字元驅動程式
Device Driver - Chapter 3字元驅動程式
 
Web coding principle
Web coding principleWeb coding principle
Web coding principle
 
SCRUM
SCRUMSCRUM
SCRUM
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocols
 
Compiler optimization
Compiler optimizationCompiler optimization
Compiler optimization
 
MPI use c language
MPI use c languageMPI use c language
MPI use c language
 
MPI
MPIMPI
MPI
 
OpenMP
OpenMPOpenMP
OpenMP
 

提高 Code 品質心得