Sunday, March 29, 2015

Week 11 - Revisiting Past SLOGs

Time passed by so fast, by this time I noticed this semester has almost came to an end. I have learned many new things and strengthened by knowledge of python this semester. I have learned many new python classes that each has a specific role in keep tracking different values, and also learned many different recursions for these classes that is very helpful for writing functions and methods. I loved the three assignments, where we made simple games from scratch. Tutorial was very fun, I am impressed that there are so many computers in BA, where my tutorial is at. Classes was very interesting, we learned many new concepts for programming and many new ideas were been introduced.

Now as I look back to my past SLOGs it made me feel very accomplished, as its like a diary were all the things I have learned and all my struggles is been recorded. I have also learned many new things that I didn't notice before over the past weeks as I study for term-test 2 and doing assignment 3. For example, as look back on my Week 7 SLOG, I was talking about recursion and how it works, at that time I did understand the concept, however as my experience grow after these weeks I noticed many small tricks that could be helpful when writing recursive functions that I would like to add to my previous post. These might seems very obvious, but after writing many recursive functions I have made countless mistakes around these small things that I have forgot, so I felt these are very important to check after writing a recursive function.
1. Check for parameters in recursive function, check if when calling the function itself inside the function body all the parameters has been given, and do they have the correct value.
2 . Check for children before using them. Example: When writing recursive functions with BTNode type of class don't forget to check for self.left and self.right before using them, otherwise there might be an error because they might not exits.


Sunday, March 22, 2015

Week 10 - MiniMax Testing

In this week's lecture professor Danny talked about how to write the best and most efficient test cases for testing programs like MiniMax. This was very interesting for me because I myself had done it in the previous assignment 2 while writing MiniMax. However hearing him teaching us about how to test MiniMax made me felt very uncomfortable, because it made me feel that my testing was not that well thought and my code might have some flaws.

Sunday, March 15, 2015

Week 9 - Exam Week

This week was very busy for me, with may assignments and a presentation due as well as a 2nd mid-term exam for this course. There are no tutorial for this week due to the strike and the class was cut short because of the exam so there is not much to talk about for this week's blog.

I basically studied and worked all week, I first looked up past exams to get a general idea of what to be expected in this mid-term, due to all the past exams were about writing functions of recursive codes I did not expect word questions on the test that test our knowledge of programming terms like different 'nodes' and technical terms for ways to count a tree. I did very bad on the first part because I got overconfident and overlooked materials that weren't covered in the past exams and didn't prepare for the definition part.

Sunday, March 8, 2015

Week 8 - LLNode and LinkedList

This week was also a busy week because we had to hand in assignment 2 on Thursday before 10 pm and I had to do a lot of final checking and check all my function files with pep8 and change all the format preference errors.

In this week's lecture we learned a quite interesting example of python class LinkedList which use another python class LLNode in itself. This was a very interesting concept as it is very hard and confusing to understand for me at first. Basically LLNode acts like a 'value' class for the LinkedList class, where LLNode only shows its current value (like BTNode) and 'nxt' which shows a recursion of LLNode inside it. (like BTNode could also be None) LinkedList is basically its like a 'list recorder' for LLNode that shows the last BTNode in the LinkedList and the whole chain of BTNode in the LinkedList.

There was no tutorial this week due to the TA strike, and I had to do tutorial at home. However although at first it was very challenging to understand the concept of writing function and method for BTNode and LinkedList, after a few fails I started to get the hang of it, and with the help of answer sheet I was able to quickly write all the functions in the tutorial handout.