2013년 10월 26일 토요일

Nodes, Tree Nodes, Binary Nodes, N.O.D.E.S, Assignment #2

Looking at the SLOG topics suggested,  something new I learned from this week's class is Nodes.
But then, what's something I enjoyed in this week's class? Learning to use BTNode class reducing the effort to repeating the lists, probably.
As I said in the previous entry.. (or maybe not :P) the nodes are a way to represent linked lists, at least I think it seems like it to me. Thus, Nodes may entail recursions with a high probability in the codes.
Now, what is something that challenged or frustrated me this week? I don't get it O_o I don't get it, I don't get it!
Okay, maybe I'm just not so familiar with the structure yet.. I really really need to go to the office hours a lo from now on.
Even when I was working on the assignment, it took me a long time to figure out what the assignment actually meant! (although professor already indicated that it will require some time to understand the contents first)
I hope this assignment can be done perfectly..
Last time, I was so frustrated because I was the only one working on the assignment and even worse, the starter codes I had had some differences from the others'.
At least now I received some other students' assignment #1 to refer to what I have missed after the assignment due date, I understand that it wasn't something that I could do by myself.
So I decided to visit the office hour from this week, maybe the help centers as well.
Cross me fingers so that I can finish this assignment with my partner thoroughly!

2013년 10월 19일 토요일

Midterms!!

After taking the midterm for CSC148....
I felt so miserable for making such a stupid mistake!
I copied down the method implementation and executed it after the midterm..and...
I knew the min() function was supposed to return the tuple with the smallest number in it, starting from the first value in the tuple.. (well, actually I was half sure..haha)
I didn't have to look for a certain logic or a rule in the outputs! (thinking too many steps ahead always had been my problem!)

But guess what!
I thought Nodes will be covered in the midterm, but they weren't in the midterm!
I still don't understand why Nodes are so important, but they sure are some cool structures as many values can be inside one item, although we only learn binary node in CSC148..
But thanks to that, we don't have to go through so many None values inside the Nodes, they are truly annoying to type all in..

However, after taking this course, I hope I get a better understanding in the computer science, not only the Python. (To be honest, I think I am starting to understand quite a lot already! :D)

P.S. It was shocking that we weren't provided with the built-in codes.. I should have realized it when the professor said a sheet of notes will be allowed as an aid.. but the codes are just so vast!

2013년 10월 13일 일요일

First SLOG topic assigned

The first topics assigned from CSC148 before the long weekend are Object-Oriented Programming, and Recursion.

One reason, and probably the main reason for assigning these as topics is that they all are the characteristics of Python. Object-Oriented Programming is a way of programming using  objects rather than using instructions. For example, Python codes a class object that has certain attributes and methods under itself. In such way, it allows the programmers to develop, edit, and easily analyze the program as the objects are independent from other objects, yet dependent on what belongs to itself. As an object, we can analyze and look over the whole thing while we can still separate each objects to spot the errors. Imagine us programming in a non-Object-Oriented language, it would probably take us a huge amount of time to think on how to structure it out to start working on it.

Then it comes to Recursion, which plays a critical role in programming to make the codes as neat and simple as possible. Recursion is a method of calling the function in that function itself. When we program something, we frequently encounter a task to repeat some steps. This is where the Recursion comes in handy because it allows us to simply call the method itself inside that certain method to repeat itself. Although it is hard to come up with the way to use Recursion for beginners, every time I see the codes that uses it, I am amazed at its structure because the codes can never represent the task any better.

If I had known that I had to post on this blog although there were no topics assigned, I probably have written down about the lab 4 last week. It was a task about coding a binary representation, calculating the decimal number to a binary number. It involved steps of dividing the number into 2, adding the remainder, and then calculating from the number we have left after dividing it. We can still code this with a While loop or If statement, but with Recursion, this code ended with one sentence.



P.S. Happy Thanksgiving! XD