Monday, 6 April 2015

Week 12

The topic assigned for this week is quite similar to what I wrote about last week - looking back over the course, considering any obstacles and successes. For more insight into how others' experiences differed from mine, I looked through some other slogs. This also helped provide some inspiration for my slog.

A classmate said in their slog (http://2015-csc148.blogspot.ca/) said it was not too difficult to learn a new language, particularly with prior experience in Java. I have never learned any programming languages besides Python, but I know that this would be an integral part of my career. More and more jobs are using computers, and each job uses their computer language of preference. To fit well into a workplace, it is quite necessary to be able to adapt well. This includes familiarity with multiple languages, and not fearing the idea of learning more. I hope that in future years at the University of Toronto, I will be exposed to more languages. I also plan to pursue my own learning of computer languages, perhaps as early as this summer.

To sum up the material from our last week, we covered big-oh for efficiency, and some more on abstract data types. Last semester in CSC165, I was introduced to big-oh and related concepts, so the idea was not too difficult for me in this class. I am realizing that efficiency is a huge part of coding. Not only must a program be able to perform the desired operation(s), but it must be able to do so as fast as possible. Now when I write code, I try to consider whether or not there is an alternative approach that would be faster.

Overall, the course has been quite rewarding. Lots of material was presented, but adequate practice was provided, so the course was not overwhelming for me. Assignments were tricky at some points. Pondering over possible solutions (especially with a partner) is exactly what will need to be done in future courses and in the workplace. I am happy that I could have such a great introduction to computer science. I will no doubt pursue it further!

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!

Tuesday, 17 February 2015

Week 6

Apologies for the late post! Reading week has begun quite busily and I did not get a chance to post until now.
Object-oriented programming now feels quite intuitive, as we have had a fair bit of practice already. Whenever we need a "thing" in our program, we create a class and an instance of that class that has all of the traits and abilities that we want for our "thing." So far, we have been told to include str, repr, init, and eq methods for any class we create, though I am not too certain why this is necessary. Danny, our professor, says that it is good etiquette to include such methods in a class, but sometimes it seems rather unnecessary. If programmers are "lazy," as Danny says, why should we include methods that are not of use to our program? This seems like an invalidated use of space. Another point I am not too clear on is what we want the output of our repr method to be - this seems like an alternate form of str, which is automatically used when no str method is present. To my knowledge, we could make the repr method output be whatever we wanted, as a representation of the object in a particular class. On my assignment, however, a note was that the repr should return something that can be pasted into the shell and have it create the specified object. I do not remember ever having learned this, nor having seen it in any examples. I would prefer to know in advance so that I do not make a similar mistake in any future assignments or in the rest of my career.