Wednesday 2 April 2014

Sorting and Efficiency

From the readings and the lectures I have learned about new sorting methods such as the quick sort. Previously, I've already learned about the other sorting methods in csc108 and in high school. This semester was my first time learning about how to calculate the run-time and efficiency of a sort. In class, it was shown that the runtime of an algorithm can be expressed as a logarithm when the work done by an algorithm is divided into smaller parts such as in a merge sort or a binary search. I found it interesting to figure out that two programs may have that same worst-case run times but different best-case run times such as the insertion sort compared to the selection sort. Also, analysing the efficiencies of sorting algorithms showed that algorithms using recursion may be more useful such as merge sort and the quick sort. As of now I have a pretty good understanding of all the sorting algorithms but the count sort that was shown in class as an example somewhat confuses me. I do have an understanding though of the big-Oh notation that was taught in class because I was simultaneously learning about it in the course csc165. To me big-Oh notation is a way to express the behaviour of the runtime of an algorithm as the input grows substantially larger.

Wednesday 22 January 2014

CSC 148 Week 3 - Object Orientation

Recently in 148 we've been learning about object orientation in programming. Compared to the Java programs that I wrote in grade 9, object oriented programming is a much more efficient way of writing code. Previously, when I first started coding, I would write all my code for a program under one method, and that proved to be very inefficient and messy. In grade 12 I gained all my current background knowledge of object oriented programming, so I have not had any difficulty with the material covered in class. However, one thing new that I learned is how to create your own exceptions based on inheritance from a parent exception class. It was not too difficult to understand though because I already learned the concept of inheritance in high school and it was covered last semester in CSC108.

 All the material covered in the past 3 weeks has been interesting so far, so I have no complaints about the course, and it has not been overly challenging at all. The first course exercise wasn't that hard but I needed to go back and take another look at what I had learnt last semester in order to refresh my memory. The lab problem for the tutorial was not too challenging but working with a partner is always good experience. Although, I will always prefer to work alone when it comes to a major project. I haven't really encountered anything that I would consider to be problematic for me thus far and nor have I had any personal achievements, but I did pull out a pencil and a piece of paper for the first time during a class. My goal for next week is to use the pencil and paper to take notes if necessary. To end my first blog I will state my opinion on the SLOG required for CSC148. I strongly dislike it, I think that it should be optional, and it should not be considered for marks.