Looking back to the recursion slog for week 7. I agree with what I said and my feelings towards recursion there. Recursion can be scary at first but after breaking it down to the base case and adding on from there it becomes a lot more manageable. Just like with anything else, practice makes perfect so looking at a lot of examples helped tremendously. Another important thing was that I wouldn't look at solutions until I had completely given up. This allowed me to actually solve some problems where I was sort of lost with. I basically tried again and again and once I solved it, It helped strengthen my understanding of how recursion was implemented for that case.
Now I'm looking forward for assingment 3, to tackle redundancy in the recursive calls.
Why Geeks Should Write
Saturday, 28 March 2015
Week 10
This week we looked at tracing and assertion. Tracing functions can become difficult as you look at functions that take other functions as parameters and so on. It becomes more tedious in terms of going back and forth to evaluate what's expected to be returned.
We also learned about assertion. We can assert certain conditions when the function is called. This allowed for debugging to become easier. I didn't understand its usefulness until completing the lab.
We also learned about assertion. We can assert certain conditions when the function is called. This allowed for debugging to become easier. I didn't understand its usefulness until completing the lab.
Week 9
During this week we had our term test 2 March 11. The main focuses of the test seemed to be recursion, binary trees and linked list. Linked Lists were still a bit tricky for me because you have to consider a lot of cases depending on what your function has to do. You have to constantly keep track of the where each of the elements are and when a new front or back is in place. Overall, the test felt pretty fair.
The lab this week focused on BST's. Binary search trees seem very useful. The way they are sorted allow for searching for specific nodes to become a lot faster. You can traverse the tree depending on whether your required node is greater than or less then a starting node in the tree. Otherwise if it wasn't sorted you would have to look at every single node.
Other than that, the strike still continues but hopefully it will end soon. Tutorials were very helpful and even though doing it on my own is okay, there were somethings that I had questions about.
The lab this week focused on BST's. Binary search trees seem very useful. The way they are sorted allow for searching for specific nodes to become a lot faster. You can traverse the tree depending on whether your required node is greater than or less then a starting node in the tree. Otherwise if it wasn't sorted you would have to look at every single node.
Other than that, the strike still continues but hopefully it will end soon. Tutorials were very helpful and even though doing it on my own is okay, there were somethings that I had questions about.
Sunday, 8 March 2015
Week 8
This week we had to hand in our assignment two. The assignment involved us implementing a recursive strategy(minimax) and a new game called Tippy. I worked in a group and we were able to split the work up evenly and everyone contributed the same. The hardest part had to be the minimax strategy. We all worked on it together and were able to get it to work (as far as we know).
Another thing we did this week was look a new data structure: linked lists. Linked list were a bit confusing for me. I had to look over the notes and work on the lab to really get a good understanding. Unfortunately we didn't have tutorials so it took me a bit longer to get the lab done. There wasn't anyone i could ask immediately for help. But I believe it was somewhat beneficial since I really had to focus and do it without TA assistance.
Another thing we did this week was look a new data structure: linked lists. Linked list were a bit confusing for me. I had to look over the notes and work on the lab to really get a good understanding. Unfortunately we didn't have tutorials so it took me a bit longer to get the lab done. There wasn't anyone i could ask immediately for help. But I believe it was somewhat beneficial since I really had to focus and do it without TA assistance.
Sunday, 1 March 2015
Week 7 Recurison
I had previously learned some recursion in my grade 12 computer science class but never really seemed to understand it too well. When we started learning it in CSC148, I was worried at first that i wouldn't be able to grasp the concept and apply it to programs. However with the exercises we've done in class and the labs I quickly began to understand how to implement it. I definitely feel once you wrap your head around whats going on and how it works, it becomes a lot easier.
The examples with the binary tree showed how useful recursion was. There were many applications for recursion such as finding the shortest path to a certain node, finding if a certain node is in the tree, etc. These tasks would of been unnecessarily lengthy (code wise) to accomplish just by iterating over the tree with a for loop or while loop.
What really helped me understand recursion was the exercises in which your write down your base case, then try to solve a smaller recursive case of the problem and finally implement your full code. By following this step by step process, I can see what I need and ultimately makes writing the full code a lot easier. Just like most problems, it's very difficult to tackle all at once and by breaking it down to simpler problems it becomes much easier.
The tutorials were extremely helpful as well. And really solidify the concepts for me. Although I did have some troubles at first, I managed to pick up the pace and finish the lab. I'm looking forward to using recursion in the next assignment because I see how much of a concept it is. I expect this assignment to take me a bit longer to work on then the first, so I'm planning on starting earlier (in terms of days to due date) then I did for the first assignment.
The examples with the binary tree showed how useful recursion was. There were many applications for recursion such as finding the shortest path to a certain node, finding if a certain node is in the tree, etc. These tasks would of been unnecessarily lengthy (code wise) to accomplish just by iterating over the tree with a for loop or while loop.
What really helped me understand recursion was the exercises in which your write down your base case, then try to solve a smaller recursive case of the problem and finally implement your full code. By following this step by step process, I can see what I need and ultimately makes writing the full code a lot easier. Just like most problems, it's very difficult to tackle all at once and by breaking it down to simpler problems it becomes much easier.
The tutorials were extremely helpful as well. And really solidify the concepts for me. Although I did have some troubles at first, I managed to pick up the pace and finish the lab. I'm looking forward to using recursion in the next assignment because I see how much of a concept it is. I expect this assignment to take me a bit longer to work on then the first, so I'm planning on starting earlier (in terms of days to due date) then I did for the first assignment.
Thursday, 22 January 2015
Being able to clearly and precisely express ones thoughts and opinions is a big advantage to their academic, career, life journey. This goes for everyone, you may be a very intelligent person but if you lack the skills to articulate your ideas, then they are meaningless. The topic of this week concerns, "Why geeks should write". Fundamentally, writing your ideas, and doing it well, is such an important skill that everyone should do it. Geeks are people who have a passion for a certain hobby or idea. This passion drives them to pursue their goals and as a result develop new and greater understandings of it. They should write because there are many people who most likely share similar interest. Writing about their knowledge of the subject, experience, struggles and triumphs, geeks can offer a great "Database" for others to look at and relate to. By writing more and more they will produce better and better texts for others to read and enjoy.
Subscribe to:
Posts (Atom)