Sunday, 5 April 2015

Week 12

Final Thoughts:

     Overall, I have learned a lot and have much to take with me from my participation in this course. The content was nothing of what I had expected for my Cognitive Science Major, however there are lessons that can be applied to the study. The time consuming nature of the course content was a big challenge for my time-management skills, yet here we are with the end of the course just around the corner. The concepts taught within this course developed my thinking skills in terms of how to tackle large, repetitive problem structures in the least amount of time as well as how to structure information in such ways that allow a computer to quickly derive certain aspects or make specific changes with the least amount of instruction and processing time. This course also developed my understanding of how computer classes and methods are structured in order to create efficient code that is straight forward to interpret, not only for the user but also for sorting through the back end of the programs.

     I was also able to quickly compensate for the missed lab sections with the help of my fellow SLOG peers as well as other helpful peers within the course. However, I did not feel as though the students were treated fairly when assigning the missed percentage marks to the quizzes when we were assured by our TAs that we would have the chance to recuperate our lab marks as the course progressed as well as the professors who assured us that we would be able to determine distribution of missed marks at the end of the term. This approach does not reflect the capabilities of the students and should not be used as a tool against student progress when we are the only ones paying our money and time to deal with the repercussions of the TA strike. In addition I am quite excited to finish off this semester as I feel incredibly exhausted and in much need of a mental break, however I look forward to applying what I have learned throughout the term as I proceed with my academic career.

Sunday, 29 March 2015

Week 11

Revisiting Week 6:

     I chose to revisit this week because it seems to be the most fitting reflective post I can draw back to in regard to my views of the course. In general, I have found that my opinion hasn't changed much from rereading my previous post. My confusion with what content should be retained from the lectures has remained throughout the course although I did find that the lectures became more descriptive the further we progressed into the content. In addition, the content of this course has continued to take up an overwhelming amount of my schedule, making it a much greater challenge to time manage my other courses. However, I feel that this also reflects the difficulty of the content of this course as well as the lack of instruction time provided. The assignment instructions in particular were very abstract in description and understanding the requirements along with sorting through all possible errors resulted in a lot of extra time having to be spent. These thoughts in particular seem to have a high correlation with my thoughts on Week 6. In addition I also previously found that the TA for my lab section did not provide me with much insight into how I should be sorting through my errors in lab exercises so the absence of labs encouraged me to take advantage of the knowledge I can draw from my peers' SLOG posts. This was also something I was beginning to grasp in the week I am revisiting. In doing so, I have come to the realization that many of the students within the course are also enrolled in CSC165 which seems to come as a huge aid for this course' content. However, as much as this was not my approach I am glad for the experience I have had and how it has taught me to thoroughly check my grasp on concepts by making sure I fill in all the gaps that remain in my understanding. This is something I will definitely be taking with me as I progress through my academic career. 

     I'd also like to share a few awesome posts that have helped me a ton with my understanding after quite some time spent searching throughout the weeks. A post that I found to be incredibly useful to my understanding is: http://whydopigsquack.blogspot.ca due to its very descriptive and informative nature while targeting a majority of the problems I encountered as well. I also enjoyed reading http://csc148withsam.blogspot.ca due its different yet incredibly helpful approach. I look forward to finding more gems like these as the exam date gets closer. 

Sunday, 22 March 2015

Week 10

