Friday 22 July 2016

Strategies for De-bugging

Strategies to work through...

1. What does the tasks ask you to do?
2. What have you told the computer to do?
3. Where is it going wrong?
4. Take bottom blocks away and check the first steps - test.
5. If correct - move onto the next block. Make the correction.

Check understanding of the language.
Watch when you copy and paste lines of code.
6. Add some scaffolding to support - add "How much change left to give"
7. Remove the scaffolding if no-longer required.
8. Explain out loud to your peer or a rubber duck - verbalise.
9. Plan in tests - e.g. at 100, 99, 101 - change over edge cases.


Challenge:
Change for $90
Is it more than $100?
What is the biggest note in $90?
$50 + $20 + $20 + $0
Check the language- is it more than 100 vs. if it is100 or more.


No comments:

Post a Comment

Thanks for your comment. It will be posted as soon as it has been moderated.
Allana