Saturday 29 March 2014

Recrusion

     I have first encounter the idea of recursion in the forth week of csc148 classes. Through the first introduction reading, I thought the idea of recursion is very genius and fantastic. Recursion functions creates a loop or circulation that the function runs again and again within the function until it is instructed to stop.  
    The idea of recursion was complicated and I still think I need more practice to fully master it. As I have concluded, there are two ways of recursion. One is writing the function with in the completed full function like it is shown in the picture below.


The other form takes less words but more thinking. It is the abbreviate way of if statement. Here is an example below. 






Sorting and Efficiency

          Sorting is a very complicated topic. There are all kinds of sorts: quick sort, tim sort, merge sort, bubble sort, insertion sort….and so on. The sorting functions we learnt in csc108 is simple sort. The sorting functions we learnt this term is recursion.
          We also analyzed the run time of all those sorts. A faster tun time  contributes to more efficacy. Tim sort results the most efficient algorithm. 
           I felt that the sorting functions are easy to understand. However, the explanations of runtime are hard to understand. We have learnt the big-O theorem in csc165. The way they explained and calculate worst case  in 165 are more clear and easier to understand for me. 
          This is the second last week of csc148. I don't want to part with this exciting course. And there are also many regrets in this term that I haven't spent as much time on studying as I should. Maybe its because it's the exciting fresh new freshman year; I did too many social instead of studying. Now, with my regrets, I shall work hard towards the final and try to bring my marks up as much as possible. 

Saturday 25 January 2014

Object-Oriented Programming

           During the first three weeks of csc148 course, we have learnt Stack and inheritance. I have a deeper understanding of class and object in python programming.
           The largest problem that I have encountered during the first three weeks of learning is that I have not been accostomed to the new way of learning Computer Science. Last term, in csc108 class, we learnt python through watching a video at home. We did not need to do many readings. I felt that it is more efficient to watch a video because I am able to engage more on the subject. Thus, the first feel week of learning computer science was not as handy as last year.
           I plan to devote myself with more time into reading the notes. I carefully read the notes one more time to make sure I have understand them fully.