Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
OO training homework 2 review and summary
Search
hatelove
July 23, 2012
Technology
4.7k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OO training homework 2 review and summary
將大家 homework 2 需注意的地方,延伸思考的部分提出來
hatelove
July 23, 2012
More Decks by hatelove
See All by hatelove
1. 在沙箱中開發
hatelove
12
3.1k
BDD in .NET - TDD 在實務上的最後一塊拼圖
hatelove
4
3k
OO training 基本原則整理
hatelove
2
5.3k
OO training homework 3 review and summary
hatelove
1
11k
OO training homework 1 review and summary
hatelove
1
8.2k
Object Oriented Training - Session 4
hatelove
1
5.2k
Object Oriented Training - Session 3
hatelove
1
11k
Object Oriented Training - Session 2
hatelove
1
4.9k
Object Oriented Training - Session 1
hatelove
1
8.4k
Other Decks in Technology
See All in Technology
"AWSはちょっと苦手"でも大丈夫。AWS Blocks で手軽に作る Flutter のバックエンド #FlutterKaigi
tacck
PRO
0
140
【dbts2026】AIエージェントの 判断と探索を変える、 データベース エンジニアリング― 既存DBの処理と依存関係から作る、オペレーショナルオントロジー ―
shisyu_gaku
0
150
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
580
Don't write the architecture only in the prompt.
neohsu
0
310
IoTとは〜? 数字で見るSORACOM UG【SORACOM UG Explorer 2026】
soracom
PRO
0
170
Consistency for mere mortals - A gentle guide to consistency
ufried
0
120
In-Context Learning再入門。ICLの勾配降下的解釈の研究動向を追ってみる。
dai08srhg
1
260
AIエージェント時代、Kaggleにどう取り組むか
takanao
2
500
kintoneで在庫管理システムを作るときの要件定義・設計ポイント
kai0707
0
230
20261031_IoTLT_vol140_kitazaki_v1.pdf
kitazaki
0
170
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
790
試験勉強はGrokBotでやれ
maigo999
0
110
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Un-Boring Meetings
codingconduct
0
490
Fireside Chat
paigeccino
43
4.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
290
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
610
Product Roadmaps are Hard
iamctodd
55
13k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
570
Being A Developer After 40
akosma
PRO
92
590k
A Soul's Torment
seathinner
8
3.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
First, design no harm
axbom
PRO
2
1.4k
Transcript
Date: 2012/06/04 OO training – homework 2 review
- 2 - 延伸思考 • 增加了非Manager,但會code review的角色 – 如:資深工程師、顧問 •
增加了不會code review的Manager – 如:HR manager • 每個manager的CodeReview方式不同
- 3 - 整理 • 職責 – Program屬於場景 – Builder,
Factory屬於工廠 • 命名 – Pascal & camel – GetsXXX or SetsXXX • Magic number or magic string – hard-code的字串或數字(非0 or 1) – Extract to member/field/property with readonly • readonly & constant – Enum, config, database or resource
- 4 - 效能 • 比較字串 – a.ToUpper() == “Y”
– string.Compare(a, “y”, true) ==0 • 宣告為virtual • 透過try/catch攔exception,控制流程
- 5 - 用法 • parameter建議不要複雜化 – 三元判斷式 – Function
• Console.WriteLine() – (string format, params object[] arg) – boxing • DRY – 多型 – 判斷式執行子句,只放因為條件不同而不同的部分 • 避免使用預設存取修飾詞
- 6 - 設計 • 存取修飾詞 – public: 從外部看這個物件的觀點 –
protected: 從子類看父類的觀點 – private: 從物件本身看自己的觀點 • 設計為virtual時,考慮是否應為abstract • 使用的角度 – interface • 物件的本質與共通性 – abstract • 系統的抽象程度看interface,重用程度看abstract
- 7 - 其他 • 不同題作業,請分不同project。可共用同一個solution。 • 請確認可以建置通過與執行無誤
Q & A