Part 9. Errors when designing functions.
Mistakes can be made when designing functions. Here are common mistakes when using the HtDF method.
1. Do not repeat the Signature when making the purpose.
The signature only shows us the Input and Output of a function, it does not say anything about its purpose.
The purpose asks the question on what we do with the parameters and how can it generate the output.
2. Make sure the test is consistent with the purpose, should the test comes up wrong, either check the test itself with the purpose, signature or check the function body.
Tests can also fail, take a deep hard look on what is causing that problem, there is a chance that the test is wrong so check it also.
Mga Komento
Mag-post ng isang Komento