Saturday, 11 April 2015

Final Impressions


I can finally relax a little bit and pull myself together to write this slog. In the last few classes we studied big Oh and I was very surprised because I just studied the same topic in CSC165 class. I think it will be better for me to reflect on the topic after I've reviewed it for the exam, so I decided to write the final blog after my 165 exam. In my opinion, writing the slogs are for our own benefit. I like to consistently reflect on myself, but maybe not weekly because I felt a little bit pushy during this final period.

Looking back at this course, I think it was harder than I thought. To me, the biggest different between 148 and 108 was that 108 studied a lot topics but basic and 148 studied few topics but much more deeper. I was very confusing at the beginning of the course, I wash only able to understand the slides, but all the code makes nonsense to me. I got a terrible mark on test 1 and I became depressed. Then assignment 2 came out, I didn't even want to look at it until my partner dragged me to go over our first assignment and carefully read the second one. It was interesting to me to work with friends especially for a CS assignment. It just makes me felt like a professional geek and also act like one. As I mentioned in my slogs before, there were one time where suddenly those nonsenses makes sense to me. I think slogs helped me to pull myself together, but practice and work with others are the key to success in the course. In week 8, 9, 10, I was focusing to caught up on the material and review for the test on week 9. I felt it's better to write my slogs after my test so that I can focus more on studying. I found the topics of linked list and binary search tree easier for me, although some of my friends found it to be more difficult. I like these two topics more because it's much more straight forward. When writing the code, finding the 'exit' of the recursion was interesting. The 'exit' is also  the key of the code for link list and binary search tree. I felt I did much better on test 2. The outcome was okay in average, but it was a huge progress for me compare with the first one. I wish I got a better mark in test 1 so that I won't worry about failing the course now. However, I will still do my best and be prepared for the upcoming exam.

Overall, 148 was a fun course and everything seems to make more sense to me. The most important topic in this course is still recursion and I found it rather interesting now. It seems like everything is related to recursion, it is the foundation or base. Overall, 148 was a fun course and everything seems to make more sense to me. I'm very confident and excited for the upcoming year, I would like to study more CS courses next year.

Sunday, 29 March 2015

Week 11

I'm going to revisit the slog from week 3 on the topic of 'why geeks need to know how to write'. 
In the slog, I said that geeks need to know how to write because we could never understand programming language without knowing how to write human language. Geeks should write in order to help them innovate their programs and update errors by debugging or exchange information with others to learn from the process. After the past few weeks learning the course, I do agree with my earlier self; moreover, I think there is another reason as well. 

I still agree that writing is essential for geeks to become a success geek. I also found another reason for writing is to understand ourselves. This became more important to me than any other reason. I think I have lost myself so many times when study the course trying to understand the material, but writing helps me to organize my thoughts and understand what I want to do. I think everyone need this process to just slowdown and think about ourselves and then figure out what went wrong. Some of my friends does not like writing because they think it's a waste of time, they can do the thinking in their head. I guess it's different for everyone, but in common, we all reflect ourselves no matter it is done by writing on a laptop or thinking in their head. For me, writing on a laptop works better because it keeps track of my thoughts and I can always go back to it when I needed. This remains of the tracing when we learned recursion. We could not get the final outcome without tracing the code first, just like  I might not be able to come up with a solution when coding without understand myself first. Therefore, I think writing does helps to become a good programmer and a success or 'lazy' geeks, and the main reason is to give us the opportunity to reflect ourselves and have a clearer logic. 

Sunday, 1 March 2015

Week 7: Recursion OR Object-Oriented programming OR Abstract Data Structures

Week 7

Object-oriented programming is a very convenient way to design a program or writing a code. It takes less time and the functions looks more precise. Few important topics we encountered in the course for last few weeks such as 'class', 'subclass', recursions, and 'trees' certainly was being more than helpful once we get familiar. 

'Class' is the most important blueprint in object-oriented programming. Class logically groups related functions together to create an object. The __init__,  __str__, __repr__,..., etc. method which defines the class and initialize the class. The subclass which I found is very convenient. This is also called class inheritance as it inherit the characteristics from a preexisted class and add additional functions to make the 'object' behave in a certain way. The subclass shows the characteristics of 'lazy geeks' or smart geeks perfectly. 

Recursion also plays an important role in object-oriented programming  Recursion saves a lot of work for computer scientists, it's a function calls itself. We did some exercises on input and output numbers using recursion. The very basic example nested list illustrated how recursion works in a simple and elegant way. I feel that recursion is a very interesting and convenient tool compare with iteration. However, tracing recursion was a bit confusing. We must trace the function calls in order, just like trying to understand how a computer thinks when calling recursion, step by step. For example:

  1. Trace nd([5, [[1, [2, 3], [4]]]]) 
         nd([5, [[1, [2, 3], [4]]]])
         --> 1 + max([nd(x) for x in [5, [[1, [2, 3], [4]]], ’ox’]])
         --> 1 + max([0, 3, 0]) --> 1 + 3 --> 4
    
