Sunday 29 March 2015

Week 11

I decided to revisit my Week 4 post, where I first talked about adjusting to CSC148 and tougher programming. In that post, I summarized that it was rather difficult for me to launch right into CSC148 after such a long break from my first programming course (CSC108). At that time, I had wanted the course to move more slowly, as I had not been well-adjusted to its upbeat tempo. Now, I see that we have covered lots of material, but am also confident that I have understood it well. I have come to enjoy the speed of the course - I am certain that this experience will help me to more quickly understand content in future courses and in the workplace.

Week 4's blogpost also was the first time I really worked with a partner in a computer science course. Even throughout the strike, my partner and I have continued to meet to go through the labs. I can second my earlier opinion on how beneficial it is to work with a partner. The discussion that we have is SO helpful! Particularly for recursion, where carefully stating what you want to achieve is the biggest step to writing the successful code. I can see that my partner likes working together as well - I am happy to see that my experience aligns with those of my classmates. Comparing to other slogs, I see the same idea as well. For example, fellow blogger (http://johnaxoncsc148.blogspot.ca/) dedicated a post to talking about how useful it was to have a partner, wisely mentioning how it allows for faster recognition of mistakes and creation of better solutions.

For the last assignment (A3), I am working with a partner. This is also quite a novel experience for me! I had been worried that I might miss out on some learning by splitting the assignment, but I do not think this has turned out to be the case. We are near finish, as we started well in advance. This is a great feeling!

Throughout the semester, topics that I found challenging have gradually begun to make more sense. Like another student says in their blog (http://kaileyslog148.blogspot.ca/), CSC108 was a very straightforward experience. CSC148 is more difficult, but it makes it clear how useful the material will be for us in the future. Knowing this has allowed me to make huge strides in my programming skills.

Next week will be my last blog post for CSC148. The year is ending! On a very positive note, the strike has ended as well.

Monday 23 March 2015

Week 10

Our final assignment has now been posted. This time, we are provided with options - (A) to build upon our previous assignment to improve efficiency, or (B) to investigate the space of game sequences. Both options surround the idea of finding repetition in the game states that are encountered, and looking to stored information rather than re-doing analysis. This contributes to faster speed. I am interested in looking at both of the options, as I do not want to miss out on any of the knowledge that I could gain. I would like to improve the speed of my minimax strategy using the suggestions/requirements in option A. However, option B looks easier to split between my partner and me. This is actually the first assignment this semester where I am working with a partner! Curious to see how our cooperation will add to my understanding of the material, and the success of our assignment.

It was great to see some comments on my slog recently! I am happy to see that others are reading it, and hopefully learning from it (or at least pondering some of the material I discuss).

Unfortunately, the strike has not ended. Another proposed settlement was voted on and rejected at the end of last week. The professors are clearly trying their best to keep the course running smoothly, with the limited TA help that they have, and this is very much appreciated.

Monday 16 March 2015

Week 9

The strike continues. This means we still are missing labs and a large portion of previously-available advice. I am trying to adapt, by agreeing to meet with my lab partner to go through the lab questions with discussion. Of course, we must be more independent now with the diminished help, but I think that the two of us can work hard together to ultimately find working solutions.

Last week was our term test, and we recently submitted our second assignment. It is difficult to predict what will be on the test, but I feel that the assignments and labs are very helpful in this regard (even though I still feel nervous while studying for the test). We are given opportunity to practice the skills that the professors wish to see us display on our test, so keeping up with the material is of utmost importance.

Recently, we have covered linked lists, trees, binary search trees, etc. If I remember correctly, our next assignment should be on raising the efficiency of our code. I am very excited for this, as testing my code for assignment 2 was very lengthy, with around 2 minutes run-time of Strategy Minimax for the first move in a 3x3 board!

Will give another update on the status of our class and my grasp of the material next week.

Sunday 8 March 2015

Week 8

The strike has really thrown off the feel of regularity and easily-available help. Weekly labs are a huge help to mastering the material and gaining familiarity with the concepts; without them, it is much more difficult to get organized and properly understand the lab assignment. Similarly for the assignment, it was certainly challenging to be missing the advice from our TAs. Hopefully everything will be back to normal soon.
This week in class, we covered linked lists. These can be thought of in two possible structures: (1) lists with an item and sublist, or (2) objects with a value and reference to similar objects. Our focus was on the latter view. As with stacks, we have access only to certain regions of our linked list - the front, back, and size. In order to add an item to the linked list, we need to make a reference from the now-second-last node to the now-last-node. It is interesting to think about the steps that need to be made to access information in the interior nodes. We can walk along the nodes starting from the front, seeing where each node's reference leads us until we reach our desired node or value, or lack thereof. Not too sure whether this topic will be on our upcoming test, but I will practice it anyway as I am sure it will come in useful at some point in the course.

I have been reading up on other SLOGS, and stumbled upon a post that made me wonder how well I really understood object oriented programming and abstract data types (ADTs) (http://thecodingdiaries.blogspot.ca/2015/02/week-9.html). It is mentioned here that abstract data types are "hazy concepts", a statement that I agree with entirely. An especially smart thought was that ADTs are general categories that do not contain specific information but rather contain groups that follow certain rules on how their data can be manipulated. Objects are instances of ADTs. Also mentioned in the post was what happens when trying to find the type of various types of ADTs and instances of classes or objects - I have never before analyzed this! In the future, I will always stop to consider how my coding relates to ADTs, how this affects the functionality of my code, and what it really means to be an abstract data type.

Sunday 1 March 2015

Week 7

I am choosing to talk about recursion this week, as I consider it a major point in my programming skills to date.
As I mentioned in an earlier post, tracing recursion by hand is a huge help! This helps me realize what the correct output should be, and helps me to check if the code that I write myself behaves as intended. The idea of recursion is to apply a function within itself, so as to compute complex statements that consist of smaller pieces that eventually trickle down to simple solutions. I found a great summary here: http://interactivepython.org/courselib/static/pythonds/Recursion/recursionsimple.html.
Recently, we have been implementing our own recursive code, particularly with trees. This always takes me some thinking - I guess I have not yet gotten fully accustomed to the idea of going inside the same function repeatedly! I find that it helps to draw out a tree and consider what must occur at each step in order to determine the ultimate output. In a way, this is like a pre-tracing of the recursion. It can be clearly seen that recursion is required, and if stated neatly, can be written into the appropriate recursive code without further trouble. The trick is to state the command as though speaking to some root's children in a tree - then, the message will be passed on until the leaves, which will consequently pass up a certain message. At each stage, some other action besides just asking the children may be performed (for example, add 1). The practice that we get in class and especially during lab is extremely helpful for mastering recursion.
It is quite incredible just how useful recursion is. It reminds me of a while loop, but for the entire function rather than for a small segment within a function. Before learning it, I never even considered how I might use it. Now that I have seen it so often, I cannot imagine how I could have written code before!