It's the last week, wow! How time flies. Anyway since this was assignment week once again I focused much of my attention on A3. However, learning about Big Oh was very interesting to me. By incorporating different factors of to the running time, I was able to distinguish between what affects the running time and what does not.
As I reflect on the course, I honestly cannot believe how much I've learned this semester. I've always been a fan of assignments, and I can't believe how many concepts I now feel comfortable with because of them. Just this week while I was working on A3 I had a recursion revelation that helped me distinguish from the human interpretation and CPU interpretation that I wouldn't put much attention to in earlier assignments. I mentioned a couple of weeks ago that you cannot "trust" that the recursion will work, when now I realize that that statement is half true. You have provide a base case and THEN you can trust the recursion. Lines can also be added just before the recursion is done as well, but remember to not think of it always like a CPU recursion. I ran into this problem (thinking of the CPU representation) on the game_descriptions function on A3 until I began thinking of how it is done as a human. I must know enough detail to "trust the computer" and use recursion BEFORE I concatenate to my list (instead of using another helper function). I now know that I must train my mind to think in both interpretations (so I can distinguish between them) so that I can do well on my exam. (Thanks to the TA who helped me last Thursday at BA3195 from 3-4!) What I found most fascinating about the course was how every week builds from the other, and by this week I feel as if everything is starting to fall into place. I remember from the first couple of weeks thinking how hard it was to write our own classes when now that's all we're actually doing! Surely we're not writing them from scratch like we did in the second and third week but we did have to write them in A2 and I know that I wrote plenty of helper functions in A3. And recursion was used over and over again in almost every week after week 3 in order to help build a foundation for the exam (and higher year computer science courses)!
Over the past three months, I've really enjoyed CSC148 and the learning techniques used in computer science. Practice really does make perfect, especially in these type of courses. Thank you for the wonderful experience.
Sunday, 5 April 2015
Week 9 Impressions
Week 9 had a big emphasis on efficiency with BST nodes. The lab we completed focused on the different ways to put nodes into a tree. One exercise consisted of creating a balanced_delete method to allow the new tree look more like a binary tree. The second exercise was investigating the efficiency of the height and contains methods of trees. While there wasn't a very clear way to approach the question, I learned that the most efficient way to put nodes in a BST tree is with the random module. Without the random module, I was placing nodes in a linear order. While the linear approach is fine when you have a list with a short length, it becomes extremely inefficient when the length of your list is a very large number. It would take a very long time to find a number at the bottom of the tree when using the contains method (as it would go through each node in descending order) and it would take a long time to find the length. However, the random module helped me generate a random node and placed it accordingly to where the node.data was so my tree's height can be shorter and the contains method takes less time finding the node. I felt that this week is the start of the beginning of efficiency with big Oh, and I'm looking forward to learning that.
Week 8 Impressions
During the most part of week 8, I was working on my second assignment. While I did find the minimax strategy confusing at first, I did eventually figure out an algorithm. In addition I completed a TippyGameState class that effectively ran. However, a lot of my attention was diverged from the topic of week 8: linked structures. While I did find the topic confusing at first (the str representation was throwing me off), I eventually got the hang of it with more lab exercises. Linked List Nodes (LLNodes) are essentially similar to BTNodes with the difference on the representation of how you initialize it. Once I got past that detail, the coding is not difficult. However, this week there was no recursion involved in coding, just iterations. This also puts an emphasis on the difference between recursion and iterations which helped me understand the concepts better. Fortunately, this understanding gave me a great benefit on the second midterm for the BTNode and LLNode questions! Can't wait for the next week.
Subscribe to:
Posts (Atom)