Saturday, April 4, 2015

Entry 10: Recap of Weeks 11 & 12 + Final Thoughts

     On this final week of classes, I want to share my thoughts on this course as a whole. It began as an introduction to the construction of classes and ended with the Big-Oh of two or more algorithms, which was the main topic of weeks 11 and 12. The transition from CSC108 to this course was very appropriate because that course provided the foundation of the Python programming language. I was expected to be comfortable with every aspect of Python, especially constructing classes. For the most part, I had to issues with the first several weeks of this course. I think the confusion began with the introduction of recursion; I understood the concept, but I was unsure how or when to use it in a problem. Over time, I became more comfortable with recursion and Assignment 3 give me the opportunity to use it effectively.
     The objective of Assignment 3 was to complete a series of functions for a tree class, but the nodes of this tree were made of game states. The root of the tree is the start of a game and the leaves of the tree are the concluding game states of each scenario. Hopefully, the TAs mark this assignment as well as Assignment 2 as soon as possible.




     To conclude, I want to thank Professor Heap for all the work he has done to make this course an utter success. Despite the work stoppage that occurred in the month of March, he remained composed and provided help to many students including myself regarding the assignments as well as the term tests. To all the students of this course, I wish everyone the best of luck on your exams!

Friday, March 27, 2015

Entry 9: Revisiting Entry 1 (Why Do Geeks Need to Know How to Write?)

     Next week is the last week of classes before the start of exam season and here is a reflection of how I changed as a person from the first blog entry. The underlying theme of that post was why geeks need to know how to write. My response to this important question was the only way for one to express his or her feelings is through writing. Throughout the semester, I realized that writing is one part of the bigger picture which is communication. It is virtually impossible for humans to interact with each other without communication. Sometimes, I find myself struggling to transmit my thoughts in words whether it is through writing or speaking. Throughout the year, I have met many wonderful people, all with their own unique traits and characteristics including this student. His response to the question of why geeks should write is on par with my own perspective. He says that working in groups requires collaboration and that can only be accomplished through "proper transmission of ideas which often involve good documentation and commenting". I firmly believe this applies to all areas of education including Computer Science.
      This student believes that working alone has its benefits and drawbacks, but working with others is a skill that must be obtained at an early age. Personally, I do not mind working with myself because I can organize my thoughts and execute the plans that I have in regards to an assignment. However, it would be nice to work with one or two individuals because each member of the group can contribute his/her thoughts and create a hub of information that can be used to devise and execute a plan. The challenge for me is to approach people and not worry about how other people will judge my thoughts. I always run into the habit of thinking about what everyone else might say about me and this has been a part of me since my days in elementary school. As I became older, my mind opened up and I felt increasingly comfortable communicating with others.
     Ever since that blog post was released, I felt increasingly comfortable to approach strangers and communicate to them. I do believe that I am a better person and the weekly blog posts have led me to communicate more to the people I love as well the people I am bound to meet in the near future.
   

Friday, March 20, 2015

Entry 8: Recap of Week 9 - Term Test

     Highlights of this week include the Term Test and a BST function called "insert". Monday's lecture was mainly a review session of content from the past 6 weeks. It was somewhat helpful, but most of my confidence was acquired from the aid sheet. Overall, I think I did okay on that test, but I was a little confused on the last question, which involved the use of recursion. I think I need additional practice with recursion because I have trouble applying the core structure to a particular program. In regards to the insert function, its main objective is to place a new data object in a binary search tree starting from the root. Since it is a binary tree, the new data object is placed according to its value; if it is less than the root, then place it to the left of the root, and vice-versa.
     The function was also applicable to this week's lab and I was able to complete with little or no issues. In regards to the CUPE 3903 Unit 1 Strike, I am unsure if it will end prior to the exam period because it seems both sides have not returned to the bargaining table. Hopefully, the situation will improve in the coming days.

Friday, March 13, 2015

Entry 7: Recap of Week 8 - Linked Lists

This week's main feature focus is the LLNode class; it represents a Linked List, which is a list of nodes connected by one another. This is best visualized with a diagram and Monday's lecture demonstrated that:




