Sunday, 16 March 2014

Week 10

Assignment 1 was finally marked... about time!

I was pretty disappointed at my mark since I lost over 8% simply because I did not put type contracts in the doc-strings. A simple thing costed me a chunk of my mark. It's very unfortunate, but I will learn from my mistakes and always include complete doc-strings.

This weeks lab was quite a fascinating way of challenging the minds of computer science students. We were required to find the number of nodes in the tree that was less than a given number. The cool part about it was that we had to code this in multiple ways! 

Regarding Exercise 3, I managed to finish part A correctly, but part B was a different story.
My function instead returned the sum of the values of the path that had the largest sum. This is wrong because I didn't make my function return the sum of the values of the LONGEST path.

Nothing too special this week, but stay tuned for next weeks post, where I discuss Assignment 2 part 2!

Sunday, 9 March 2014

Week 9

This weeks lab was the exact same as last weeks, since it truly was the most difficult lab so far.
It was only after my T.A explained the main idea of how to go about coding (by drawing diagrams of LinkedLists) that my partner and I understood what to do. Although I did not completely fathom the code for Queue, my partner was kind enough to thoroughly explain the code step by step. As a result, I completely understood the lab, so thank you partner!

 Regarding Assignment 2 Part 1, I had difficulty beginning my code, just like I did with Assignment 1.
Once I understood the objective of the assignment, my fingers did their magic with ease.

To the markers of Assignment 1, hurry up! :)

Sunday, 2 March 2014

Week 8

So... the midterm.
It was fair. I understood my errors right after I finished the test. I didn't return the function call in the Palindrome question, nor did I return False as an else.
My T.A didn't lie when she said that this weeks lab would be one of the hardest. LinkedLists can get sort of complicated without the use of recursion. I suppose it will just take more practice and time to fully understand how to manipulate LinkedLists, just like recursion.
Not too much to discuss this week, but expect a lot more next week.

Sunday, 23 February 2014

Week 7

Alright, I'm not about that cheesy joke stuff. Let's get straight to the point.
Assignment 1 was long and hard. Want to know what else is long and hard? 
Finding the "best-know solution" to Step 5.
I made countless attempts to code the best solution to this step, but in the end I could not find it.
I was thinking of using a loop to iterate through all i between 1 and the number of cheeses, and then choosing the i that would return the least amount of moves, but unfortunately, I could not translate my idea into code.

Although I did not manage to find the best solution, all in all the assignment proved to be useful. I reviewed many concepts and ideas from previous lectures just by coding, and its the first time I tackled a problem in this manner.

The best way to explain steps 1 to 4 can be explained by a wise coder by the name of Lyndon:
"It's like you are given a fill in the blank test, but the blanks themselves are missing..."
It took me a while to understand what I was doing because there weren't direct instructions to guide me.
After a few hours of glancing at pixels, I managed to get on track and code away. It was truly a dreadful task, but once I made the game work, I felt this burst of joy running through my veins!
That's all for now. Peace.



Sunday, 16 February 2014

Week 6

What's good Sloggers, you know who it is...
So here I am on a Sunday night, writing this slog... what a sight.
Reflecting on this weeks lectures, i'll say Trees are 2 e z.. yeah that's right.

Trees seem to be a relatively simple topic, but the definitions that tag along with it are going to take a little more time to memorize.

I really have nothing to say about Assignment 1 since I haven't started it yet, so expect next weeks SLOG to contain my opinion on it.

This weeks lab was something new! We were introduced to brand new concepts in the lab, but instead of applying it, we had to interpret code that used these concepts. Once we understood the code, we used our previous knowledge of coding to rewrite code in our own way. This is refreshing since it allows us to understand how new concepts work, instead of blindly memorizing how to use them. The lab was at a decent difficulty; however, my partner and I still had difficulties with Unit Testing. 



Sunday, 9 February 2014

Week 5

Recur-Recur-Recur-Recur-Recursion.....
For our lab, we couldn't use insertion.
Instead, after some detailed instruction,
We were forced to use induction.
At first it was impossible to understand,
But hey... now I get it... all planned.

This week was the week I finally learned how to use recursion. After countless lessons, the time has come to use this knowledge and complete Assignment 1. I must say that I am looking forward to completing A1 because, we are finally given the opportunity to program a video game. I love programming video games since you can play the game while simultaneously testing your code, for maximum efficiency.

A good strategy I developed for testing recursive functions is to simply plug in test cases by hand and check the expected output, then compare it to the actual output. This was a useful tool for completing this weeks lab.

Not much else to say, recursive functions all day.

Saturday, 1 February 2014

Week 4

The glittery snow descended gracefully down as I walked back home with confidence. As I sat in my chair, I prepared my fingers to mash combinations of keystrokes which would result in a satisfying grade. Exercise 2 was her name...

This was the most difficult assignment I have ever done in my entire career of studying. As simple as it was supposed to be, It turned out to be a daunting task. "But why Mike, this exercise was easy as hell!"
One reason: I didn't carefully read the instructions. Only after doing so, I was able to complete the exercise with ease. From now on, I will focus on understanding what exactly the question is asking before I attempt it.

This week was full of exciting material because I finally realized the use of MAT102. Induction is essentially recursion! Although it is still quite complicated, it does make logical sense. In order to overcome this, I will read the recommended readings, and possibly some online readings from the Python website.

The lab this week was fairly straight forward (probably because my partner is a coding god); however, the unit testing was a little confusing. I particularly enjoyed this lab since the topic was entertaining.

All in all, I will improve by using the recommended readings more often, and by reading instructions more carefully.