Week of January 29th, 2014: Exceptions, Assert, and a1
I'm super stoked for assignment 1; after reading up on the TOAH I've been curious on how to program the 3rd stage in such a way that the code can find the optimal solution, but I still have to look into that. Right now I'm supposed to implement the actual game loop, and while I understand and can visualize the control flow in my mind, I am still somewhat uneasy calling things from the TOAH.py. But I hope to figure that out as it develops.
I also really liked this week's lab; unfortunately my partner and I got much too carried away with testing (we literally wrote tests for every possible case) and hence couldn't do the second half of the assignment, which I wanted to see as it also gave a more intuitive way to think of OOP. The definition on the open source website really fascinated me as it said while other programming languages write an explicit function/definition for things, OOP makes these a part of an actual class; for example in my kitchen I do not think of an individual "toast" procedure but rather conceive of it as a part of my toaster. For me this is somewhat shocking as I've learned all previous languages with a counterintuitive, somewhat 'untrue' conception of how to program and implement operations (in the sense that I see now reality is closer to OOP). So to see that Motorcycle class inherits from the original class was very cool for me, and it also resolved my previous problems with inheritance, classes, and subclasses. So again, it's a shame we didn't get to it ! We both vowed to ask our TA earlier next time.
In any case, I am also very curious to see where OOP implementation would be preferable to non-OOP implementation in the real world, especially in anything related to statistics or finance. From what I've seen, R is very popular for any economic analysis, while python's ability to handle text is very advantageous. But what about other applications, especially regarding big data ? I will investigate this as the semester goes on.
Anyway, onto a1. Should be cool !
I'm super stoked for assignment 1; after reading up on the TOAH I've been curious on how to program the 3rd stage in such a way that the code can find the optimal solution, but I still have to look into that. Right now I'm supposed to implement the actual game loop, and while I understand and can visualize the control flow in my mind, I am still somewhat uneasy calling things from the TOAH.py. But I hope to figure that out as it develops.
I also really liked this week's lab; unfortunately my partner and I got much too carried away with testing (we literally wrote tests for every possible case) and hence couldn't do the second half of the assignment, which I wanted to see as it also gave a more intuitive way to think of OOP. The definition on the open source website really fascinated me as it said while other programming languages write an explicit function/definition for things, OOP makes these a part of an actual class; for example in my kitchen I do not think of an individual "toast" procedure but rather conceive of it as a part of my toaster. For me this is somewhat shocking as I've learned all previous languages with a counterintuitive, somewhat 'untrue' conception of how to program and implement operations (in the sense that I see now reality is closer to OOP). So to see that Motorcycle class inherits from the original class was very cool for me, and it also resolved my previous problems with inheritance, classes, and subclasses. So again, it's a shame we didn't get to it ! We both vowed to ask our TA earlier next time.
In any case, I am also very curious to see where OOP implementation would be preferable to non-OOP implementation in the real world, especially in anything related to statistics or finance. From what I've seen, R is very popular for any economic analysis, while python's ability to handle text is very advantageous. But what about other applications, especially regarding big data ? I will investigate this as the semester goes on.
Anyway, onto a1. Should be cool !