This was an example we did in lab. The funny thing is I always have the impulsion to just sum up all the integers in the bracket. It's kind of ridiculous, but I think it's because I'm not used to recursive functions and concatenate the sub calls of the function itself. Recursive thinking might help. 

Later in the course, we also studied 'Trees', which combines the knowledge we learned from 'class' and recursion. Trees are a set of nodes with edges between. It's special characteristics which only have one path from the node to the root and no cycles make trees to represent inheritance hierarchical relationships in programming. It might be difficult at first when we try to get a certain node in lab exercises, its easy to mess up and went to a wrong path. However, once we get familiar with how the relationships in trees works everything became smooth.  



Sunday, 15 February 2015

Week 6

Week 6

'Class' is the most important blueprint in object-oriented programming. Class logically groups related functions together to create an object. The __init__,  __str__, __repr__,..., etc. method which defines the class and initialize the class. The subclass which I found is very convenient as it inherit the characteristics from it's base class and add additional functions to approach make the 'object' behave in a certain way. The subclass shows the characteristics of 'lazy geeks' or smart geeks perfectly. 

This week's lab was confusing. I have looked at the lab briefly before tutorials, and I thought we just need to complete three functions. However, the three functions was getting harder and harder. I realize that I need more practice and become more familiar with 'trees' and 'recursion'. Thinking back about the slides and definition of trees, it actually make more sense to me every time. I must remember to keep up with the materials we learn each week as the material gets more harder. 

Week 5

Week 5

Recursion saves a lot of work for computer scientists, it's a function calls itself. We did some exercises on input and output numbers using recursion. The very basic example nested list illustrated how recursion works in a simple and elegant way. I feel that recursion is a very interesting and convenient tool compare with iteration. However, tracing recursion was a bit confusing. We must trace the function calls in order, just like trying to understand how a computer thinks when calling recursion, step by step. For example:

  1. Trace nd([5, [[1, [2, 3], [4]]]])
         nd([5, [[1, [2, 3], [4]]]])
         --> 1 + max([nd(x) for x in [5, [[1, [2, 3], [4]]], ’ox’]])
         --> 1 + max([0, 3, 0]) --> 1 + 3 --> 4
    
This was an example we did in lab. The funny thing is I always have the impulsion to just sum up all the integers in the bracket. It's kind of ridiculous, but I think it's because I'm not use to recursive functions and concatenate the sub calls of the function itself. 
    
Practice. Exercise.

Sunday, 1 February 2015

Week 4

Week 4

This week was a tough week for me. I had two CS assignments due around the same time and all of them takes time to do. The first csc148 assignment was to design a game called 'SubtractSquare'. After I read the handout I feel that none of it make sense to me and I don't think I can ever design something like that. It makes me feel scared to even start the coding. However, after talking with classmates and friends I felt more confident. I totally forgot that I could partner up with someone and work it through together. This process was not smooth as I thought. I was abondoned by two person, one dropped the course, and the other one had to join another group. Luckily, I found someone at the end, although we weren't good at coding, but we tried our best. I think it must be a lesson for me to learn, and I will definitely start the assignment earlier with a partner next time. This way I will have more than enough time to complete the assignment.

This weeks lab was about recursion. I enjoy the lab every week because it gives me the opportunity to exercise and ask questions. Since I have start this course I feel that there is a connection missing between 108 and 148. Maybe it was the view lecture that's missing or the online PCRS that was missing. However, this week's lab exercise seems very familiar to me. I must do more exercise now. Next week is the real tough week since I have three test and two of them are on the same day. I must manage my time and study hard!

Sunday, 25 January 2015

Week 3: Why geeks need to know how to write?

Week 3

As a first year student learning computer science courses, I found writing actually became more important because it connects the gap between human language and programming language. Programming language is like a translation of human language into computers. We could never understand programming language without knowing how to write human language.     
  
To me, I think it's because writing is the basic skill of communication and learning. We all know writing involves language, which allows others including ourselves to understand our intention at the time. We are able to organize our thoughts and have a clearer logic. That's also why captions are needed and essential when writing codes to approach a specific task. It's like a little debug journal for ourselves to know why we wrote the code in a certain way at that time and detach any errors that went wrong. It also make our codes readable by other programmers and helps them to understand our opinion. We are able to share our opinions with others and at the same time, learn from others to improve ourselves. One thing that we should also be aware is the audience of all the codes that programmers write are humans. The destination is always to accomplish a task that will benefit humans, such as computer games for human players to play, programs for humans to use, etc. Geeks should write in order to help them innovate their programs and update errors by debugging or exchange information with others to learn from the process. Writing is the fundamental skill to be a smart geek, a 'lazy geek', and a success geek. I think geeks not only need to know how to write, but write effectively and precisely.