Monday 31 March 2014

Revisiting Fib (Today)

Ahhh today, today was a good day. Not too much on the heavy end, more on the insight - thinking out of the box .
It was very interesting seeing Dan revisit the Fib function today and proposing faster ways to do this. Actually when we touched about Fib functions at the beginning of class I had the idea to use some sort of dictionary and the function would check if the value is not already saved in the dictionary before doing a ton of recursion.

But when Dan proposed no recursion and just solving it iteratively, that blew my mind. It was difficult as it requires understanding of the matrix of exponents and that using exponents is the fastest way of grabbing Fib numbers. I'm still trying it myself, but I'm not sure exactly how it'll work right now. I have an idea of what formulas to use, but not too sure on the design plan of this method

Now today's class aside, I've started studying a lot for this exam. It's hard, I'm able to solve previous problems now using a deeper insight of understanding what you need to implement and coding it. I've realize I need to break some things into really elementary steps

It's also a bit disappointing because now I see that I can in fact solve some of these problems,  there's so many potential marks missed out on...Oh well... right now I hope I do well on this exam :D

GOOD LUCK TO EVERYONE !

Saturday 29 March 2014

Exam times are coming

Fear. Probably the word the describes what most students are going through. For some (if not many) students, the exam is what may decide whether or not they will pass this course.

Now that's aside, HOW SHOULD I STUDY FOR EXAMS? Should I just practice writing code and so forth? I'm not sure exactly what to study for. Regarding the Big-Oh , it seems like it's just identifying how many loops are written into the  program. That aside, unfortunately I'll have to keep this blog short - I need to get back to studying

Tuesday 25 March 2014

TEST 2 tomorrow

A bit overwhelmed at the moment, forgot I haven't been updating the blog with my adventures into Python. Right now, I'm currently tackling some previous labs as review for the test tomorrow, learned a lot of things the past few weeks, not sure what was last mentioned - sorry! I think the biggest subject we learnt was the Big Oh. It helps a lot to understand how fast a program can do its job just by a simple glance. It really has a movie-esque feel to it - when a pro-programmer (haha) can just simply glance at a code and understand a certain aspect of it

Enough about that - recently I've been studying a lot of Python and I feel a bit down that the course is time limited. I feel with more time a lot of people can learn Python, but because of the school system it subtly splits people into two groups: the fast learners and the slow learners. That deviates a lot of people that want to learn python, but can't because of time constraints and other responsibilities.

Now as for Test 2, the topics seem okay. I remember my mistakes from Test 1, I'll keep those in mind while studying. I believe a major mistake of mine on the previous test was rushing it because i thought it was easy. So even though I had the right idea, I rushed through and didn't organize my thoughts..in the end what I wrote down ended up being a big mess.

Wednesday 12 March 2014

Recursion ... Why i still dont get it

Have my readers ever done a course called mathematical proofs, which is very instinctive, and certain things don't come together until you realize you were "magically" supposed to have realized you needed to add 2? That's where recursion comes in.

Recursion is a lot like induction in mathematical proofs: it requires a base case and everything you prove after it relates back to the base case. The difference is, in proofs we have the function (or the method in direct correlation) and in Python we don't. We have to realize what style of recursion will help us attain what we need. This is a bit hard to me, and many other students because it's hard to map out everything recursion does in our heads.

ALSO another problem I sometimes have (and maybe many other students) is that: we have the idea, we think computer-wise with the procedure, but we just aren't equipped well enough with the prowess to be able to codify our ideas. Is the only way around this to practice ?To read on many methods and techniques of each type on Python?

Leave some comments on what you guys think for once :)

Thursday 6 March 2014

UPDATE ON LINKEDLISTS... DON'T TAKE IT LIGHTLY !

So remembering the properties (mentioned in the previous lecture) with maximum number of nodes and nodes per height was pretty easy. We touched a bit upon Balanced Trees but it seemed too complex for our inferior minds to fully grasp at the moment, so it was only lightly skimmed over.

Reviewing LinkedLists like we have been doing in lab has been somewhat helpful, but it still makes things a lot more confusing. It'll take a lot of self appointed practice time to fully understand LinkedList, especially the head/value/rests part of each list. From what I understand, a LinkedList is made up of two parts,a head ( the value) and the link to another LinkedList. AlthoughI'm still not too sure... I have more reviewing to do, that's  for sure .

Now to head back to clearing up this hazy thing known as binary search tree, I bid you good luck for the upcoming exam!



Tuesday 4 March 2014

Binary Search Tree !! ... Seems Easy...

