Sunday, November 9, 2008

Loop invariants

Since an invariant is An assertion that some property must always hold, one easily comes to the conclusion that a loop invariant is a property that is always true for the duration of the loop. Having just finished covering loop invariants in this weeks lectures, I began to try and apply the concepts we had learned about program correctness to the next assignment I had gotten from csc207. By and large I found it to be an incredibly helpful, albeit time consuming, way to ensure that my functions were closer to success on the first draft of code and that they were overall more successful and stable in the final draft of coding. I'm also hopeful that, since I took a much more rigorous approach to convincing myself my code would work, I should be able to provide much more useful and insightful documentation for my code.

We also had the second midterm, I find that i'm studying far less for csc236 then I had for csc165, but am understanding the material much better and thoroughly. Last year I found myself devoting more time to attempting past tests to understand the material, rather then reading over the course notes I had made, and ultimately I feel it was a far less effective study method. As I continue to refine my study techniques I find myself far less stressed out for midterms, to the point where I found myself appreciating the cleverness of the code in the question where the code checked the parity of vowels in strings.

No comments: