Sunday, March 29, 2015

Slog Week 11: Revisiting Earlier Slog and Classmates’ Slogs

Revisiting earlier slogs makes me realize how I struggled with assignments especially the second one and always making stupid mistakes in tests. At the same time, it is interesting to read myself describing the first experience with computer lab, making a game and so on. Other than that, I also talked about the concepts in class and my understanding of those concepts does not change mostly.



By reading my slog, I realize that in this semester we spent most of the time on recursion. At first, we learned the concept of recursion and how to keep track of some simple example such as summing a list; then we began writing basic recursions. As tree and binary search tree were introduced, we moved on to more complex recursion. So a great portion of the content in this course is about recursion.




I visited some classmates’ slogs and found out some of them have a really great description on concepts that we learned.

Celina’s describe many concepts in great details clearly with some pictures. When I was writing about object-orientated programming, I didn’t know how to start so I decided to read other people’s slogs first, then I found Celina’s slog. Her writing on object-oriented programming helped me understand the topic much better and inspired me ideas on how to write on this topic.
Just found out the pictures for tree traversals that she posted are the same as mine. Maybe we both visited Wikipedia and used the pictures on there.

Love the pictures posted on her slogs and sometimes her slog is fun to read. When talking about assignments and tests, we have the same opinion. I totally agree with her point when she says “Why is it that you only remember the stupid mistakes you made after you have left the room”.


http://christiangarciacsc148.blogspot.ca
From Christian’s posts, it looks like he has a good understanding on course content and wrote very detailed posts explaining it. Also, he always keeps track of peers’ interaction on each topic and gives useful advice on how to master some of it.

Saturday, March 21, 2015

Slog Week 10: Impression of week 9: Term test 2 and Binary Search Tree Functions

Term test 2 and Binary Search Tree Functions

The difficulty of term test 2 is similar to test 1. I would say test 2 was not very difficult but I realized right after walking out Exam Centre that I made a very stupid mistake. I misunderstood the first question on the greatest height of a tree and did it wrong, which made me upset, but other than this, everything should be fine. The other two questions are about LinkedList and BTNode, which are very similar to the labs we did. At the same time, I am so grateful that we could bring a cheat sheet to the exam, or I would have run out of time trying to build the functions on the second and third question since 50 minutes was not enough for me to finish the test without a cheat sheet.


Saw the link on Python assert statement in this week’s reading, planning on reading this later. When I went to Prof Danny’s office hour during assignment 2 to fix my code, he used assert to debug the code for me, so I think this would be an useful tool for debugging.



In last week’s lecture, two recursive functions insert and delete were mentioned and the lab of week 9 also requires implementing these two functions.
Insert: insert data in binary search tree and return new root. Insert will ensure this is a binary search tree.
Delete: walks through a binary search tree to delete a node if exists and return resulting tree.


Because of the test, only one hour of lecture is presented in this week, so there is not much new to learn.

Friday, March 13, 2015

Slog Week 9: Impression of week 8: Assignment 2 and TA Strike

Assignment 2 and TA Strike

Assignment 2 was due last Thursday; it is a challenging assignment to finish and I spent most of the time on minimax but still struggled with it a lot.




When I first read the assignment description, I thought of some ideas to approach the minimax. Though I was not sure if my thinking was absolutely right, I decided to try it first. My idea was that with current total and next player given, build a tree with branches of possible routes, then calculate the possibility of winning of each route and return the route with the greatest possibility. I started by using the class tree and tried to build a tree of minimax, but soon I found out it was not an easy job to do and I was stuck on a function for building a tree of minimax when entering a current game state. I understood it should be a recursive function, but when I implemented it there were always errors, so I struggled with it so much. However, when I went to the office hour, I found out that the way the prof expected was so different than what I was doing; luckily the way minimx should be implemented was a lot easier but I got a very limited time to finish it. As I figured out the prof just expected us to return any one of the moves with the possibility to win, I rushed to finish it. I keeping working on it until the last couple hours but still did not have enough time to check all to make it perfect.




Because of the TA strike, this week’s lab was cancelled and I have to do it on my own. Also, during assignment 2 there was only a very limited time for office hour and the CS help center was closed. Because of this, I spent two whole afternoons sitting outside of the prof’s office to ask a question. The strike is very unbeneficial for students and burdens profs, but at this stage there is not much we can do about it but hoping it would be over soon.