Saturday, 4 April 2015

Week 12: CSC148 Final Reflection

    So this course has finally come to an end after 4 months. I would like to take the time to thank the professors, Diane and Danny, my fellow students who helped answer questions so quickly on piazza, and finally, the TA's who did all the behind the scenes work and read through our code carefully. I would say that this course was great as an elective and I sometimes enjoyed it more than my core courses. When I first started this course I heard about how much harder it is than CSC108 and it definitely required more brainwork and effort than CSC108. However, I believe that at the end of the day, if you kept up with the course work and completed all the labs, you could do well. During these few months, we were able to master most of the Python language by covering concepts from Abstract Data types, Object-oriented programming, Linked Lists and most important of all, Recursion.



    I felt that learning the concept of recursion through first of all tracing it and then using Trees to write recursively was a smart idea. Trees helped us visualize how functions can be called again and again by themselves and come to an end when they reached a base case. I would say that out of all the concepts, I have mastered recursion and object oriented programming by now. Some of my weakest topics on the other hand would be sorting and tracing the run time relative to the size of an argument. All in all, I believe that the lessons were well taught however, unfortunately some of our learning opportunities were taken away due to the strike and we weren't able to completely understand the last few topics we learned in class. I hope that the final exam will include the material we learnt and not unexpected things.

Since I may not get any more electives in my specialist for the next 3 years, I doubt that I will get the chance to take another computer science course. I hope that anyone who wishes to pursue a career in comp sci gets the chance to do so and hopefully I too can remember the concepts I learnt in case I get a chance to take a programming course in the future. Thank you for reading my blog so far, it was definitely encouraging seeing how many people actually read my blog while I thought only the TA's did :)


if is_blog_end == True:
    print("Goodbye! May the odds be in our favour for the finals :D" )
else:
    RaiseError101("Sorry, but my blog has actually ended so please don't cry! :( You can always re-         read my old blogs! :)")


---------
On a side note, here are some other interesting blogs I found and commented on:

1

2

3

Do give them a read as you can tell they put in lots of effort and kept them updated! :)

Tuesday, 31 March 2015

Week 11: Revisiting My Past

For this week's SLOG topic, we are supposed to revisit one of our older posts and see how our views have changed or developed in some way. Today I will be revisiting my week 4 blog which was about my impression of the first weeks in class (this one). Looking back at my blog, I can see that the first few weeks were fairly easy for me and I seemed to be keeping up with my class. However, nowadays I have been falling behind and most of the times have trouble understanding the material, especially the new omega material. Most of the people in my class seem to have taken CSC165 before so for them the Big O and Omega terms are familiar. However, I am not sure as to how it will help us implement code for sorting or what its relation is to programming. To improve upon this, I might have to look over some Youtube videos to clearly understand what it stands for.



In my previous blog, I mentioned that the "truly fun and hard part of programming is finally starting to unfold". This prediction came true in many ways since the assignments kept getting harder but it was more tiring than fun trying to think of solutions for the harder functions. University load has definitely taken its toll on me because I have grown a white hair...or maybe its just because my aging process seems to speeding up. In my week 4 blog I said that the code I had been writing was simple and built upon the material we learnt before. By the end of this course, I can say that some of the code we had to write in CSC148 was not simple and we learned several new concepts such as Trees, BTNode and LinkedLists. Most of the course after the first term test focused on writing recursion in different ways and I must say that we did so much recursion that I kept seeing SubtractSquare Trees everywhere I went at one point. All in all, I felt that this course was eye opening and it helped me grow as a programmer in many ways. Compared to the old me who was just bored in class because she didn't feel challenged, I can say that the me now listens attentively during the lectures and definitely tries to think way outside her box for the assignments.






Thursday, 26 March 2015

Week 10: To be happy or not to be happy?

At last, the TA strike has ended. It was just announced an hour ago so I decided it was time to pick up my game and start writing my slogs again now that there is some hope of them being marked. I think however that I feel disappointed because our marking scheme for computer science, for which we were going to vote on Wednesday, may not be changed anymore. I am not sure how this will affect this course and other courses going ahead, but I hope that we can finally get all the help and support needed for assignment 3 and the final exam.



As for what we learned during week 10, Danny mostly talked about the solution to assignment 2's minimax and tippy apply_move algorithms. I was unable to follow through most of his explanation especially because I would have to look through all the classes as a whole to understand someone else's code and variables. So I personally did not find the solution review very helpful. After that we talked about how many test cases we need to be confident about our code functioning properly. We worked on a few test cases for Subtract Square and I felt confident about that topic after I got correct answers. At the end of the class, we discussed Assignment 3 and the two options we have for that. I think it was a great idea to give us an option to work on either A or B because my minimax was not implemented properly for assignment 2 so I am glad that I don't have to depend on my previous work for this. Hopefully, I will be able to do a lot better on this assignment because assignment 2 was a disaster. I plan on finishing this A3 early so that I have ample time to ask for help. Adios then, I have to start working on that grow method!



