Sunday, 27 October 2013

The second assignment.. CLEARED

So I got home on Friday, relieved that midterms are done, I go and check the course calender and there it was.. the link to our second assignment was posted. All thoughts of relaxing for the weekend soon evaporated from my brain as I dove into the problem head first.

To my relief the second assignment seemed extremely easy, like REALLY easy. I mean come on, 4 steps? Two of which are writing your name and submitting it? After some quick prototypes of the code had been made that evening, I went to sleep and once again code filled my dreams. It was almost as if the problems seemed to solve themselves. The first thing I did when I awoke Saturday morning was boot up my computer. I began to type rigorously lest the solutions born in my dreams faded away. Time just seemed to blow away, by 11am I had finished the entire first part of the assignment.

Brunch Break.

Now for the second part of the assignment.. type type type...........

.....
...........
......................

Finally at 11pm I realized I had just starved myself in order to finish the second part of the assignment.

Instant Noodles, Yum.

3am, twitching, sagging eyes.. still working.......

5am, fast asleep in front of my computer

...............

8am, I awake. I take a quick look at my screen and realized that I had finished the entire assignment. I close my eyes, Zzzzz..... back to sleep I go......

Friday, 18 October 2013

Midterm, problems I had, solutions I should take

The midterm.. it was definitely something different.

Problem: First of all a major problem for me during the midterm was getting used to not being able to press backspace if I made a mistake. This resulted in a rather messy paper from me as many lines of code were crossed out in pen.

Solution: In preparing for the final exam(assuming it's like the midterm) I feel like instead of coding on a machine it would be better for me to practice 'coding' on paper. In doing this I hope to increase my consistency in getting it right the first time.

-----

Problem: Following recursive functions is hard, this became painfully apparent at the very first question on the midterm. It just required me to follow the function way too many times, this resulted in my brain exploding.

Solution: I can't really think of any easy solution to this problem, maybe just practice with recursion more perhaps? If anyone has any ideas on what I should do to fix this, input is always valued.

Saturday, 12 October 2013

O-O-Programming + Re(Re(Re(cursion)))

From what I have learned so far, object orientated programming is focused around the creation of 'objects' and the manipulation of these 'objects'. When creating objects, programmers try to focus on combining a useful way to store their desired data while at the same time ensuring that when needed, that data can be easily accessed. Objects also serve as representations, they can represent a certain type of data and as such, valid operations can be used on objects so long as the programmer who created the object intends it to be used in that way. I feel that by giving the programmer the ability to create objects is an immensely strong tool that computer scientists have. This allows the programmer to create abstract representations of things that he would have otherwise had to use built-ins to represent. An example of this could be a simple point on the x-y plane. Now think for a moment, how could you represent a point without creating a point object? Maybe a list of 2 elements? A tuple perhaps? Neither of those have build in functions that can calculate the distance between two points or any other operation that may be useful to use on points. No matter how you look at things a point object in this case would definitely be easier to use.

Now.. recursion..

The idea of recursion was hard for me to get used to at first. Using a function itself in its own body? That made as much sense to me as the end of this sentence banana chicken pie. However, as I got used to the idea of recursion, I've discovered that it opens up a whole new window and maybe even a door or two. After realizing the power that recursion had to offer I decided to embrace the idea. With recursion, working with naturally recursive objects became a lot easier, nested lists is a prime example of this. After working with recursion I feel that I've picked up a bad habit, that is I try to see any problem as a recursive problem even if it isn't.

Tuesday, 8 October 2013

Fall of the Cheese

Last night I was finally able to crack the problems I had with assignment 1. Most of the work has now been completed and now all I have to do is touch up the code and polish up the comments. It definitely feels good to have completed this task after hours of solving the problems my code had.

When you press that run button and realize that everything works properly, the feeling you get is simply exhilarating. I feel like I could take on an entire army of cheese people without fear now. After putting the finishing touches to the code I think tomorrow I'll work on Controller.py. I slept so well last night, not a cheese in sight.  

Thursday, 3 October 2013

Seeing Cheeses

After spending quite a bit of time working on assignment 1, I've managed to get a good way through it up to steps 4 and 5. However the consequences of my actions are becoming apparent as I am now beginning to see the code that I've written in my dreams alongside floating cheeses and stools. I think this is a sign to take a slight break from thinking about cheeses and stools and perhaps think about other things such as exercise 3.. or maybe I've just been seeing too much code recently.