Monday, March 30, 2015

week 11: revist

For this week's slog, we are required to revisit earlier posts that we wrote ourselves, and see whether I agree or disagree with our own opinions at past, then compare it to our classmates.

As I revisit my own slog, there was some posts I agree but some that I disagree too.

At first few weeks' slogs, I wrote I am confusing about str and repr method, and I did not clearly
write down their differences, but now I can confidently say that their differences: while __str__ method is used for printing out the state, __repr__ method returns a string representation of state.

For example,
__repr__ method is used as
       >>> s = SubtractSquareState('p1', current_total = 17)
        >>> s
        SubtractSquareState('p1', False, 17)
while __str__ method is used like
       >>> s = SubtractSquareState('p1', current_total=17)
        >>> print(s)
        Current total: 17; next player: p1

The big difference between them is when we simply write s, it returns string representation by __repr__method, but when we print s, it returns string representation by __str__method.

Other than this, I mostly agree with previous posts.
(The way I explain how to approach to recursive functions, the explanation of btnode, etc)

As I visited several classmates' slogs and compared what I and they have similar difficulties,
I realized that most of my classmates experienced the difficulties on LinkedLists, and LinkedList question on term test 2's just like me. And mostly almost all classmates feel uncomfortable about strike we have, because of cancellation of labs. This point is what I mostly agreed with, since I really have difficulty to finish lab myself.

I strongly impressed with this classmate's slog. (http://dottoripy.blogspot.ca/)
He writes down every week's slog with details including numerous codes we did on lecture, and adds explanations of terms from other sources.(for example, Object Oriented Programming on week 6) I thought I would be better if i also add definitions or principals like him, to clarify the terms.

No comments:

Post a Comment