Monday, 6 April 2015

Final Impressions

Well here we are... the end of the course is upon us which means this may be my last post ever. All that is left is the exam at the end of April. In this final week we spoke about efficiency and big O in lectures. It was surprisingly interesting and I actually really enjoyed it. Although it may have been useful to know how efficiency worked earlier in the semester, given how many algorithms we have made, better late than never. Overall the course has met my expectations; it has been intellectually stimulating and I am satisfied with having taken it. It definitely enhanced my understanding of Python as well as many different new concepts such as abstract data types and recursion. Speaking of recursion, it has been a common topic but recursion was definitely the most difficult thing I learned in this course all year and it really did take until the end of the semester for me to really get the hang of it. Other than that most things in the course have been relatively straightforward. It would have been nice to have the other lab sessions that were cancelled due to the strike but it probably won't be detrimental. Personally I don't think it is fair that the entire quiz mark is based upon the first couple of quizzes. Even though this decision won't hinder me, I think the professors should be giving students the benefit of the doubt and awarding perfect for all the lost quizzes, as opposed to just increasing the waiting of past ones.

Overall the course has been very good. I believe the tests were fair and the assignments were decent. I enjoyed having both options on assignment 3, especially since I was not satisfied with my MiniMax code. The course was very helpful in my learning of Python and although I am not a computer science student, I will continue to use Python even after this course is finished. I appreciate all the hard work of the TAs and Professors, both of which I would like to thank for continually helping us students. For the foreseeable future, I am signing off---.

Monday, 30 March 2015

It's Throwback Time

So apparently the instructions for this week's slog is to look back at one of my earlier postings and see if I agree with myself, and for bonus points, compare with other students. I decided to compare with my second blog post "Thoughts on the first few weeks of class" which was posted February 1st. I should say immediately that the concept of agreeing or disagreeing with my past self is kind of flawed. My posts aren't really based on a controversial issue or anything, they are mainly just reflections of the past week(s). I suppose I will just discuss my current opinion on some of the things that I had brought up in my past post.

To address my comment on the course difficulty, I would still agree that the course is easy however I would also add now that it has become a lot more boring. I am not sure why there is such a heavy focus on recursion despite it being so boring. I enjoy computer science but I have a hard time staying awake when the first lesson of the day begins with "Let's talk about recursive calls on a tree!"... As sort of a progress update, the class size has shrunk dramatically as expected; it really has no effect on learning unless a sudden bell curve is implemented, then it becomes survival of the fittest.

With regards to professor performance, they continue to do an excellent job however the redundant questions posed by other students have intensified and I sometimes sit in disbelief as to how these questions have even been asked. Nonetheless the professors answer them all and for that I salute them. As it happens the final comments from my previous slog have been proven false. We have done quite a bit more than just generic Python syntax so I disagree with myself there, but in terms of examples, we continue to focus on examples with little to no merit.

Lastly I am going to compare my experience with classmates. After reading some other people's slogs it seems like a popular topic was recursion. A lot of people seem to have had trouble with it (like myself) so it is interesting to see how people react now. Most people have said that they are more confident with recursion now then before I think that there are probably still plenty of people that are having trouble. I mean, if it wasn't a prevalent topic then there would be a lot less people talking and writing about it. In other news, the TAs are back in full force just in time for the end of the school year. I'm glad to see the situation resolved and I will forever cherish my scrapbook of CUPE flyers that I have accumulated over the past month. In all seriousness, the school was a mess without the TAs so thank you for returning!


Monday, 23 March 2015

Week 9 Impressions

Week 9, like one of the weeks before it, was a test week. That is, one of the lecture times was taken up by test # 2. Really not a lot happened during week 8 so I guess I should start with the test. The test was made up of only a few questions but I expected it to be much more difficult than it actually turned out to be. The sheet that I brought into the test was completely full of 8pt font on both sides, yet I only actually referred to the sheet once. Essentially what I am saying is that the questions were not very complex or in depth; both the recursion question and the linked list question were very straightforward. Compared to some of the lab questions these were nothing, but again, it could have been harder. This was probably done so that people would be able to finish the test in the short 50 minutes that were allocated to write it. I assume other people found it easy as well since many people, including myself, had already left before the end of the test. I hope this doesn't turn out to be one of those scenarios where you only think something is easy because you did it wrong....

