This week I found myself learning more about recursion. I see its uses but unfortunately I find myself still struggling a little to understand the process a recursion code goes through to complete itself. We went through the nested list example first which I think now, after lots of revising, I mostly understand the process. The second example we were given was called tree_burst. I feel like that one lost me on what it does exactly. I mean, I understand the recursion in it and the process the function goes through, but I don't quite get what the function does exactly. I don't know if its because maybe I was very tired that morning during 9am lecture or because the function seems very abstract unless you see it visually, but it may be something I have to revise and ask soon. On a side note, recursion reminds me of the movie Inception for some reason.
On the other hand, during our lab this week, we had to make use of inheritance on many occasions. Unlike recursion, I felt very comfortable with the use of this. It's a really simple concept that doesn't take very long to understand. Even with a different partner this week who missed the lecture on inheritance, we were able to finish all the tasks for the lab quickly enough and have my partner understand in a short amount of time the concept of inheritance. But if there was one thing that did frustrate us during the lab, it was unittest. For now, I am a firm believer that unittest is inefficient waste of time. Before we realized that we had to write a unittest to test our class and its functions, we tested our code ourselves manually and did so in much less time (and less typing) than writing and fixing up a unittest. Although neither of us were comfortable with unittests to begin with, I still find it is more time-consuming than just manually testing it (though this is probably because this is a relatively short code and might make more sense when testing huge stacks of code (so why give us this task for the lab in the first place)). I have yet to see someone prove me otherwise (which shouldn't take very long to do).
No comments:
Post a Comment