Common mistakes
- Allowing Negative Prime Numbers to be entered
- Unable to read from XML file
- Did not encode or decode space(\s), tab(\t) and newline(\n,\r) characters
Feedback
TEST YOUR CODE ! TEST YOUR CODE ! TEST YOUR CODE!
Software testing is a process used to identify the correctness, completeness and quality
of developed computer software.
The best way to test your code is to FIND ERRORS.
Some sad truths about testing are:
- In any software development, 40% of time is devoted to software testing
- Testing is a very challenging task which requires patience and keen inderstanding of the concepts
- You have to absolutely HATE your code when you are testing it.
Few common techniques of testing
- Branch Testing: Test all the branches in your code. It means all the possible combinations of IF-THEN-ELSE, WHILE, SWITCH constructs
In any software development, 80% of the errors occur because all the branches have not been tested completely
- Unit Testing: Write test cases for all functions and methods so that whenever a change causes a regression, it can be quickly identified
and fixed. Regression bugs occur whenever software functionality that previously worked as desired stops working or no longer works
in the same way that was previously planned. Regression is inevitable because when you make changes in your code, something which
was working previously will stop working
- Dry Run: This technique is helpful if the code is not large enough. Basically, you take some input data and run it through your code manually
taking note of changes in all the local variables. The trick is to manually trace the dataflow in your code. This technique is specially helpful in
detecting minor bugs and logical flaws. It is done using PRINT STATEMENTS or manually on a paper.
Common Mistakes
- Applet was slow. The program was unable to handle fast clicks. It restricts flexibility of the player
- Bad programming style. Since, checking was linent for first assignment, so same trend followed in second one
Feedback