CSC148 SLOG
Wednesday, 1 April 2015
The grand look back
When I look back to my posts, the most word I mentioned was OOP. Python introduced me into a world where nearly everything is a object and there are classes everywhere in the program. It was a bit of transformation to me. However, when I finally adapt myself to the ideas of object, the language and the course are really smooth for me. It turns out that I am now keen on program in a more OOP style than I used to.
Impression about week 9
This is the week when the TA strike went on. I don't know a lot about the matter but I hope that the university and the union can work our some sort of a deal.
Binary Search Tree again , the famous topic in computer science. The pace is getting slow and I believe it is because that some people are having a hard time understanding it. The insertion and deleting of the nodes are the most interesting part of a BST structure I think. These parts requires some thinking while other parts are relatively straightforward.
Binary Search Tree again , the famous topic in computer science. The pace is getting slow and I believe it is because that some people are having a hard time understanding it. The insertion and deleting of the nodes are the most interesting part of a BST structure I think. These parts requires some thinking while other parts are relatively straightforward.
Friday, 13 March 2015
Impression of Week 8
The material introduced in the recent few weeks are conceptually nothing new to me. I have been using the BST structure and linked list in my program a lot. However, the 'C' problem hits me again. I used to implement these linked structure with pointers. Python does not support direct referencing and dereferencing of any kind. This means to me that every node in either data structure holds a copy of one or more data members of node type which is taking huge spaces on the stack. I felt that is necessarily wasting memory spaces. I wonder if it is my understanding wrong or it is actually implemented like that in the python. LOL
Thursday, 5 March 2015
Impression of Week 7
What did we do in week 7 ? It's still Trees, but a new kind of Tree structure.
Binary Search Tree are the most adopted data structure in the computer science world. It extend the dimension of storage from surface into a layered field. The nature of a BST which every nodes's left child is smaller than the right child, gives BST advantage when being sorted and searched.
We can use the nature when we do search to reduce the amount by almost half since we only need to search a half of the children. Also, when we traversal down a BST, in order traversal naturally provides a sorted result of the data members in the Tree.
I attempted on implementing the Tree structure with minimax algorithm in the Assignment 2. I was able to mark every try in a Tree but never figured out a proper way to return the move back to the game state.
Binary Search Tree are the most adopted data structure in the computer science world. It extend the dimension of storage from surface into a layered field. The nature of a BST which every nodes's left child is smaller than the right child, gives BST advantage when being sorted and searched.
We can use the nature when we do search to reduce the amount by almost half since we only need to search a half of the children. Also, when we traversal down a BST, in order traversal naturally provides a sorted result of the data members in the Tree.
I attempted on implementing the Tree structure with minimax algorithm in the Assignment 2. I was able to mark every try in a Tree but never figured out a proper way to return the move back to the game state.
Saturday, 28 February 2015
Objective Oriented Programming and Mor
It's now the seventh week from the beginning of the CSC148.
I finally tuned in with the idea of packing data and methods into classes. It not only became my way of writing code, but also put this "packing" into my thinking. Although python dose not emphasize the security of member variable of a certain class, but by classing things up, it reduces the possibility of me accessing and creating random variables that flies around in the code.
Also I found some amazing similarities between the way we design our game and the way professionals design a game. I work part time with some enthusiastic people in the mobile gaming area. They implement games by a "Model,View,Controller" approach in which model handles the data and calculations, similar to our Game_State class and Strategy class. The controller links the model with the view,which is another component that display the game, similar to our View class.
I believe by practicing this structural programming, we are one step closer to be a real computer scientist and to develop functional applications on our own.
I finally tuned in with the idea of packing data and methods into classes. It not only became my way of writing code, but also put this "packing" into my thinking. Although python dose not emphasize the security of member variable of a certain class, but by classing things up, it reduces the possibility of me accessing and creating random variables that flies around in the code.
Also I found some amazing similarities between the way we design our game and the way professionals design a game. I work part time with some enthusiastic people in the mobile gaming area. They implement games by a "Model,View,Controller" approach in which model handles the data and calculations, similar to our Game_State class and Strategy class. The controller links the model with the view,which is another component that display the game, similar to our View class.
I believe by practicing this structural programming, we are one step closer to be a real computer scientist and to develop functional applications on our own.
Sunday, 8 February 2015
Tracing recursion
In the previous post I said that tracing a recursive function or recursive call are somewhat mind-exhausting.
It's getting much better now since I found my own way of tracing by marking the layer of recursion and the control return signal. It surely adds some more steps to a regular recursion but made the process clear to me.
I added some SLOGers of on my list and I will be reading them as they are interesting.
It's getting much better now since I found my own way of tracing by marking the layer of recursion and the control return signal. It surely adds some more steps to a regular recursion but made the process clear to me.
I added some SLOGers of on my list and I will be reading them as they are interesting.
Monday, 2 February 2015
First weeks in CSC148, start thinking like a Computer Scientist....start.....
What's up bloggers,
It is now the beginning of the fourth week of this semester.
We finished the first assignment, WOW~
I have been reading a few of peer's blogs and found some very interesting ideas. First I cannot agree more on the vagueness of statement in A1. Like what Simon and a lot other students said, the problem given in the first assignment is not quite clear. It surely caused me some confusion and I think it may also troubled other students.
Another point mentioned by the peers that I really agreed is that the coding for A1 is rather easy but figuring out classes and methods implementation is quite challenging. I personally attempted a lot of different versions of code and finally found a working one with descent classes and subclasses.
We have also started a new topic 'recursion' which is mind squeezing. I can feel my brain working at full power when tracing or writing a recursive function. Recursion is a magic way of coding but it is magically complex.
I hope I can somehow figure out the mechanics beneath magic and start to program like a Computer Scientist.
It is now the beginning of the fourth week of this semester.
We finished the first assignment, WOW~
I have been reading a few of peer's blogs and found some very interesting ideas. First I cannot agree more on the vagueness of statement in A1. Like what Simon and a lot other students said, the problem given in the first assignment is not quite clear. It surely caused me some confusion and I think it may also troubled other students.
Another point mentioned by the peers that I really agreed is that the coding for A1 is rather easy but figuring out classes and methods implementation is quite challenging. I personally attempted a lot of different versions of code and finally found a working one with descent classes and subclasses.
We have also started a new topic 'recursion' which is mind squeezing. I can feel my brain working at full power when tracing or writing a recursive function. Recursion is a magic way of coding but it is magically complex.
I hope I can somehow figure out the mechanics beneath magic and start to program like a Computer Scientist.
Subscribe to:
Posts (Atom)