Sunday, 15 February 2015

my summary of Object-Oriented Programming concepts

Until to this week, we have learnt a lot about object-orientend design. I think I have had a good command of most of what the instructor taught in the class and the lad exercise, but I got a very very low mark for my assignment1, which surprised me deeply. Because I got almost full marks in my lab exercises and 90s in midterm test, which let me think that the object-orientend design is not difficult. However, when I used what I learned to design a real object like the game in assignment1, I found it was totally different from the test or lab. For each part, I can deal with the class easily and successfully with the description from handout. So, I just need pay attention to one specific function or method.

As for a object design, I do not have a clear thought about what should I do. According to some paragraphs of words, I need to find what kinds of classes I need to design and what methods I will use in every class. Most importantly, the codes I write should meet the requirement. I always can not decide what should be written in general class and what should be added to specific class. After reading the comments of my assignment,  I still feel confused about object-orientend design. In my opinion, there is few things can be done in general class because of various different kinds of object. Besides this, the function of game view confuses me very much. 
So, I still have a lot of questions about this topic even though I can run my game successfully. Should I drop?...

Sunday, 8 February 2015

my impressions of tracing recursion

Recursion plays a very important role in function design. It has some similarities with "when", which would have many repeated operations. However, there are still some differences between the two methods. As for "when", it need a valid value or statement so the function can go on running. But, recursion is used to work on one object (like list) which still has nested object (list), by this way, we can use very few codes get what we want for this original object including nested objects inside until the element is not the style of the object. Recursion is very useful and flexible and it can help programmer save a lot of time and energy.

Sunday, 1 February 2015

Week 4


I have learned the course CSC148 for almost one month, there are some interesting topics covered in this course, which is a new challenge for me because some of them seem a little difficult. After trying my best, I think it is ok  for me to catch other classmates' step. Everyone has different background of python learning, so it may look very easy for someone who want to get more difficult topics to study. When I prepared for Assignment 1, it took a long time to know how to start, which was very different from what I did in CSC108. In CSC108, for every function, there were many detailed descriptions and detailed requirement. So, we just needed to add some codes to the function which already had the staring codes. However, in CSC148, the assignment does not have staring codes and does not tell me what methods I need to design. What I know is the description for a object in real world and I need to run the game by computer. The number of  classes, the number of  methods and function body are all decided by myself. It is not easy for me who has be used to the assignments and learning method in CSC108.

So, for me, when I learn more about python and do my work, I need a new way to think questions and change my habit of designing codes. Especially, after reading the blog

http://theforum148.blogspot.ca,  I has realized that some of my classmates have acclimatize themselves to the study of CSC148 successfully. Study is a interesting and happy thing for them. Maybe some ways I learn or think have to be changed so that I can have a good trip in computer science world and feel less stressful. 

Sunday, 25 January 2015

The trouble I met when I did the lab1 of CSC148

The problem was not very difficult, but it still took me a little time to deal with. In lab1 work, we needed to collect the information about race members. So I decide to choose dictionary, whose keys are time intervals and values are members' names. However, when I added a new name to the key, it caused a error. I had tried many ways to solve this error but all of them did not work. So, I asked help from classmates and TA and I still got the same result.

After thinking for a while, I was awared that I could not use method APPEND for a number or string, which caused the error. What I need do is let the value of dictionary be a list of strings. Like 'mike' -> ['mike']. So, I can append a new name to the existing value.

From this one, I need pay more attention to the type of value of dictionary when I use some methods.

Why geeks need to know how to write

It is very interesting to find that there are a lot of similarities between math study and computer science study. One of the most import point in the two areas is that people should learn and know how to write down something on paper to record questions during study period.

As we all know, the notes about course materials and difficult problems will help students a lot when they meet some similar issues which have appeared in previous study. Likewise, geeks also need to know keep a journal to record debug when they deal with problems. Usually, not only newbies but also computer experts will encounter all kinds of issues or problems in a long period of new job. All of them cloud be divided into two kinds: one is totally new and the other one looks similar with some precious issues. For the first one, geeks write down what the problem is and how they decide to solve, which will be added to the personal notes. For second one,  if same or similar problems appear, the geeks can use their notes to find the same way to work out where something is wrong, or narrow this problem down to some exact lines of codes.

There is a great number of codes in geeks' work, which means it is not easy for people to find or to solve a error in them. So, a good habit of recording helps geeks to save a lot of time according to precious experiences. Also, the recording gives them a chance to review how they think and what they do in wring codes. The way how write notes plays a vital role in recording. Because a clear and well-organized note let person find the required content easily and quickly. For computer scientists, more time is equal to better job in some ways.

It is very important for geeks to know how to write notes and thoughts  in a good way when they do their work.