The key elements of a Linked List are the front, back and size. The front refers to the first node of a linked list, while the back refers to the last node of a linked list. Size is simply the total number of nodes in a linked list. The process of forming a method involves the same process of an if-else statement. This student mentioned that formulating a method requires an initial base case, followed by recursion. During the Wednesday lecture, Professor Heap spoke about specific methods associated with linked lists; one of them was _contains_. This method simply checks whether a specific node exists in a linked list. This involves scanning through each node of the linked list. I understood this process and had no problems with the other methods, but recursion remains to be a challenge in some cases. Hopefully, more practice strengthens my ability to write recursive methods. 

Saturday, March 7, 2015

Entry 6: Recap of Week 7 & TA Strike

     This week, I learned more about the structure of Assignment 2, including the Minimax strategy, which I struggled since receiving the assignment. The bulk of this week's content was about Trees and the procedures used to search for a specific item within a tree. Professor Heap spoke about three searching methods: Inorder, preorder and postorder. Each of these methods all involve three steps, but these steps are arranged differently. For example, the procedure of the inorder method is the following: search in the left subtree recursively followed by a search in the node, followed by searching in the right subtree recursively. These three steps are performed in the other two methods, but ordered differently. In the postorder method, the current node is checked after recursively checking the left and right subtrees. Below is a visual representation of the three methods:


     In regards to the CUPE 3902 strike, I am worried that this strike might persist throughout the rest of the month, possibly into April. The cancellation of my tutorials seems like a welcoming affair, but the lack of teaching assistance is somewhat a problem for myself. I usually send emails to my teaching assistants regarding specific material about the course, but unfortunately, this cannot continue until the strike is over. Hopefully, the two sides of this strike unite and return to the bargaining table sooner rather than later.

Saturday, February 28, 2015

Entry 5: Object-Oriented Programming (Part 2)

     Last time, I discussed some basic information regarding OOP and how I became fond of the concept. Despite OOP being the most popular system of coding, it has its drawbacks (Keep in mind that these drawbacks are based on information collected from various sources, which will be included at the bottom of this post). First of all, OOP-based programs require more effort because they are more complex, thus, require more planning and preparation prior to coding. Secondly, OOP-based programs have more lines of code, which may lead to reduced application performance. I think these drawbacks are very minor because OOP-based programs require the collaboration of multiple programmers to successfully implement a program. As for the second drawback, this is virtually non-existent on today's systems because they are equipped components that trump the risk of reduced performance. From fast central processing units to solid state drives, all these components covert to a seamless experience, which is shown in the program.


     Recently, I read several blog posts of a few other students and I was surprised by the level of commonality regarding object-oriented programming. One of these posts was written by Alex Kuo and he too wrote about how classes are used to bring the system "together". Another post, written by Timothy Lock, wrote about the Turtle class and how Professor Heap used conventional OOP to use this class for various tasks. As I said in my last post, I already have experience in OOP, particularly with the Java programming language, but I believe I need more practice to become an expert. Hopefully, learning Python can enhance my ability to use OOP.


Saturday, February 14, 2015

Entry 4: Object-Oriented Programming Concepts

     I first encountered object-oriented programming back in high school. Specifically, in Grades 11 & 12, I learned Java and the basics of object-oriented programming. I was a little skeptical about the idea because I was unsure if there were any benefits (or drawbacks) to the idea. My first real encounter of programming was learning Visual Basic back in Grade 10. Essentially, learning that language was the reason I became interested in Computer Science because it was simple and straightforward. It took some time getting used to Java because the structure of developing a program was different compared to Visual Basic. So for the most part, I am familiar with the basic structure of object-oriented programming. 


A Cluster of OOP Languages


     OOP is composed of multiple objects, each containing its own set of data and functions. The advantage to this mode of programming is multiple objects can communicate to each other to perform a specific set of tasks. Visual Basic requires more effort because if an element requires changes, these changes must be made throughout the entire body of code. In my experience with Visual Basic, I created a program that simulates the card game "Black Jack" and it contained nearly 8000 lines of code. I say about 40% of the code was repetitive, which proves the efficiency of OOP. Another advantage to OOP over traditional programming is multiple instances of an object can be made by inheriting its definition. If I have multiple instances of an object and I wanted to modify a specific attribute, I can simply make the changes in its definition and these changes will apply to all the instances of that object. 

     As Professor Heap stated at the beginning of the semester, the most important virtue for first-year students is laziness and OOP perfectly fulfills this goal.