Monday, April 6, 2015

Last impression.

    How time flies! The first slog is still in my mind. And now I am writing the very last slog for this course. The final exams are coming and so is stress. However, it is still necessary to take some time to write this last impression for csc148.

    Compared with csc108, which I took last semester, csc148 is much more challenging. I think, what we have went through in this course can be summed up by one word, recursion. ‘Recursion’ is a simple word but one of the most powerful tools in computer science. From tracing recursion to implementing recursion, we need tons of practice. Practice makes perfect!
    
    First, I would like to thank to Mr. Heap for his fantastic job as my instructor. As we know, due to the strike, we lost a lot of support comparing what we deserved. Instructors offered us more office hours to decrease the loss as much as possible. I really enjoy the each single lecture and the process to work out assignments. Though I had some hard time to deal with some of questions in assignments.

   Talking about the three assignments, they are the most difficult tasks I have ever had. Sometimes I was so close to giving up but I made it finally. They are interesting and I can get a great sense of accomplishment whenever I implement a function successfully.

    In terms of the two term tests, I get satisfactory grades for both of them. But I know that the final exam will be much more tough than term tests. I am preparing for the final exam and trying to get a grade as good as possible.


    Hopefully, I will continue to take CS courses next semester. I would like still chose Heap as my instructor. 

Revisit earlier SLOGS

           It is nearly the end of this semester. The topic of slog for this week is revisiting the earlier slogs, form the very beginning to the very last one. In the first slog, I illustrated why geeks should write. Until now, I still agree the idea that writing is a vital part of geek’s work. And that's why we keep writing slog every week. In the second slog, I said that this course is not that difficult as I expected. Now, I found I was completely wrong. Converse to my original view, I found this course is even much tougher than I expected. Compared with csc108, csc148 is very challenging. In addition, the majority of the challenge is recursion, of course. From tracing the recursion to implementing recursion, we need a deep understanding of each function’s description, including what they are supposed to do. Besides, we learnt numerous date structures, such as binary tree, linked list. They are all based on recursion. They are all difficult as well as interesting. I enjoy the process to explore them.


        On the other hand, the assignments also leave me big impressions. When I first tried to do assignment 1, I felt that was so hard that I had no any idea. However, now, I realize that the assignment 1 is the easiest one among the three assignments. Though I struggled in every assignment, I work them out finally. These hard works not only enhance my skills relating computer science, but also teach me to persist. 

Impression of week 9

        Last week we had the term test 2. To be honest, before the test I was nervous and worried. Due to the fact that I would be dead if it asks us to implement recursion functions that we never saw before. Before the test, I mainly reviewed the class binary tree. In addition, I prepared an aid sheet in case I forget something during the test. I have to admit for some functions, I memorized them instead of understanding them. I felt overwhelmed when I try to understand each recursion function.

       Fortunately, when I got test paper, I felt relived because some of them are mostly as same as the questions from the lab. However, I still got trapped with the postorder. I have to say that Mr. Heap got me! Because the inorder, postorder and preorder are exactly my weak points!


      Anyway, I have confidence about getting a good grade in this term test whereas I found many defects as well. So for the coming final exam, I need to work harder, especially on implementing recursion functions.  

Impression of week 8

      Last week we talked about a new data type: linked list. At the very beginning, I thought the linked list was very simple because it has just two initial parameters, which are self.front and self.back. How simple it is! However, I found I was wrong as the lecture went on. The linked is list is much more complicated than I expected, especially when it combines with class LLNode. Sometime it gets pretty confusing. In linked list. Each single LLNode has the value self.front and self.back. As a result, when we implement methods such as __contains__, __getitem__ and append, there are numerous factors that we should care about. For example, when we implement append method, it is important that we assign lnk.back.nxt = new_node first and then let lnk.back equal to new_node. The order of the assignment matters a lot.



    Besides, the assignment 2 was due on Thursday. We did not complete our final version until the last minute of the due time. Anyway, fortunately, we work out the minimax strategy, thanks for Mr. Heap’s tips in the emails. I have to say the assignment 2 is the most challenging assignment I have ever went through. I even once wanted to give up. However, I got over the trouble and made it. This is an amazing experience. 

Thursday, April 2, 2015

Impression of week 7

Last week, we learned about binary tree, which is a kind of generic tree that only have two children, left and right. Besides, left children is less than the data itself while the left is larger than the data. This feature makes binary tree much more interesting. For example, there are three distinct visiting orders for a binary tree, namely, inorder, preorder and postorder. To be honest, they are sometimes confusing and it did take me a long time to distinguish these three visiting order. Inoder is the easiest one to recognize since it visits from top to bot. Preoder is more likely form left form right as postoder is the converse of preoder.

On the other hand, the assignment 2 is due on Thursday. I found this assignment is pretty challenging due to the recursion, especially the minimax strategy. Minimax is a strategy which always choses the winning move, if it exists. This is a powerful strategy in the game where both players have all the information and time they need. I had a tough time with this strategy. However, I think it will be interesting to get over this problem. I do enjoy the process.

