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.