With the test taking up one lecture, the only actual class time was on Monday. In a nutshell, Monday just continued with the binary search trees. However in reality, 65% of the class was used to answer questions while 20% was going over some of the code from the previous week's lecture. Safe to say not a very efficient allocation of 'lecture' time, but whatever; at the end of the day regardless if the material is taught or not, passing grades will still be awarded. In other news, we continue to receive paper worksheets despite this being a computer science class and there is still a strike going on. Most people are saying that it may last for a long time. I'm sure the provost's inbox has over 9000 emails in it (congrats if you get that reference), but it doesn't seem the university wants to budge. Either way I shall continue to observe from a neutral standpoint and update the war journal on the next SLOG.

Sunday, 15 March 2015

Week 8 Impressions

So in week 8 we again focused on recursion and its various flavours. I suppose it is a 'step up' from the trees that we were doing a little while ago. Anyways, the class was first introduced to linked lists and then later in the week binary trees/ binary search trees; the latter two being very similar. So far I don't see a need for any of these 'abstract data types' but I suppose there are performance enhancements rather than just using regular data types. Depending on how material these benefits were, I might consider just using a regular list as it is significantly less work but those sorts of technical aspects have not been discussed. Speaking of lists, we were also introduced to the __contains__ method in Python that allows you to overwrite what the 'in' keyword will do (not limited to lists), among other things. So far only a handful of these inherited methods have been revealed and I for one would like to know how else the Python keywords can be manipulated. Assignment 2 was also due this past week and I was fine with everything except for the MiniMax strategy. At first (essentially until 9:30pm on the due date) I was having significant problems with NoneType magically appearing everywhere. The problem turned out to be a combination of a few things: firstly, my game_state had a mutable type in it that was also set as a default value in the constructor. This didn't initially seem bad until I started debugging. What was happening was that MiniMax would use the game state and this mutable type to determine what its move should be, but the game state that MiniMax was modifying and testing on remained the exact same game state that my game_view would use. Essentially MiniMax would leave the state in complete disarray in order to determine its move, so when the game view attempted to use apply_move, there were no more possible moves left in the state, so None would always be returned. After hours of pain, suffering, and 2 different debuggers, I finally managed to fix the problem right before the deadline...

According to some in-class discussion assignment 3 is supposedly going to have something to do with chess. It is quite coincidental because I am actually in the midst of creating a chess game in Java on my spare time, however I assume assignment 3 will be text based (I can only imagine the pain of trying to play a text-based chess game). At this point I am still not 100% confident about my abilities with recursion but hopefully it will become more clear by the next test. Lastly as part of this 'impressions' post, i'm sure everyone is aware of the current strike action. Sure it is inconvenient for everyone, but the TAs can't just stand by like slaves to the university plus there really isn't any other action they can take that would send a big enough message. So although I am upset that the strike had to even happen in the first place, I can't necessarily blame the TAs. I think the university administration needs to get their act together if they want to retain the title of "Top university in Canada".

Monday, 9 March 2015

Impressions of Week 7

Week 7 was a pretty normal week; we had normal class without any major issues to report. Assignment 2 is due next week and so far I have only barely started working on it... Nonetheless hopefully I don't have any problems with it as I am still 'on the fence' with recursion. Speaking of assignment 2, part of the lecture this week was going over some problems people were having with the assignment as well as some more information about MiniMax and trees. Pretty much all of Monday's class was dedicated to discussing assignment 2 and its misconceptions but I thought it was useful. As a side-note I learned a few other things: 1) MiniMax is also known as 'NegaMax', 2) Wikipedia has terrible articles on both.... In addition, some light was shed on the rough outcome function, which to me seems like an oxymoron since a computer doesn't do things 'roughly', but I digress. It really is counterintuitive to me because it was explained that using ONLY the current game state rough outcome should be able to predict who is winning, yet even a basic test such as finding out if a player is one move away from winning, would result in a new gamestate being used. The professors said it wasn't imperatively important but we shall see how it gets marked.