To conclude, it has been more than half of this semester. And the course is getting more and more challenging. But I have confidence to face all the difficulties. 

Sunday, March 1, 2015

Summary of Object-Oriented Programming concepts (week #6)



Object-Oriented Programming (OOP) is one of the programming paradigms. OOP is based on ‘’object’’, which means object is the initial parameter in programming. All the functions and algorithms are created according to the object.
It may seem a little bit abstract. Let’s see an example. As for the volume of a cuboid, all the cuboids have height, width and length. As a result, for any cuboid, the volume can be indicated as height*width*length. In this particular case, the ‘’object’’ is cuboid, no matter what kind of cuboid it is, the volume could be calculated by this function.
Consequently, ‘’class ’’ plays a significant role in OOP languages. A class include all pf the functions and algorithms or the same object.  The class have various methods for the object. Take List for an instance. List is an important class in Python, indicated as […]. In class List, we have append, pop, remove and so on methods, which are oriented to List.
Besides, subclass is also produced in OOP language. Subclass is the posterity of a particular class. However, subclass is designed for a more specific object, comparing with a general class. Subclass inherits the properties of the general class. At the same time, subclass has its own distinctive properties.
So far, Python is the only programming language that I have learnt. As a typical OOP language, the impressions that Python leaves me are its efficiency, flexibility and expansibility. Everything in Python is about object. Objects decide the functions and algorithms.  This is what OOP is.


Friday, February 20, 2015

Impressions of tracing recursion from week 4 (week 5)

       Recursion, which I did not even know this word until I took the lecture in week 4. Recursion means the functions that repeat itself in functions body. This is just awesome and incredible. Apply itself time and time again until resolving the function.
       At the same time, the most magical part of recursion is that the whole body just takes four lines in total, with no exception. Short but powerful, that is my impression of recursion. That is why recursion requires programmers a high level of logical thinking ability. Currently, all about we have done is only tracing recursion. Even though, it makes me confused from time to time while tracing the recursion. Concentration is highly necessary when you do tracing recursion. In the lecture, the example that Mr. Heap gave us is summing lists, which may contain nest lists, even nest lists in nest lists… All he did was returning sum ([sum_list(x) for x in L]) (for which sum_list is the function itself). Subsequently, the function will remove the parentheses one by one time and get the sum for all the statistics in the list.

       For now, the recursion is the most challenging part ever since I learned computer science. In addition, I find it is charming and I enjoy it a lot. I am looking forward the day when I  create a recursion by myself.

Impression of first few weeks(week 4 slog)

      Having taken CSC148 for 3 weeks, actually, I did not find this course is as difficult as I expected, which is good news for me. However, the teaching styles of different instructors are different, apparently.  Back to CSC108, we had videos, which covered the most what instructor would talk about in the lecture. As a result, we can even not attend the lectures if we understand the videos completely. (Just kidding, I did attend each single lecture XD). Yet in term of CSC148, no more videos, which acquires us to show up in each lecture and follow the instructor close, otherwise you could easily fail in the course.

      This week, one big deal is the assignment 1. To be honest, I had totally no idea when I first got the assignment and I was anxious about it due to fact that I do not know where to begin at all. The whole thing was just too abstract, which is asking us to create various games by setting classes. In fact, creating a game itself is not that tough. Nevertheless, how to connect the game with classes did embrace me.  However, thanks to the enlighten from Mr. Heap. With help of my partner, we finally work out the assignment. Hopefully, we can get a good grade. 

Saturday, January 24, 2015

Why geeks should write?

        In most people’s mind, what geeks can do is only writing code in front the computers. However, geeks are changing this situation. Keeping a journal is becoming one of the most significant routines for a programmer. Geeks may encounter various bugs while programming. As Mark Dalrymple said, some bugs take one or two hours to fix, some other could take one or two days form you. At this point, it becomes necessary to record the journey of resolving the bug due to the following several factors. Firstly, computer bug is abstract. Thus debugging is a more abstract adventure. Once you get lost in this adventure, you have to start over at the very beginning of the journey without a journal, making your previous work nonsense. A journal help you keep a track on your exploration. Whenever you get in trouble with debugging, the journal can help you out and point out where you get wrong at once. On another hand, according to Steve Rydz, many programmers had similar experience that trying to debug something that you have come across before, which shows the significance of the debugging journal. It ensures you will have something refer to next time you encounter the similar bug. Furthermore, geeks also need to illustrate codes to people, like their users. Computer is not the only thing that geeks need to communicate with. Geeks have the responsibility to make other people to understand what they are doing. As a result, debugging journal is such a dictionary that can translate geeks’ code to English.

       As a conclusion, writing is essential for geeks. Writing is as important as programming for geeks.