Saturday, 21 February 2015

4: Object-Oriented Programming and Me!

So far, I feel as though Object-Oriented programming is both simple but complex. The idea and the thoughts are very straight-forward and logical, but when it comes to application, the code itself can seem quite odd. For example, when I needed to trace the execution of a queue function in our tutorial, what I thought would be the logical correct answer is not. Once I see my mistakes, I understand it and wont commit it again but I remain slightly uncomfortable with the idea; similar to accepting the idea that 2+2 = 5. You may be able to do it when it comes to applying it but it does not feel right or logical.
My mistake was in the order of which the objects are inserted, for example, let's take Q = [1, [2, 3], 4]. From what I understood, the function adds the first value 1 to the queue, then adds the value 4, then 2 and finally 3. This makes no sense to me, I imagined it would add 1 first and then dive into the second list and add 2, then 3, exit the list and add 4. In order to understand what happens better, I'm going to have to insert the queue function into the python visualizer to fully understand and see how the computer is taking and storing information in queues.

On a side note, I feel I did very well on the midterm and average on the first assignment. I hope to raise my grade in the next assignment and do just as well on the next midterm and, hopefully, the finals, too.

See you soon!

No comments:

Post a Comment