2014年1月31日星期五

Week4 SLog

Hi, everyone!

In week 3 we all wrote something about object-oriented programming. This week, we went back to the topic of recursive function and the professor showed us two more examples. The first one was to return the max deep of the nested list, which was quite similar to the example that we were required to sum the nested list in the second week. Another example was about turtle recursion.

Frankly speaking, recursion is not an easy topic for me, and it took me some time to go over the examples and reading several times in order to have a better understanding. The nicest thing about recursion is the code is elegant. It also will be a good thinking training. Although it seems recursion basically does nothing, still I think what professor concluded about on recursion was very helpful. Basically, recursion involves a base (in order to stop the recursion)and a recursive formula. That is a good guide for me to write recursion function.

Since recursion should be one of the most important topic in csc148, I believe we will still cover it in the next few weeks. Besides, we are required to write something about recursion in week 7. So I think it is not wise to write too many things about recursion now.

I have started to do the A1, given I will have some midterm tests in the middle of February. I have to admit that it was kind of frustrated at the beginning, since I was not sure what attributes should TOAHModel has and how the information of cheese on which stool would be stored. However, I found something inspiring on Piazza, which helped me a lot with first few steps. By the way, I should thank for the people who is very kind to answer questions on Pizza, which gave me some clues about A1.

没有评论:

发表评论