Monday, 25 March 2013

Focus Shift

After big O proof questions, the focus of course shifted from math oriented to programming oriented. We started to learn to determine whether a piece of code would halt or not and I found that pretty hard. Since the code will be in paper in the exam or assignment, we have to use our own imagination instead of debugger and it's quite abstract. I let the program run in my head and count the number of steps and often end up forgetting where I was and restart it again. Guess I will try to keep track of steps in paper.
Additionally, I have learned python for almost a year, but I still don't have a profound understanding. For example, Prof.Heap mentioned what would happen if we write a def inside of a def; also, what about a parameter of a function is the function itself? I couldn't answer those questions because I never even think about it. The way I learn programming is to copy what professors did in lecture. So for some algorithms, if they never show me, I won't think about it at all. Apparently, copying is not the proper way to study computer science. Since things in real life change very fast, only using the algorithm that was shown in lectures would certainly prevent me from being creative.

Monday, 11 March 2013

Comment on Comments

Although a2 reached deadline, the argument within our group members just started. We couldn't come to an agreement on where a comment should be provided. We have different opinions on what should be called 'obvious'. Apparently, that's really subjective.
For example,
x > y
Then 2x > 2y
Is it obvious? For me, it's too obvious.
Also, in terms of the proof structure. Such as
Assume x in N
Do we need a comment for that saying 'to introduce for all'? I don't think so since the intended audience should equip that kind of knowledge, otherwise, we should also comment on the indentation of the proof structure because not everyone would find it obvious.
My partner said he was copying the comments on the slides and prof wrote them for every proof. But I think that's because he was introducing proof to all new learners not experienced scholars and my TA didn't write structure comments in tutorial.
Yes, we might solve the conflict by adding comments on every single line. But that's really annoying and ruin the whole style and format (since sometimes we need to start a new line for comment) and also that's ineffective for both readers and writers.
That really bothers me.  

Tuesday, 5 March 2013

Last Question of Assignment 2

For the last problem of A2, we have to prove if m >= n, then gcd(m,n) = gcd(n, m-n). I got stuck at first until being inspired by the project of CSC148.

For CSC148, we wrote bunch of methods such as __less_equal__(self, s2), and __equal__(self, s2). For __equal__, the comment says we can just use __less_equal__ by saying (self <= s2 and s2 <= self). That's smart and tricky then I realized a = b is equivalent to  a<= b and b <= a.
Based on what I found above, instead of proving the equation directly, which I found impossible, I can prove it indirectly by proving gcd(m,n) >= gcd(n, m-n) and gcd(m,n) <= gcd(n, m-n).
Here are the steps. Hope that make sense.


 

Sunday, 3 March 2013

Feedback on other Slogers

Recently I start to read other slogers posts and they are quite insightful in terms of how they are organized, what slogers think of the course and its content as well as the slogers' passion shown by words.

Here are some impressive ones I digged out.

http://165uoft.blogspot.ca/
Patrick is a passionate sloger whose posts mainly based on feedback of the course. Sometimes, I am getting used to university daily life and start to pay less attention to new knowledge or experience. Anxiety forces me to finish things as fast as possible and only look at the marks instead of knowledge, which makes university experience pointless. Having read Patrick's posts, I realized we sometimes feel things in the same way, but he is the one who has passion to type that down and keep optimistic attitude all the time.

http://captainslog165.wordpress.com/
Captain's Log is also impressive in terms of the amount of posts and the length of each post as well as it's organization.(I will definitely start to categorize my posts.) He builds connections with other courses such as CSC148 or even physics. They are quite insightful and the difficulty he had on proof is exactly the same with mine -- sometimes you lose marks for those steps that are too obvious to notice.

To be honest, I am not that into SLOG, and I often find it hard to keep posting and those Slogers really motivate me in a way by showing their great post and passion.

Thank you guys and thanks for reading.