Monday, 23 March 2015

Week 9: Term Test 2~

Sorry for the late post, lately I have been considering whether these SLOGs may even be ever read since the strike does not seem like it will end soon. Although it might be good for our mark to remove some SLOGs from the marking scheme, I would be a little disappointed given how much time it takes me to write these blogs even though it may not seem like it. Back to our topic for today, during week 9 we were mostly busy with prepping for test 3 and did not have much time to learn new materials. I could feel the affects of the strike during the lecture as the professor, Danny, seemed to struggle with covering both the syllabus while trying to answer assignment and lab questions which would have other wise been answered during tutorials. For the monday lecture, we mostly discussed BTNodes and how to insert or delete data from the tree. I can't really reflect on this much because I felt that the methods we practised in class were very straight forward. However, after doing the lab for that week I realized that I seemed to struggle with deleting a node from a specific position and trying to understand what the docstring wants me to do. I believe that I need more practise but its hard to keep up with the course load as the term is coming to an end.



As for the term test, I felt that it was fair- not too hard and not too easy either. I cannot say at this point about how I performed because to be honest I am lost in most of my classes right now as to my performance in them. I hope that the tests and assignments are marked quickly so that we can get feedback before our exam so that I can decide which parts of course to focus on.


Sunday, 8 March 2015

Week 8: My Impressions of Week 7

I would say that week 7 was the transitionary week from reading week where we were still trying to adjust to our school's schedule again. It was a slow week where we mostly discussed Trees, recursion and tackling assignment 2. I am not doing a computer science major and am just taking this course as an elective because I used to enjoy programming.

However, I mostly feel lost ever since we started talking about the idea of Trees and writing recursive intensive methods. I am not sure as to how to think of a strategy when approaching recursion. Even though in the worksheets, the steps are broken into pieces such as think of a simple base case and write a general code for one of the nodes etc.

I would say this course requires a lot of dedication and time which I don't have a lot of because my top priorities are passing the three required courses for Rotman. I will definitely try my best to stay on top of my course work and ace test 2 like test 1 but from the way things stand at this point, it seems as impossible as the American Dream.


Week 7: Summary of Abstract Data Types

In the past few blogs, since I have already more or less summarized recursion and object oriented programming topics, I wanted to explore a new subject for this week's slog. Although I myself am still new to this topic, I will try my best to recap what I have learnt so far about abstract data types.

Before I begin, when you first hear the term "abstract data types", what do you think it represents? A cryptic piece of code that is so clouded in mystery that we can only try to fantasize about it in our heads? I know that that was first thing I thought of when I first heard this term. In reality, abstract data type is a lot simpler than recursion which is as abstract as it can get.

From my understanding of abstract data types, there is a parent class and a child class. The parent class is a generic abstract class which cannot be used to achieve anything on its own. However, when used with the child class, the child class inherits the parent's general attributes and methods which can be used to perform a function. Moreover, you can add new methods to the child class which are specific only for that class. For instance, when we created the game state class for assignment 1, it needed a specific game to work with it. The subtract square state class inherited its parent class (GameState) and was then able to use its attributes such as next_player, over and even instructions which were modified for subtract square. We even added a new method called is_pos_square() which was game specific.

In summary, I believe that abstract data types are a vey useful tool especially when creating games or for anything that needs a general template which then can be used for specific purposes without having to be redundant and repeating our code. I am more comfortable with ADT than recursion because it is not as intangible of a topic as recursion where I have to spend hours just thinking about how it works. Thus, I hope that in the next few lectures we have left, we can focus more on understanding recursion and Trees.


Monday, 16 February 2015

Week 6: Object-Oriented Programming

***Use this for week 7's summary of OOP***

According to wikipedia, Object-oriented programming(OOP) is a "programming paradigm based on the concept of 'objects', which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods." Object-oriented programming is a deep concept that is hard to explain in just a few sentences. Even after my 2 years of experience with programming, OOP is still a confusing topic to grasp. From what I understand so far, a method is a like a function except that it starts with a class parameter, often called self. A class is like a library which contains different kinds of method to that work together to perform a function that the user wants. 


OOP is a very helpful concept in programming, especially when creating games or client code because we can use inheritance or polymorphism to make code from different classes together.
 
Generally, I can use these concepts to write code but sometime's its hard keeping track of how to access methods from classes that are not the main class. Moreover, this week's lab 5 was difficult for me because I was not sure how Tree.py works. We were given many recursive methods that we were supposed to write but since I didn't even understand how the Tree class divides up the children and groups it into nodes, I was not able to write any of functions. It would have been nice if it was more elaborated upon how descendents_from_list(t, L, arity) grouped nodes during our lecture so that I could do a better job on my lab. I hope that this misunderstanding can be cleared up in the next few lectures after reading week.