Impression of Week 9:

     This week mainly revolved around writing the second midterm, which we have yet to receive marks for so I am unable to provide feedback in regards to my performance or understanding. In addition, this week also covered BST mutations including the recursive functions insert and delete.

      As much as I understand the concept of inserting and deleting values according to their corresponding location with respect to being greater than or less than the root node, I am having a hard time understanding the purpose of covering such methods in terms of how it relates to an understanding of computer programming. Seeing as I still consider myself new to programming (this is only my second CSC course) I am confused at what insight I am to draw from learning the implementation of a function. For example, I see no other alternatives to coding the insert and delete functions and find it difficult to avoid simply using the same code for future implementations. That being said, I have encountered much confusion throughout the course in understanding how iterating through one instance of implementing a function will better my ability to code. If anything I would imagine that learning to code would encompass many different methods of coding the same outcome so that new coders would find their own preferred way of coding. However, I have been enjoying reading my fellow students' SLOGs because their interpretations and subsequent comments have encouraged me to gain new insight, that I would not have otherwise had, into developing my understanding of the content by interpreting it in different ways. I also appreciate the honesty that others have presented when depicting their impressions of the course's content because the gaps in their understanding not only point out mine but also enable all of us to learn from one another and improve not only ourselves but hopefully future versions of this course as well.

    In conclusion, I would like to point to one of the many SLOGs that I have found myself agreeing with when it comes to the structure of this course and how a different approach could be far more beneficial to our learning careers.  http://classcompsci.blogspot.ca

Sunday, 15 March 2015

Week 9

Impression of Week 8:

     I spent a large majority of week 8 focusing on finishing the second computer programming assignment with my group, to the detriment of my health, our other courses and the content covered within lecture. Thankfully, the content for this week was rather simple to grasp, although my understanding could be insufficient depending on the mark I receive for the last midterm we wrote.

     Week 8 lecture and lab content covered linked lists which is a linear sequence of nodes with corresponding attributes front (pointing to the beginning of the list), back (pointing to the end of the list) and size (the size of the linked list). Each node within the list contains its own value along with a reference to the next node within the sequence. Therefore a linked list class can represent either an empty list (represented as None) or a node with corresponding data that references a linked list. This recursive data structure allows us to walk through the list until a certain condition has been met in order to find, insert or remove elements of the list without disturbing its entire structure. Slicing can also be used to target specific sections of the list however, we very briefly skimmed over this method in class.

Sunday, 8 March 2015

Week 8

Impressions of Week 7:

The main focus of week 7 in regards to the lecture material was an introduction to binary trees, an extension to the Abstract Data Type, "Tree" that we previously covered. At first, this concept seemed quite simple for me to grasp however when it came down to the logistics I quickly realized I needed to reorient my understanding toward how specific attributes (aka variables belonging to this new class) were being represented in Python. I will be using this approach to develop the groundwork needed for constructing algorithms that sort or traverse through this type of Tree design.

Class BTNode or Binary Tree node, defines a Tree consisting of data stored at a root node with either None, 1 or 2 children that are represented according to their "left" and "right" arrangement (i.e., self.left & self.right). For simplicity's sake, these left and right parameters within the __init__ method are set to None in order to quickly discover leaves within the Tree (which contain None for left and right branches). In addition, for Binary Search trees, data in the left and right subtrees are ordered such that  the left subtree is less than node.data and the right subtree is greater than the data at its respective node, making it much easier to sort through when searching for a desired value or object. The standard special methods __str__, __eq__ and __repr__ apply to these classes and function as a self-check for the design being developed as well as a user-friendly representation of what the computer is working with.

Part of the versatility of binary trees is that they can be used to represent arithmetic expressions in which no expressions are left empty, the value is returned for each leaf and data contained within the left and right trees is evaluated then combined using the binary operator contained within the root node. Thankfully, the built_in function 'eval' is designed to perform this algorithm.

Additionally, this was my first week being introduced to defining parameters as 'Type' function within the doctoring. In this case, every time the parameter is called, Python refers back to the function provided within the definition of the parent function. In combination with this new ability, 3 new recursive Tree traversals were briefly presented, including inorder, preorder and postorder, differing only in placement of the print statement with regard to two recursive function calls. For example, the preorder method visits the parent node prior to recursing through the left subtree and then the right while the postorder method starts off recursing through the bottom of the left subtree (calling on any right leaf before the node if 2 children are present) then through the bottom of the right subtree, visiting the node itself at the end. Lastly, the inorder method also begins by recursing over the left subtree but calls on the node itself prior to recursing over the right subtree. A visualization of these methods is provided below.



