Week 9 has left me extremely frustrated. Specifically, frustrated with A3. Actually, no - frustrated with A2 AND A3. We were given a unittest with which to test our minimax programs on subtract square... I made my own unittest before this week's lecture (since I'm in the wednesday evening section) and so was not aware of this, and wasted quite awhile fussing with my unittest. Then, as soon as I ran the one the profs posted on my code, it FAILED. SPECTACULARLY. As in, it didn't just fail one of the tests, it failed HALF OF THE TESTS. Of course, I don't know as of yet how badly this has affected my A2, but my imagination is going wild.
Meanwhile, I was getting an early start on A3 and had chosen part A (the part that relies on a successful minimax) and - get this - I had already IMPLEMENTED an entire section of part A. Of course, that doesn't matter because it was just adding on to a flawed program, which means it would have failed too. What's the point of optimizing a program that doesn't return correctly half the time?
Anyways, now I'm going to do part B. Which means the time I spent implementing one-third of part A was wasted.
Okay, that's pessimistic. The time I spent a) making my own unittest and b) implementing part of part A (albeit as an extension of a flawed function) was not WASTED per se. I mean, if I want to take a completely narrow, short-term, results-oriented view, then yeah it was wasted, but in all reality, this way I know more CS! Even if my mark will not benefit from me doing that extra work, my knowledge will. So there. (I may or may not simply be trying to convince myself of this.) No, seriously. Task-orientation > ego-orientation. Learning is good. In the spirit of that, let's focus on what important CS concepts I did learn from all of this (or, specifically, one concept which I became aware I do not know as well as I thought I did).
Lessons that can be drawn from all of this:
If my code failed the unittests but passed my doctests, this is not just some fluke, it's representative of an underlying problem: apparently I suck at coming up with test cases! This is a serious problem, and one I will seek to address as I work on A3, and completely solve by the time I get to the exam. I do not want to repeat my mistakes. I will address this problem by reviewing 108 material on how to choose test cases, and even review some 108 past exams yet again (I did past 108 exams in order to study for my own 108 exam, and recall that test-case-choosing featured prominently on them).
Ironically, now that I think of it, although I did quite well on the 108 exam, the one question that completely stumped me was this small, innocuous-looking 3-mark question about creating a single test case that would demonstrate the flaw in a given implementation of a function. I don't even remember what I put, but it was a guess and I certainly don't think it was right. I don't remember the specifics of the question now, but the fact that I had to guess and didn't feel like I was even close to grasping what it could be should have prompted me to study test cases over the holidays. I did not study test cases over the holidays. In fact, I did not open IDLE from the day of the 108 exam until the day this course started. Embarrassing? Yes. I can't change it now, though. I can just go back and revisit those sorts of questions yet again, three months later than would have been appropriate.
No comments:
Post a Comment