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.  


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.

 

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.


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.

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.

   


Saturday, 24 January 2015

Why Geeks Should Know How To Write

When one is labeled as a "Geek", he/she's character is set by others to be someone who hides in a dark room with the only light coming out of computer screens. The "Geek" stereotypes a person to be rarely talking, communicating or expressing him/herself to others. 

However, the idea of being a "Geek" has transformed recently. When we call some one "Geek" we are more referring to his/her expertise in technology instead of judging personality. It is rarely the case that one single expert can make something amazing happen. It more often takes a whole team to accomplish a descent project. 

When working with others, communication act as a major role. The team relies on communication to collaborate efforts. And writing, is the formal way of communication. Members write all kinds of documents and memos for purpose like reminding the deadlines, ensuring jobs are completed correctly, making changes to a plan and etc,. "Geek"s must have sufficient writing skills in order to carry out jobs. 

Communications does not happen only internally, but externally as well. Before a project is set,  team need to know the demand of the client. This important part is done through the formal communication, which is, writing. Also, after the design process is finished, the team need to present their work to the audience, with out writing skills, it will be nearly impossible to nail this part.

The writing skills required for a "Geek" is totally different from what is required to be a author. So that "Geeks" should have no fears about it. Creativity and complicated wordings are not "must have" for "Geeks". Geeks should only worry about writing in a effective, simple and readable style. 

Well, as a "Geek in training", this is what I think why Geeks should know how to write. 
Please bear with me about any typos and misuse of words if there is any. 

Thank you !    

Monday, 19 January 2015

First CSC148 SLOG

This is the first post created for the CSC148 SLOG !

I have been coding for a long time. The language I started to play with is the very machine-oriented C. I then moved forward to C++ and Objective-C which have similar syntaxes.  I had some experience with Java and Android SDK also.

Despite previous experience with programming, I found CSC148 refreshing on topics especially on OOP.  It may be straightforward to someone new to programming, but to me it is rebuilding the fundamental approach to compose a program.

Affected by C, I am keen to talking to computer directly, manipulating rams and data in a very close fashion. When I was introduced to Python, the language itself is nowhere close to challenging, but how the language handle objects and classes are quite different.

By the end of the first week, I acquired the basic idea of building the program from bottom up. That is, to package data and method in classes and then instantiate classes to perform tasks. I believe I am now a more "structured" programmer who have better skills to organize a program.

Entering the second week, I am exited to see how inheritance work in Python and what rules from C++, Java will hold in the new language.

Stay tuned.