Source: http://rosettacode.org/wiki/Tree_traversal



Sunday, 1 March 2015

Week 7

Object-Oriented Programming Summary

     This week I will be providing my summary of Object-Oriented Programming. One of the things I have learned throughout my experience in computer programming is the necessity of defining the semantics used in order to develop a thorough understanding of the concepts. This was often skipped over throughout the introduction to computer programming and continues to be assumed knowledge within computer science lectures and course material. However, misunderstanding the language used in programming can result in gaps within the learning experience which easily inhibits one's overall ability to grasp how the computer operates and what is happening behind the code.

     Within the programming world, objects are defined as self-contained functions or variables such as classes, lists and dictionaries. In turn, functions describe what you can do with the class, without storing any information, while variables are used within the functions to store information and attributes (variables inside a class). If a function is required to affect the variables contained within it and change their value it can not do this. Therefore, what is required is a way to group closely related functions and variables so that they have easy access to one another and can interact to fill in missing pieces of information. One way to do this is by implementing a class. Classes are data structures that hold methods (pieces of code associated with objects or instances of a class) and code to process data in the same spot which describes how to make something or acts as a blueprint for the design. A class can also be referred to as the implementation of a type which generally represents a noun (person, place or thing aka an object). For example, when a group of "objects" share a common design but have some changed properties (aka values of the variables) between them, a class can be utilized so that the user can repeatedly start out with the general design and change its properties, without having to build the design from scratch each time. Each time the blueprint is called an instance of the class is generated which creates a new object from the blueprint. In addition, classes contain built-in methods such as __str__(), __repr__() and __eq__() which provide various ways to represent the object being defined within the class such as by providing a human readable version, recreating an object with the same value or checking for equivalency between self and other.

     When coding a new class, "self" is the first parameter in any function defined inside the class. The purpose of this is to access functions and variables inside various methods in the class, from within the class itself. In order to do this the code "self.variable_name" must be called within the method, where variable_name represents the parameter of a function within the class. Alternatively, to access functions and variables from outside the class, the variable name assigned to the instance of the class must be called along with the name of the method you wish to access.

     Inheritance is the process of defining a new class based on another parent class. This new class inherits everything from the parent class while adding its own new attributes and methods to fill in missing pieces of information in the parent class that only a specific instance of the class could satisfy. To obtain this functionality, within the beginning of the code the name of the parent class must be provided in brackets after the name of the new class. In addition, any methods or attributes added to the new class that share the same name with the parent class are called instance variables and are capable of overriding the parent so that new definitions are used for the new class.

     Through the functionality described above, Object-Oriented Programming is able to group functions and variables together in classes so that they are in close reach of one another in order to make adjustments and work together through quick and efficient access to all required information.


Sunday, 22 February 2015

Week 6


     So far, within the CSC148 course I have been focusing on maintaining a grasp on the topics discussed in lecture, and as much as the information correlates to lab content and quizzes, I am finding myself having a hard time grasping what material we will be tested on and what we should be taking away from the lectures. There seems to be a major discrepancy between the material broadly scanned over in class and the insight students are required to draw from these brief discussions in order to successfully complete the lab quizzes, midterms and assignments. As a result of this, the content of this course has quickly become increasingly demanding, disorienting and time consuming, especially when added alongside the demands of 4 additional courses. However, finding loop holes in my understanding of this class has quickly presented itself as a blessing in disguise for me in this course. The more I find areas left with gaps the more I search for information to tie in concepts loosely presented within lectures. Due to the time-consuming nature of this approach I have found that looking through other students' SLOG posts has been a saviour in providing quick, straight-forward explanations of how to sort through the lab and course content, especially when the TAs themselves are unable to provide a clear understanding of where our logic requires some touching up. One example of a thorough SLOG that has provided me with much needed aid has been http://keirnslog.blogspot.ca. I feel certain that for future attempts to clearing up my confusion I will be drawing insight from others that present more confident outlooks toward the course content.