int(elligence) CSC148 blog
Friday 4 April 2014
Week 13
This week was relaxing. No labs, simple exercise and only one class that contained new content. The only problem I came across dealt with part B of E4. I tried returning the max value of the BST tree, but the auto marker outputted failures. I changed my code to instead return the max BSTNode; however, the auto marker did not run for me to ensure this is the correct way to complete this exercise. This was fun, I'm out peace.
Sunday 30 March 2014
Week 12
Test 2 didn't quite go as was planned... I did very poorly.
For the is_plex problem, it was very difficult for me since my is_regex was complicated to begin with, so it was really hard for me to do this question. I had so much code that covered the entire page! For instance I would delete all trailing +'s. As for LinkedLists, I REALLY have to review and completely understand this concept if I plan to do well on the exam.
To boost our self-esteem, this weeks lab was a joke. It consisted of us copying and pasting times into excel. As simple as it was, it proved to be useful because it allowed us to compare the speeds of the different types of sorting. I can conclude that Bubblesort is the slowest, and the build-in sort is the fastest. If I ever have time, I'd want to look into the build-in sort code to see exactly why it is the fastest. That's it that's all folks, see you next time!
For the is_plex problem, it was very difficult for me since my is_regex was complicated to begin with, so it was really hard for me to do this question. I had so much code that covered the entire page! For instance I would delete all trailing +'s. As for LinkedLists, I REALLY have to review and completely understand this concept if I plan to do well on the exam.
To boost our self-esteem, this weeks lab was a joke. It consisted of us copying and pasting times into excel. As simple as it was, it proved to be useful because it allowed us to compare the speeds of the different types of sorting. I can conclude that Bubblesort is the slowest, and the build-in sort is the fastest. If I ever have time, I'd want to look into the build-in sort code to see exactly why it is the fastest. That's it that's all folks, see you next time!
Monday 24 March 2014
Week 11
Assignment 2 is finally completed! In my opinion, the overall difficulty of Assignment 2 was easier than Assignment 1. I managed to write the type contracts without forgetting like last time :).
Labs on the other hand were very difficult and puzzling. I'd say this weeks lab, which combined LinkedLists and binary search tree, was the hardest lab of all of my computer science career. Most of my fellow class mates can agree with me on that one, since the TA had to step in and explain how to do it with full detail.
I'm a bit worried about test 2, since I'm not very comfortable with LinkedLists. I need to use my remaining time before the test to have a better understanding of this concept in order to do well. We'll see how it goes!
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! :)
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.
Subscribe to:
Posts (Atom)