Saturday, 28 March 2015

Slog 9

The second last week of classes is here and this week we covered some review of assignment 2 and went over some of the classes to discuss the proper implementation as well as talking about assertions.  What I really enjoy about this class is all the review that happens at the beginning of each class.  We review certain concept covered in previous weeks in order to supply a full understanding of the concept.  This was much needed when talking about the assignment 2 functions, especially minimax.  We covered an implementation of minimax as well as discussed the different test cases that prove useful at giving useful information about the class and its functions.  We learned that the validity and quality of the test cases is vital at making sure you have covered everything that could occur in the code and making sure you have suitable code that runs and does what it is supposed to do.  This week we also learned about assertions.  Assertions are things that we know are true within the code and what we assume is true at the start of a function or method.  There are different types of assertions such as assertions that state what we know and assertions to check a type contract.  Assertions prove useful in many ways.  Assertions help with finding bugs, they can point out the existence of of a bug even when there are no symptoms as well as locating the actual bug within the code.  Assertions also communicate important things about your code.  When writing down what must be true at certain points and what you expect to happen, this can point out errors or bugs within the code.  Assertions prove to be very useful when designing and implementing code.

No comments:

Post a Comment