Summary programming methods (TDD, callbacks and design patterns)
281 views 0 purchase
Course
2IPC0 Programming methods
Institution
Technische Universiteit Eindhoven (TUE)
Summary of the course Programming Methods (2IPC0) of TU Eindhoven (2017). Included: Test-driven development (TDD), Callbacks (From Callbacks to Design patterns) and all 12 design patterns.
, 1 Test-driven development
Test-driven development, abbreviated as TDD, is a technique that concerns
the development process, rather than the structure of the developed product.
1.1 How: TDD steps
These are the TDD development steps as performed in this course:
1. Gather and analyze the requirements to realize, e.g. use cases or user
stories (these will be given in this course).
2. Decide which requirement to develop next, and what module it concerns.
3. Specify the module informally in the source code, using natural lan-
guage.
4. Specify the module formally, by providing its interface and contract.
5. Design and implement a test case; document its motivation in the
source code. This test case will now fail, lacking a module implementation.
6. Design and implement module features, intended to make the test
case pass.
7. Test the new module implementation, and fix defects found (back to step
6).
8. Where relevant, improve the structure of the code (refactoring), pre-
serving correctness by running all test cases again (regression testing).
9. Repeat from step 5, until the entire module has been implemented and
tested.
10. If, after delivery, a defect is reported for the module in vivo, then, first,
add a test case to detect that defect in vitro, and only then repair the
defect.
1.2 Why: motivation for TDD
Why should one test software before delivery?
• Humans make mistakes and introduce defects.
• Defects reduce the product’s quality.
• The longer a defect remains undetected, the higher the cost of repairing
it.
3
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller juliahofs. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $4.82. You're not tied to anything after your purchase.