Learnt about Binary Search Tree's the other day (or BST for short) it seemed pretty easy! Left side of the tree: if smaller than the root node and right side of the tree: if larger, and I can sense using some form of a recursion step you could search through a tree for numbers pretty easily. Of course I'm wondering, if a BST is just used for numbers, how would you order and search through for items and objects ? Maybe it's not possible and a BST really is just for numbers haha !

Hmmm... I finished Part One of the assignment pretty early ... IT WAS REALLY AMBIGUOUS arghh I hope I did it right. Although there was a hint about inheritance, so I played on that hint with the classes I made-so hopefully I'm in the clear for the first part of this assignment.

Actually I'm not sure if I've mentioned this, but recently a friend helped me REALLY understand error messages- and a lot of coding has become so clear to me now. It's like a epiphany moment where everything just seems to make sense... but of course the problem then is that I lack knowledge of the general codes! I need to review! Anyways , back to reviewing until next time!

Thursday 27 February 2014

So them marks..

I hope people aren't overly discouraged by their Test 1 marks... OR OVERCONFIDENT HAHA...

I expected a higher mark, but was penalized strictly for what I realized about the minor syntax errors and little flaws. I received a much lower mark than expected-that was brutal. Otherwise, the test was fair enough. I think I should've  studied harder or made everything very concise.

Now we're moving onto nested lists..May the heavens bless us
We started ListedLists this week and i'am a bit confused on it. I'll probably be consulting some books and asking around for a better understanding of them, then I want to review all the material and my incorrect answers on the test as well. That's it for now,I'll blog more soon enough.

Monday 24 February 2014

A post before the test....

Reading week is OVER, and I'm proud to say... I actually studied a bit and finished Assignment 1 for my computer science course! (Actually learnt tons from Assignment 1-like error reading that's actually really handy debugging i mean)

Concerning the test that's yet to be written, how will we debug? How will this be marked? Are we supposed to know it 100%? That's one of my biggest worries, I personally have to debug several times before my code working perfectly without kinks, so I'll just have to study extra hard right after this post

Today's lesson on listed lists was confusing...All i can see from it was,  "Isn't this just a nested list?
" Well, I'll be sure to google around or ask the Prof in due time...

Monday 10 February 2014

Busy, Busy, Busy.....

Been busy, lots of midterms, did not forget about the blog at all. Moving on...

Damn assignment 1. It's been a handful- it taught a lot of things and made other things more confusing. It's made me very aware at how much Python itself can change over versions ... such as how global variables are labeled. It's a confusing assignment, difficult to know where to dive in and how to make your code fit. You have to make variables to fit into a program that's already written- it's all very confusing. And that's why you should start on it early! Updates as I work more on this...

Sunday 12 January 2014

First week, Polar Vortex , and the confusing terror that is OOP

To start off, I would like to explain the purpose of this blog. It was created for a class I'm taking at the University of Toronto. Entries written will describe experiences and struggles with the class. Currently, we're learning Python as you probably figured out from the title.

Now then first week, this first post will be short ... not 'cause I'm lazy but because a Polar Vortex hit Toronto, and it dropped down to -40C ..No one wants to get frostbite! ... I think. Polar Vortex though yeah...global warming ...moving on.

OOP. Ohhhh OOP . It stands for Object-Oriented Programming. Now, with some class and object background it was easy to catch on how Python works (ie. Java uses @ and Python uses self....yes i know they're a bit different)  but it keeps me sane enough to understand Python in a clearer fashion.
It was funny in lecture- we looked at Turtle: a kids mod, to learn Python. It was helpful..I think. It's not exactly an exaggeration  if I said there were many puzzled faces. Overall, I think Dan is a great lecturer.He really understands the mentality of the students and explains concepts in ways we can understand.

The exercise that i just finished this week... !@#$ spent a whole extra hour debugging something when the problem was ___init___. Three underscores is a no-no, __init__ is the right way .. sigh.
Overall it was pretty easy. But there's something I noticed with the Newton's Method part of the exercise. It's hard to think of more than two ways to approach that problem. There's really only the loop method and recursion .Since it was also stated in the assignment how the formula (program) should run, the coding will be similar across the board. So I may be wrong but I wonder if it could be a problem that there are many look -a-like programs.

Welp that ends first weeks blog...Let's see how long i can keep up these posts...
Questions and feedback will be greatly appreciated!^^

(P.S OOP isn't as scary as i made it out to be! , it's tedious at times though. Well opinions, since not all programmers like OOP in general anyways.)