Sunday, 8 February 2015

Week 5: Impressions of Tracing Recursion

As discussed in my earlier post, I didn't really have much of a first impression on recursion because I had already been introduced to this topic in high school. However,  I will discuss my thoughts about the way we learned recursion in class and how it further developed my understanding about recursion. To start off, we were introduced to the idea of recursion through small steps because it can be a rather confusing topic to explain. We first learnt about tracing through simple exercises which asked us to identify the output we would get given a certain argument for a recursive function. In my opinion, tracing was not too tricky until we reached the point where there were several nested lists. I remember having to literally write out each step on paper to actually be able to visualize the steps.

The next part was then to actually understand what was going on with the function itself. For instance, in lab 4, we were given a mystery function with no docstring and we had to fill out the function description, examples and return type ourselves. For me, this part took a little longer than tracing because I had to analyze every line and think about various situations where there could be an error. Moreover, since the beginning in CSC108, I have had trouble figuring out which examples to use for my examples in my docstrings and unittests. No matter how many times I read through the slide about what to look for when writing examples, I somehow still seem to struggle with that part. Hopefully by the end of CSC148, I can overcome this challenge and be master at choosing test cases / examples for docstrings.

The last step in fully understanding recursion was none other than having to write code in recursion ourself. Based on the recursive functions I have written by myself so far,  I would say that it hasn't been too hard. Unlike high school, the explanation of what to expect in our recursive function was very clear and concise. If you just follow the explanation, its very easy to figure out the base case and the recursive case. Hopefully, it stays this way in the future or else I will be spending hours trying to figure out how to write a recursive function like in high school.


Tuesday, 3 February 2015

Week 4: Impression of the first few weeks

Having just finished CSC108 a month ago, my transition to CSC148 seemed easier because the materials learned in 108 were still fresh in my mind. In CSC148,  the instructor picks right off from where we finished and introduces us to concepts beyond just loops, if statements and Docstrings. We are finally shown the true applications of programming; to write code that can help simplify everyday tasks. I had been waiting for this moment because having come from a java background, I had experience with writing client code and creating games with graphics. I still remember the excitement of our class when the instructor first drew a turtle on the screen with just a lines of code. It seems that the truly fun (and hard) part of programming is finally starting to unfold.


After having perfected our basics in CSC108, CSC148 puts together all that we learned and forces us to think outside the box. Recursion, for instance, is another way to write code efficiently and reduce the run time of a program. Although I had learned recursion before in java, after listening to the instructors explanation and tracing it, I now see recursion in a new light. Before this, I strongly disliked having to write code in recursive methods because it seemed so complicated to think about where to start and what the base statement should be. But now, I think I am finally beginning to understand the thought process one should go through to write recursive methods. So far, my first few weeks in CSC148 seem to be just about building upon the ideas I have learnt before and applying them to write some simple but time consuming code. The real hard part will start after our first term test- writing code in recursion.


Thursday, 22 January 2015

Week 3: Why Geeks Should Write

When you think about computer scientists, the first thing that pops up into your mind might be geeks programming in java all day long on their advanced gaming Lenovo laptops. Now it must be a given that these geeks must probably be pretty good at math and sciences, right? But what about English, which is generally a humanities subject and seemingly unrelated to Computer Science? Chances are, we computer scientists are probably not that great at writing or just English in general (if you are, then kudos to you because writing SLOGS probably comes naturally to you). I know that I was terrible in English no matter how hard I tried, I just could never grasp the importance of using metaphors and alliterations to grab the readers attention. Because lets be honest here; no matter how many literary devices Shakespeare uses, most of us would probably never read his plays if we weren't forced to in high school.

Now at this point you are probably confused as to why on earth my topic is titled 'Why Geeks Should Write' if I believe that writing is probably not the strongest asset of a programmer. To be frank; because computer scientists are not good at writing and expressing their thoughts in words, they should write more so that their writing skills can improve! I am a strong believer in the philosophy of 'practice-makes-perfect'. So while practise may not make you perfect at writing because we all have strengths and weaknesses, if you are able to improve your weakness then thats much more valuable than a person with amazing strengths but big shortcomings.

What might be some advantages of geeks writing? The advantages are endless! Writing is used in everyday life whether you are a student, a worker in your forties or even retired. To get a good job, no matter how many programming languages you might know, it all comes down to whether you can woo the employers with your writing skills on that cover letter for Google. Moral of the story: writing is good for geeks even though we may hate it, so get going and start working on those metaphors you think of when walking to CSC148 on College Street!