Thursday, 27 February 2014

Week 7:

Hello everybody, 

           I hope everybody had a great reading week! This week we learned about linked lists. I thought they were unnecessary, because why couldn't we just use trees? The linked list looked like a tree with the root being the value, and the child being the rest of list (subtree). It wasn't until after this week's lab that I realized how useful they are for storing data. The recursive iteration through the linked lists made it really efficient which I found out after we remade the queue class with the linked list instead of the list data structure. The enqueue times with linked lists were much faster and better than with the normal lists. However, I wonder what other good uses there are of linked lists...? 
          As for Assignment 2, when first looking at the instructions, I was really confused. I had no idea of exactly what the goal of the assignment was. However, after reading the lecture slides a few times over I realized how simple it was implement regex tree program. Recursion was very important in making the trees. Once I found out how to implement each root node, then call them recursively, and accordingly, each regex tree just built its self. 
      I really enjoy the assignments in this course, because they really force us to understand the material taught in the course. 

Friday, 14 February 2014

Week Six: Trees

Welcome back,

           
         I hope everybody was very happy that reading week had officially began (I know I was). The topic in lectures this week, Trees was very interesting. This data structure was of a new type, something we never seen before. Trees organize data in a non linear fashion, unlike lists and stacks, trees are organized with respect to the hierarchy of the data. Every tree has one root node, and children belonging to that root. These children can either be subtrees - another tree with lower hierarchy than the root node - or a leaf node - node with no children. 

        Dan mentioned that trees were similar to the structure of a HTML document, and since a friend of mine has been learning HTML lately, I checked for myself. I thought it was pretty cool when I confirmed it myself. My buddy showed and discussed how the HTML document was organized with respect to the importance of the data in the document. Furthermore, we could relate trees to dictionaries, whereby each root of the tree is a key in a dictionary and the subtrees are values in the dictionary, which are also dictionaries. However you can see this would get messy because there can only be one reference to a specific key in a dictionary. Thus, that right there is what makes trees unique. 



Tuesday, 11 February 2014

Week Five ("Week No Sleep")

Hello again,
        It's already week five of the Spring term in 2014, and consequently, it's feeling like the fifth week of our Spring term of 2014. The weather is brutal and the mid term season is even worse, and I doubt I'm the only one feeling the wraith of this time of the year. However, on the bright side we do have reading week approaching us, which will be a nice time to relax and not worry about class for a while. Furthermore, Dan's decision to push the due date for Assignment 1 back another week, is giving me a great opportunity to perceiver through the assignment on the break so that perfection can be accomplished.
         Moreover, speaking of the Assignment 1, I started it this weekend (thinking it was due on February the 13th) and so far I think its coming out great! It took me a long time to start the assignment because I was having a hard time trying to understand how all the methods were going to be used by ConsoleController and GUIController. With that, I couldn't decide if the "cheeses" on the stools were better off an Int object or a Cheese object. However, after about an hour I got myself and my thoughts together and started typing. From there the assignment went pretty well. I didn't run into any troubles (lucky), so testing went well , thus leading me to a near completion. I still have a bit more implementation to do, about 10% left, plus tweaking design and style to finish it up. I'm going to finish up the assignment during the break, because unfortunately many of use have a nasty 20% Linear Algebra midterm on Friday. I guess w'll see how that goes, but non the less good luck on Assignment 1 and for some, on the Linear Algebra Test!

Sunday, 2 February 2014

Week 4 Review

My fellow programmers,
    Welcome back for the latest week's review in CSC148. The major topic in class this week was Recursion. Recursion is the process whereby a complex problem is solved by breaking the problem down into simpler problems, until a base case is reached. Solving the base case allows us to reconstruct all the solved subproblems, to finally solve the bigger problem, initially presented. From the definition of recursion you can already notice that it seems like a great tool to use to solve a lot of complex problems.
    When Dan first started lecturing about recursion I was shocked that we never learned about this in CSC108, because seriously, I feel like this could have been a great way to think through a lot of the problems we faced last term. However, as I pondered about the clever algorithm I realized that I have been using it for a long time, but on a broader scale. Recursion is a great tool when solving problems involving critical thinking, because when put in a unfamiliar situation we must relate the big picture of the problem to smaller, more familiar problems. After solving these simple, and familiar problems, we can put their solutions together to finally solve the original problem that was presented to us.
    Anyways, going back to CSC148, I'm facing a problem understanding a minor detail of recursion. I don't understand how we could call a function within the implantation of that particular function. It seems like this is very important when solving problems using recursion, as we design a function to handle a complex problem by calling it within its self to handle the base case of that problem. I thought this whole time that a function couldn't be called until the function definition was complete. However,  hopefully after using recursion more often I'll be able to fully understand how this type of code is compiled, thus I'm excited to use recursion in next week's lab and when solving other computer programming problems.

Friday, 31 January 2014

Week 3 Welcoming

Hello World!
      Welcome to the cyber version of my thoughts, primarily focused on my feelings of and experience with CSC148. The first few weeks of the course showed great potential of what this semester has in store. Like Dan mentioned in lecture about the thoughts of past students, it seems like by the end of the course I'll feel much more confident with my knowledge of the computer sciences and programming skills. Despite CSC108 being very introductory, I thought that CSC148 would be very challenging considering I didn't have any programming experience prior to September. However, the past few weeks have made me change my mind.
     
       The jump start of the  course was nothing short from great. The introduction to object oriented programming, stacks and exceptions was well done by Dan. It seems now instead of learning how to speak a new language, instead we are now learning how to write a story or an essay. Which is much more exciting and useful. The concept of OOP, seems like python would be useful for designing programs centred around user control, such as computer games or text editors. I say this because the user control the objects and customize it through the program's implementation of the object's (noun) attributes and method's. The use of stacks, an abstract data type in the program also seems very reasonable for saving progress or storing data whereby it can be easily accessed and accessed in last in first out order. Furthermore, I really enjoyed learning about exceptions. I'm glad we can finally implement a program that could potentially accept an error without crashing. I bet these exceptions are going to be implemented into plenty of our designs this course or even on our own, so runtime errors can occur without our program terminating. Considering this all, its understandable how our first assignment of the course is to implement the simple 'Towers of Anne Hoy Game'. I'm really excited to get started on this assignment, I think its going to be a lot of fun!