Monday, 2 March 2015

Week 7 Summary of Recursion

"It seems very easy!"
 Yes! That was my first feeling when I just learned the recursion in the lecture!
 Since a few weeks struggled with topics that professor taught during class, I was strongly  not confident about what was going on and whether I could understand new stuff.
 The presence of Recursion changed my mind at beginning. It showed to be not hard initially, we just needed to know the steps it  worked through, just put new data in the same function again and again until the final result was gotten.
 I actually became relaxing and assumed I understood recursion very well and pay little attention on it. This always happened before the bad things, and bad things indeed took place.
 The 5th tutorial quiz, which concerned about how to construct a recursion function, was the worst one I had ever did. I could predicted my bad score when I was doing that quiz, because I completely had no idea after I looked through the question.
 I treated it to be a serious problem, and I started to rethink about recursion-- What is the recursion and what is the purpose of using it?
 In order to get answer I went through the notes posted on the course website. It gave me a clear direction.
Recursion is a great problem-solving technique that split big problem into small parts and solved each part individually and finally combine all results together.
 Programmer use it because it make complex problems become simpler and make both codes and logic become more clear and easier. There were no doubts that tracking recursive functions was not hard, but how to write one is a big issue.
 As I was totally losing at beginning, I started to think why I could not find a way to solve it. Then I started to consider examples given in the lab handout and those during the class steps by steps, and summary the general pattern and conclude purpose and the role of each step. It was extremely helpful and after a few hours of after class practice, I realized that I was over-thought before.
 When I was handling handout 5,  as the result of lacking necessary knowledge, my logic was a complete mess. I had an illusion which always told me that I must missed some minor situations that would cause the function fail if run it. Then all I did was trying to think about all situations the function might meet and, of course, confusing myself and make the problem become more sophisticated.
 If I looked back now, I may think the problem was quite easy. I just need to find out when the function needed to call itself and in what form, then I can solve it.
 Sometimes problems were not so hard to solve, but it also will not be very easy. I need to be careful with each topic and its content even if it may show to be simple. Alternatively, I plan to do more after-class practice about recursion to solidify concepts, and so I could be familiar to use it when handling with Tree(General Tree and  Binary Tree) and finish examines as well as I expected.
 

Friday, 6 February 2015

My Impressions of Tracing Recursion

When I firstly learned this topics--- tracing recursion, I surprisingly found that it was quite easy. As I noted in my last SLOG, since the beginning of this course I met so many problems so that I just think all stuff we learned would be very hard to understand!

I believe this topic concerns more about logic thinking, as the tracing required consider the function step by step. During the class, when professor introduced it, I and one of my friend who also took CSC148H both feel that it seemed not hard, especially following the steps on the handout which was given by prof.

I took this feelings with me until I finished my lab in the same week. During the lad I realized that although tracing recursion was indeed not very hard, questions about how to construct the similar function was much more important and harder.

The lab handout asked us to construct a function with given features, I really struggled. I firstly thought about the normal way which was just like those examples gave in class and handout. However, the truth proved that I was wrong.
Then I spent a lot of time on dealing with it and finally got an answer.

I believe that this experience told me that nothing will be always easy. Maybe things seems to be easy at first, but it finally will turn to harder and harder, so it is a good idea to be careful with everything I learned now.  

My Impression of First Few Weeks

It became really terrible for me during the first few weeks. While someone just told me that CSC148H was much harder than CSC108H, I was really not sure how this would be.

Actually, it indeed confused me at the first few weeks. I struggled with the method __repr__, subclass, ADT and some other stuffs covered. For example, when I firstly saw the method __repr__ in class, even though our instructor explained its meaning, I still not fully understand. Fortunately, there is a tutorial each week and it was extremely helpful, and I solved most problems I met during the class by asking my TA. So, now I know that __repr__ is a method that is similar to __str__ which will produce a string representation of a class, but __repr__ can be evaluate by calling eval() while __str__ is not able to.

There were, of course, several other problems, like the "raise"; how to make a new designed class be immutable, what steps did Python take when processing a class which accompanied with subclass....

Because of the existence of those problems, I completely had no idea what was going on for a while, and after went through the instruction about assignment 1 I even did not know how to start it at first.

It was horrible for me during first few weeks, but after I summarized most knowledge we learned and solved problems I met, the whole course became much more clear. Alternatively, when I handled with assignment 1, it helped me to have a deeper understanding about what we learned.

That what I feel about first week, I hope I will do better in future!

Wednesday, 21 January 2015

Why geeks need to know how to write? The first idea come up in our minds may be the weak relationship, which is the common thought among people, between Computer Science and writing.

However, the truth is that writing is considerably significant for programming, and other CS issues.

First of all, like Joel Spolsky wrote that "Even on the small scale, when you look at any programming organization, the programmers with the most power and influence are the ones who can write and speak in English clearly, convincingly, and comfortably".----From Advice for Computer Science College Students

A great programmer must be able to express their thoughts, logic and codes clearly and easily understandable for others so that other programmers can therefore use the code without changing anything.  A good written code will provide more information and help others to know the purpose of the code easily, the quality of writing reveals the quality of the code that has been written by the programmer.

Furthermore, when a programmer is going to be good at writing, he can express what he thought before at a much more clearly way. Programmers always work with programming and so that the existence of  bugs is inevitable. For a programmer who is bad in writing, he is not capable of recording  ideas, which are not important now but may be more valuable later, properly and it will normally take him much longer time to fix bugs.

On the other hand, a programmer with better writing skills not only can help himself when handling problems, but also help others who is struggling the similar or exactly the same problems by suggesting several good ideas. Meanwhile, the good recorded writing can preserved as a valuable review notes so that it may be able to warm programmer not to make similar mistakes next time.

Generally, as the advantages and necessity for a geeks to know how to write,  and ether because the benefits from self-improving and check for bugs, or duo to the positive outcomes on helping others, they all show the importance of the writing. So, geeks should write and need to know how to write.