Saturday, November 30, 2013

Sorting Algorithms and Efficiency

So... It seems that this will be the last entry for this SLOG. It's been a pleasure to share my thoughts with you -I don't know if there's anyone else who reads these besides TAs though-. Today, I'll talk about some sorting algorithms and their efficiencies such as selection sort, quick sort and merge sort. First, the wikipedia articles about these sorting methods: -http://en.wikipedia.org/wiki/Selection_sort -http://en.wikipedia.org/wiki/Quick_sort -http://en.wikipedia.org/wiki/Merge_sort Needless to say what they do, I think the best sorting method among them is merge sort. How I came up with this idea lies on the worst-case performances of these sorting methods. Selection sort has a worst-case performance of n^2 (the worst among these three), where quick sort has n*log(n) and merge sort has n*lg(n). My knowledge until this point in Computer Science tells me that from these informations, it's safe to say that merge sort is the best one to use. Since it is such a good algorithm, Perl, Java and Python uses original or tuned copies of merge sort as their default sorting algorithm.

Sunday, November 24, 2013

New horizons in Computer Science

Since we don't have anything further in CSC148 besides the last lab and the final, I've started to do some research on further topics. The first one that came to my mind was game programming. I love games since I know myself. So, the first thing I was thinking was how to design a computer game. When I did a little search in UofT's library, an electronic book took my interest. It's name is: "Beginning C++ Through Game Programming, Third Edition". I'll soon start reading it. I hope it will help for the future.

Saturday, November 16, 2013

All the coursework is done, but

Still, we have SLOG. Overall, I should say that this SLOG is good for us. We can keep track of what we've been doing and what we've been thinking. I'm not a fan of blogging, but to be honest, this was really helpful.

Friday, November 8, 2013

Midterm #2 on the way...

Next week, we're going to have our second midterm. As I think I scored a little bit low in the first exam (I still don't know what I got haha), I have to get some decent grades in this one. The problem with paper based exams in Computer Science is that you either do it the true way, or you can't do it at all. There is no grey in this type of exams. Instead of paper based exams, if we were to do it on computers, it would be a lot helpful for students. However, that's what we're going to get in the next week and we have to be prepared for it. We'll see...

Saturday, November 2, 2013

Good Tempo

I can't believe myself. It's been 7 days since I've finished Assignment Two. I really found myself at University. If this was high school, I'd do nothing until the last minute. Whatever.

Thursday, October 24, 2013

Assignment 2 and Regular Expressions

"Haha! Something new to do! I bet $100 it's gonna be on recursion again." Indeed it's about recursion however, with this new assignment, a new topic in Computer Science is introduced to us: Regular Expressions. Still not knowing what it actually is, the only thing about Regular Expressions I know right now is that to convert them into binary trees are hard as hell. For the first part of the assignment, I think I just wrote the most lines I've ever done in a computer program. Still, part 2 is waiting to be solved and I'm sure that it's going to be tougher than the first part. We'll see...

Friday, October 18, 2013

Working on Exercise #4

When I first looked at Exercise #4, I said to myself: "Boy, that's gonna be hard". However, with pages of paper and pencil work, it didn't seem as hard as it was in the beginning. The key to solve this problem is recursion, again. Since I think this course is basicly mainly on recursion, it's beneficial for us to use recursion in everything we do. So, to solve the problem, all you have to do is dividing the big problem into smaller parts and solve it.