Week 11 - Implementation - Coding Principles
Week 11 - Implementation - Coding Principles
CT026-3-1
• Implementation
– Coding Standards
– Principles of Good Programming
• No abbreviations
– OnButtonClick vs OnBtnClk
• Meaningful names
– Intention revealing
• int t; //Time to complete single lap
• int singleLapTime;
Incorrect:
$currentuser
$currentUser
Correct:
$current_user
• Duplicated code
• Large classes
• Long methods
• Long parameter list
• Input Design
– Coding Standards
– Principles of Good Programming
Q&A
• Implementation
– Types of testing
– Test plan