Other than the assignment we expanded our original tree definition to create what is called a 'Binary Tree' or BT. It is essentially a tree but each node can have at max only two children (or branches I suppose). Our examples included some strange arithmetic sequence using trees as well as many different functions to manipulate and traverse these tree hybrids. Mainly it was the methods that determine in which order to visit the nodes. Later 'Binary Search Trees' were introduced which essentially expand on the idea of sorted list searching from CSC108. It is just a tree of numbers but all numbers to the left (child) of a node are less than that node, while vice versa to the right child. The real advantage of this BST is that the height is logarithmic in nature and so it is much quicker to search for a number than say a linked list. For the record, nobody has mentioned whether or not it is faster than a sorted regular list.

Monday, 2 March 2015

Week 7

Please see my post on object oriented programming for marking this week.

Sunday, 15 February 2015

Object Oriented What?

From the standpoint of a non-programmer or even a beginner programmer, the concept of objects and inheritance is by far one of the most confusing things to understand in computer science. We were all there at one point; we all had our struggles with objects and what they were even used for. Personally, I struggled with the entire concept of instances of objects and how they were completely separate from one another, or even how all these methods and attributes worked together. I remember my high school computer science teacher explaining how Windows essentially started the OO (object oriented) revolution, and how "every window you see on your computer looks the same because it inherits from the 'cosmic super-class'". Although most people at the time did not understand what he was talking about, that single statement really does sum up OO programming. Essentially the vague term 'object' is just a way of representing some code that is being re-used, and is basically just a synonym for 'block of code'. Of course there are some rules about what qualifies something as on object, but that is the general idea behind it. The confusing part is when you are first told that you can have as many objects as you want and that they are all independent from each other, despite using the exact same code. Then of course there is the usual bombardment of language where every object is an instance of the original code (i.e. it is an identical copy), which through the process of instantiation gets added to a stack and.........

Basically things are made unnecessarily ambiguous and too many rules are thrown at people right out of the gate. Although I would argue that Python is the easiest OO programming language to learn, it still has its fair share of difficulties. To correct some of the other students' SLOGS, HTML and CSS are not object oriented languages because they are not object based; they are markup languages and you cannot create objects in them. Python with its essentially 'wild-west' book of rules makes it incredibly easy to create and manipulate objects (in comparison to a language like Java or C++ where rules are very strictly defined). In Python you can randomly add methods to your objects after they have been executed, you can modify any variable you can get your hands on etc., but at the end of the day, Python is still a very solid and very capable language to program in. OO programming is one of the most useful pieces of programming we have at our disposal and it is essentially what computers are built upon. Lectures have been useful in showing us how Python deals with inheritance and there has been plenty of examples to show how it is used. For a programmer, inheritance really is the greatest thing since sliced bread as it allows us to only write code once but reuse it countless times. It is really useful and the professors are very good and clearing up this initially confusing topic. We've had lots of practice with OO programming so far, and I bet it is here to stay.


Sunday, 8 February 2015

Recursion(Recursion(Recursion()))

So in week 4 I was first introduced to the concept of recursion using Python. Although I have heard about recursion in the past, I did not really know much about how it worked until now (the only thing I used it for before was factorials). It seems like recursion is somewhat important to know however so far I haven't really seen the need for it. Everything we did in class so far could easily have been done without recursion, and I am not actually sure what it is really used for. Regardless, the concept was not difficult to grasp and it makes you think about what other sorts of 'tricks' computers can be programmed to do.

I found that tracing the recursion on paper made understanding what was going on easier than just being told what was happening. Using the method of tracing that was taught in lecture like a type of rulebook, even the most complicated examples could easily be traced and understood. Although, I still find it odd that every recursive function we made did a list comprehension, despite this not being a requirement whatsoever. In addition, I personally found it a bit confusing when we were told to replace "identical calls" instead of tracing. I was never sure at which point to replace the recursive call, so I had a big inconsistency there. Overall it was relatively straight forward, but again like my last post, I wish we could have done some better examples/questions. Maybe analyzing very large recursive call run-times (10 000+ calls?), or even seeing practical applications for them. Lastly, I never seem to understand why in a computer science class students would be expected to trace code by hand. It honestly baffles me as to why paper even enters that lecture room. Considering that computer science may or may not having something to do with digital machines, it would make too much sense to do the tracing using a computer. It could be that students are not expected to bring computers to school, but then one could have been mentioned for those that do.

