Coding design Flashcards
What is implementation
-writing the source code that is needed to realize the architecture and design.
Three ways of managing the implementation process:
Version management (git)
Build system (Ant) - assembling automation
Issue tracking (JIRA) - keep track of bug reports.
What are the 4 key implementation concepts:
Understandability
Testability
Reusability
Efficiency.
Tips to write understandable code:
- meaningful identifier names
- Add comments
- follow a coding style convention.
Things to keep in mind for testability
More execution paths, more tests.
Tips to make code more testable
- Follow Test driven development (TDD) (Code must only be written to make a test case pass, and tests musts exist before the code can be written).
- Test early and test often.
What are the benefits of reusability?
Code reuse simplifies maintenance - bugs only need to be fixed in one place.
Code reuse accelerates development - less time reinventing the wheel.
Tips for reusability
-DRY - don’t repeat yourself (use method calls)
-Increase Cohesion where possible (keeps related things together, and unrelated things out)
- Reduce coupling where possible (indication of interdependence accross modules)
Tips to ensure efficiency:
Avoid recursion when possible.
study efficient search/sort algorithms.
Big O notation: measure the worst case time complexity of an algorithm.