"Compare Feelings With Earlier Blog Post"
During week #5 we were required to write about recursive functions which were being taught at the time. Recursive functions were not something that I was able to immediately grasp, and required a significant amount of review before the basic structure and techniques were implanted in my mind. I am now thankful that I had taken this time in the early stages to develop my knowledge of recursive functions as they have proven to be such an important aspect during the later stages of the course. Recursive functions are constantly reoccurring in the curriculum and a base knowledge of their implementation is clearly a necessity.
During week #5, I explained how I was having difficulty grasping the concepts, and could not see the immediate benefit of recursive functions. Those two things have changed drastically since week #5 as I feel I have a firm grip on the concepts and can definitely see the benefits that come with writing recursive functions. Firstly, to understand recursive functions I simply needed to practice implementing many of them and reviewing the course material. The labs were probably the most beneficial aspect of my education in learning recursive functions as it allowed me to attempt the implementation by myself with minimal guidelines. Secondly, I can now clearly see the immediate benefit of recursive functions. They can condense an extremely large number of lines of code into a few simplistic ones, it causes me to rethink many of the functions I have implemented in the past, knowing that they could certainly have been completed in a more concise fashion. I have seen functions spanning 15+ lines that have been manipulated into only a few with the use of recursive functions (through the help of my classmates).
Luckily for me, many of my class mates didn't have the initial trouble that I had when implementing recursive functions and so they were able to assist me with my learning. My lab partner, as well as members of my CSC165 tutorial have been helpful when discussing implementation and even demonstrating functions that they have completed. Although, upon reading blog posts from other members of CSC148 I have realized that I am not alone with my initial struggles with recursive functions as many others found them to be difficult when first introduced as well.
Sunday, 29 March 2015
"Impressions of Week #9"
During week 9 we had our second-half of the midterm testing, and I believe that it went very well. In preparation, I reviewed and copied out many of the recursive functions we reviewed in lecture and in the labs onto my 'cheat sheet' to ensure I wouldn't get stuck during the test. By coping out (and understanding) the functions, I ended up not even having to use my 'cheat sheet' at all throughout the test (besides using it for a quick reference once or twice). Overall I was satisfied with the result, and am hoping the exam accurately reflects the term tests level of difficulty.
The new material taught in week 9 was again an extension of the binary tree node data structures we have been using for the past couple of weeks. We learned about tree mutations, instead of just search algorithms for finding specific items in the tree, we are now able to select specific items for removal, or add different items to the structure, and obvious extension of what we had learned previously. This makes sense as the next step in our curriculum as search methods can only handle so many problems that would be faced when working with the binary tree structure, the mutation methods provide a solution for further questions to be answered. When presented in class they did not seem that difficult, but nonetheless it took further practice to be able to implement the functions by myself. Throughout all of the 'tree' content I have found it extremely helpful to draw pictures to represent the data structures I am trying to create, the technique once again was successful here. Everything just seems so simple once it is clearly displayed on a piece of paper rather than hidden within lines of code.
While attempting to complete the lab functions, I just constantly referenced the insert/delete functions we had seen in class and did just as the lab instructed; 'experiment'. Forming a binary tree from word_list was difficult, and I'm not sure if I did it completely correct, but by borrowing code from previous lectures and labs I was able to get the basic structure of the function. Balanced delete was easier to implement as I found it to be a more straightforward extension of the material, especially when a hint was given (use import random).
During week 9 we had our second-half of the midterm testing, and I believe that it went very well. In preparation, I reviewed and copied out many of the recursive functions we reviewed in lecture and in the labs onto my 'cheat sheet' to ensure I wouldn't get stuck during the test. By coping out (and understanding) the functions, I ended up not even having to use my 'cheat sheet' at all throughout the test (besides using it for a quick reference once or twice). Overall I was satisfied with the result, and am hoping the exam accurately reflects the term tests level of difficulty.
The new material taught in week 9 was again an extension of the binary tree node data structures we have been using for the past couple of weeks. We learned about tree mutations, instead of just search algorithms for finding specific items in the tree, we are now able to select specific items for removal, or add different items to the structure, and obvious extension of what we had learned previously. This makes sense as the next step in our curriculum as search methods can only handle so many problems that would be faced when working with the binary tree structure, the mutation methods provide a solution for further questions to be answered. When presented in class they did not seem that difficult, but nonetheless it took further practice to be able to implement the functions by myself. Throughout all of the 'tree' content I have found it extremely helpful to draw pictures to represent the data structures I am trying to create, the technique once again was successful here. Everything just seems so simple once it is clearly displayed on a piece of paper rather than hidden within lines of code.
While attempting to complete the lab functions, I just constantly referenced the insert/delete functions we had seen in class and did just as the lab instructed; 'experiment'. Forming a binary tree from word_list was difficult, and I'm not sure if I did it completely correct, but by borrowing code from previous lectures and labs I was able to get the basic structure of the function. Balanced delete was easier to implement as I found it to be a more straightforward extension of the material, especially when a hint was given (use import random).
Tuesday, 17 March 2015
"Impressions of Week 8"
During the past weeks we have engaged in learning of linked lists and how they are applied in programming. It is a clear extension (or branch) off of the idea of trees. The construction of the nodes and linked lists is was a straight forward extension from trees, proving to be not difficult to implement with the former knowledge of trees. It seems like a practical way of linearly storing data to have a clear path of access, the programming benefits are apparent.
During class a basis of the understanding of linked lists and linked lists nodes was developed but it was with the lab (which did not occur, but the solutions were posted nonetheless) which my understanding was solidified. I attempted many of the problems on my own and had some difficulty but was ultimately able to finish most of the lab without consulting the posted solutions. I drew pictures out of necessity, not just because the lab handout suggested the use of diagrams, it was greatly beneficial. I found that many of the functions were similar to other ones so solving one would make it easier to solve the other, for example this was the case when solving insert_before and delete_after. Although the two functions are inherently very different, the way of thinking to solve them was similar. I initially had trouble solving the insert_before function but thorough review of the contains function was helpful in my understanding which ultimately led to me solving the problem, as it could be considered just an extension of that function.
During the past weeks we have engaged in learning of linked lists and how they are applied in programming. It is a clear extension (or branch) off of the idea of trees. The construction of the nodes and linked lists is was a straight forward extension from trees, proving to be not difficult to implement with the former knowledge of trees. It seems like a practical way of linearly storing data to have a clear path of access, the programming benefits are apparent.
During class a basis of the understanding of linked lists and linked lists nodes was developed but it was with the lab (which did not occur, but the solutions were posted nonetheless) which my understanding was solidified. I attempted many of the problems on my own and had some difficulty but was ultimately able to finish most of the lab without consulting the posted solutions. I drew pictures out of necessity, not just because the lab handout suggested the use of diagrams, it was greatly beneficial. I found that many of the functions were similar to other ones so solving one would make it easier to solve the other, for example this was the case when solving insert_before and delete_after. Although the two functions are inherently very different, the way of thinking to solve them was similar. I initially had trouble solving the insert_before function but thorough review of the contains function was helpful in my understanding which ultimately led to me solving the problem, as it could be considered just an extension of that function.
Sunday, 8 March 2015
"Impressions of Week #7"
As the year progresses, the material has become substantially more complex. The early subject matter didn't require much thought to fully comprehend, but week 7 has proven to be a diversion from what I would usually expect. Further learning about tree's is very interesting as the utility of such data structures is clearly seen. This week we have learned about binary trees, only consisting of two branches rather than a possibly infinite amount such as we have seen in previous weeks.
I was very glad to see that a sample solution was posted for the lab #6, as initially I had difficulty understanding some of the content. During the previous lab I was only able to complete one of the assigned functions within the lab period time, and by reviewing the techniques used in lab #6 I was able to return to the previous lab and complete some of the other functions with much less trouble. Recursive techniques still prove to be a challenge for me, so I was happy to see that recursion was used frequently throughout the lab, allowing myself to gain more experience with the implementation.
Specifically the find_max function was extremely helpful to my understanding of recursion, even though the actual code to execute the function is one simple line! I was going about the problem all wrong, trying to do way to much when the solution itself was very simple. With the understanding of this function, I was able to apply my knowledge to write the list_longest_path function without much difficulty. I first wrote down the algorithm I was going to execute in english, knowing that I had to compile two lists and then judge which one was the longest and return such list. After clearly articulating what I was going to do, the implementation of the code seemed significantly more straight forward. I feel as if explaining the algorithm in english will be a key part of my learning new coding techniques in this course.
Overall the week was challenging, but with the examples provided in class and with the lab solutions I feel as if I will have a firm understanding of the content by the time the midterm comes around.
As the year progresses, the material has become substantially more complex. The early subject matter didn't require much thought to fully comprehend, but week 7 has proven to be a diversion from what I would usually expect. Further learning about tree's is very interesting as the utility of such data structures is clearly seen. This week we have learned about binary trees, only consisting of two branches rather than a possibly infinite amount such as we have seen in previous weeks.
I was very glad to see that a sample solution was posted for the lab #6, as initially I had difficulty understanding some of the content. During the previous lab I was only able to complete one of the assigned functions within the lab period time, and by reviewing the techniques used in lab #6 I was able to return to the previous lab and complete some of the other functions with much less trouble. Recursive techniques still prove to be a challenge for me, so I was happy to see that recursion was used frequently throughout the lab, allowing myself to gain more experience with the implementation.
Specifically the find_max function was extremely helpful to my understanding of recursion, even though the actual code to execute the function is one simple line! I was going about the problem all wrong, trying to do way to much when the solution itself was very simple. With the understanding of this function, I was able to apply my knowledge to write the list_longest_path function without much difficulty. I first wrote down the algorithm I was going to execute in english, knowing that I had to compile two lists and then judge which one was the longest and return such list. After clearly articulating what I was going to do, the implementation of the code seemed significantly more straight forward. I feel as if explaining the algorithm in english will be a key part of my learning new coding techniques in this course.
Overall the week was challenging, but with the examples provided in class and with the lab solutions I feel as if I will have a firm understanding of the content by the time the midterm comes around.
Sunday, 1 March 2015
"Summary of Object Oriented Programming"
Over the past few weeks we have learned more about the language we have been learning to write code in, but approaching it from a different angle. A lot of the material we had learned up until a few weeks ago had been programs that used a 'procedural program' paradigm, rather than an 'object oriented' paradigm. The benefits of object oriented programming were immediately apparent, creating objects that have both data and functionality (rather than just having data, and operating on that data with separate functions as in procedural programming) is clearly a more elegant way of writing code. I realized that code becomes more concise, simplistic, more focused and overall easier to comprehend with this paradigm shift.
The concept of data and methods being stored in classes was something that made sense on an intuitive level upon introduction. Also, the implementation of the associating code was straight forward as I had expected. Classes allow for enhanced focus on specific objects being used, and their practical application was quickly realized (as displayed in class with examples about airplanes, types of employees, etc..). The idea of inheritance was again something that made sense on an intuitive level, and the value it would bring to coding was clear. With inheritance subclasses can be constructed to operate under the jurisdiction of previously defined parent classes, inheriting the parent's methods. This allows for added methods to be contributed to the subclasses without altering the parent class. The corresponding code for inheritance was not as easily understood at first, and practice was needed to reach a complete understanding. I was able to fully comprehend the idea of inheritance after taking the time to trace a series of programs that were presented in class. First I went over the inheritance example that is given in the course notes (chapter 1; class A(), and class B(A) found at the end of the chapter) and traced the code in my mind multiple times, and with the python visualizer. This allowed me to follow where the programming was looking for data first, and where it would check next if the required information was not found. This gave me a general grasp of the concept of inheritance, but it was the classes Employee, SalariedEmployee and HourlyEmployee which fully solidified my understanding. These classes introduced me to raising 'NotImplementedError' and gave me more practice tracing inheriting methods.
Object oriented programming has been enjoyable and useful to learn about in the past weeks and after further research, I've recognized that it is an important concept to understand as it has been the preferred programming paradigm since the 1980's. Im glad to have worked on the concepts until full comprehension as I feel a solid background in OOP is going to be important in further learning.
Over the past few weeks we have learned more about the language we have been learning to write code in, but approaching it from a different angle. A lot of the material we had learned up until a few weeks ago had been programs that used a 'procedural program' paradigm, rather than an 'object oriented' paradigm. The benefits of object oriented programming were immediately apparent, creating objects that have both data and functionality (rather than just having data, and operating on that data with separate functions as in procedural programming) is clearly a more elegant way of writing code. I realized that code becomes more concise, simplistic, more focused and overall easier to comprehend with this paradigm shift.
The concept of data and methods being stored in classes was something that made sense on an intuitive level upon introduction. Also, the implementation of the associating code was straight forward as I had expected. Classes allow for enhanced focus on specific objects being used, and their practical application was quickly realized (as displayed in class with examples about airplanes, types of employees, etc..). The idea of inheritance was again something that made sense on an intuitive level, and the value it would bring to coding was clear. With inheritance subclasses can be constructed to operate under the jurisdiction of previously defined parent classes, inheriting the parent's methods. This allows for added methods to be contributed to the subclasses without altering the parent class. The corresponding code for inheritance was not as easily understood at first, and practice was needed to reach a complete understanding. I was able to fully comprehend the idea of inheritance after taking the time to trace a series of programs that were presented in class. First I went over the inheritance example that is given in the course notes (chapter 1; class A(), and class B(A) found at the end of the chapter) and traced the code in my mind multiple times, and with the python visualizer. This allowed me to follow where the programming was looking for data first, and where it would check next if the required information was not found. This gave me a general grasp of the concept of inheritance, but it was the classes Employee, SalariedEmployee and HourlyEmployee which fully solidified my understanding. These classes introduced me to raising 'NotImplementedError' and gave me more practice tracing inheriting methods.
Object oriented programming has been enjoyable and useful to learn about in the past weeks and after further research, I've recognized that it is an important concept to understand as it has been the preferred programming paradigm since the 1980's. Im glad to have worked on the concepts until full comprehension as I feel a solid background in OOP is going to be important in further learning.
Subscribe to:
Posts (Atom)