Sunday, 1 February 2015

Thoughts on the first few weeks of class

At almost 4 weeks into the course, 1 assignment done, and a test coming up, I think I have enough experience to talk about my feelings towards CSC148 so far. Before I start I should add the disclaimer that I have taken computer science multiple times before this course, which as a result may lead to a bias in some of my opinions.

I suppose a good place to start would be with regards to course difficulty. In all honesty, I do think the course is too easy. Maybe it will get more difficult, but from what I have experienced so far the class seems to be moving at too slow of a pace. Assignment 1 really could have been done without having attended the first few weeks of class and so far really only 2.5 topics have been discussed. Personally I could take a significantly higher level of difficulty (and i'm sure many other people with prior experience could as well), but maybe this is how the course is supposed to be. To be clear, i'm not complaining; more-so just commenting. As a side note, I find it rather surprising how full the lectures are. In CSC108 a very large portion of the class either dropped or stopped showing up by the third week but so far it seems that in this class perseverance has taken a front seat.

When I talk about how things are seemingly too easy so far, please understand that I am in no way insinuating that the professors are inexperienced or incapable; on the contrary, the professors seem very intelligent and very patient. Especially with regards to in-lecture questions, there is a positive atmosphere for people to ask questions and the professors always provide knowledgeable responses. In my opinion, some students ask redundant questions and at times it seems that half of the 50 minute lecture is spent answering them, but at the end of the day people are entitled to ask questions.

Finally I would wish that instead of (seemingly) always learning about the Python syntax (which students are already expected to know anyways) it would be nice if the lectures could teach about more advanced topics but using Python integration. Although a virtual turtle is interesting for a full 2 minutes and 17 seconds, I personally think if people were more interested in the examples they would work harder. Maybe that is just me, but in CSC108 we spent about 10 minutes examining some Python code based on the Collatz Conjecture and I thought it was very interesting. There are plenty of practical examples that could be used that would still fit in nicely with the material such as networking, encryption (ciphers for starters), basic game development etc. I enjoyed making the game for Assignment 1 much more than calculating the area of a triangle like one of the lecture examples, but I digress...

Saturday, 24 January 2015

Why 'geeks' need to know how to write

Arguably one of the most important attributes for any person to possess is the ability to communicate effectively. It becomes even more apparent how important communication is when one examines its reach; almost every single thing we currently do or have ever done is based on communication. Unfortunately, not everything we humans want to express can simply be depicted verbally. Sometimes we need a way to express ourselves in an objective, unambiguous way so that we can clearly share our ideas with anyone. This would be where writing comes in.

Although some may see it as an archaic trait that simply will not die, writing really is the most practical alternative to verbal communications. Now with the advancement of the Internet, and the exponential adoption of texting as a means of communicating, writing has become more prevalent than ever. Computer science in particular is inherently individual; although there are plenty of opportunities to coordinate in teams, most work is done alone. Despite these individual performances, written communication is monumentally important for a handful of reasons. For one thing, due to the worldwide scope of the internet, many 'geeks' often work on projects with people all over the world, with communication being primarily written. One of the many advantages to this is that information and experienced insights are essentially permanently engraved. With the invention of online forums, discussion boards, and blogs, many 'geeks' can write about their work and discuss various topics relating to computer science. Effective writing becomes especially important here because one person's writing may be seen by hundreds of people, all with varying levels of experience and backgrounds. An effective writer should be able to fully express their ideas whilst including all of the necessary background information so that years later another person would still be able to understand what the writer intended. Clear writing however is not limited only to online forums; arguably one of the most important parts of computer science is documentation. Without clear documentation how could anyone make their code or systems available for others to build off of? Without clear documentation, progress in the field of computer science would be severely degraded as individuals would be forced to trace code line by line, instead of just understanding how it worked. Effective documentation can really only be created by a person intimately familiar with the code, so it isnt't like a 'geek' could hire a professional writer on their behalf. 'Geeks' need to be both comfortable and competent writers in order to successfully convey their thoughts with other people and extend the usability of their work. Knowing how to write is a powerful asset to anyone, but in a world where all technology seems to be interconnected the ability to clearly and concisely write computer science or any of its related fields is an indispensable trait.