Wednesday, 9 March 2016

SLOG Week 8



My struggle confidently to use the basics of CSC148 is still not all there, yet. I have a lot of problems with the speed of my coding. But I have been getting better with fast(er) implementation of builtins and bare-bones code for classes, like __eq__, __str__, etc. It is just the process of breaking down the programs themselves... the actual responsibilities of major attributes that I feel like I am still doing in long, roundabout, error-prone ways. Despite all this I found a good analogy to conceptualize classes with! I've been reviewing stuff from CSC108 and earlier in this semester about classes and stuff and I thought that the image of a rhizome portrays a lot of the characteristics of object-oriented programming. Excuse the following rough analogy.
 


If you look at the way the root system forms, I think it shares a visual likeness to subclasses and instances of class. Say each plant that sprouts out of the ground is some kind of output, there are many other inputs (of water through the roots)which feed different sprouts varying amounts of the input of water. The rhizome in and of itself is all one connected instance of the plant. Anything connected to that plant would also be an instance of it and would serve different parts of the plant in different ways (depending on it's relative proximity to other sprouts or root systems.

It's not the best analogy but it helps me kind of mentally compartmentalize the increasingly complex ADT's we are working with... It is classes and the objects that can influence so many different parts of a program and it's sometimes hard to see how their responsibilities overlap vs work together. My partner and I disagreed with something like this with her understanding of what the container class does in RideShare's Container class. She assigned more helper functions to complete some relatively simple code that was meant to organize the actual container itself and change the priority of certain events over others if and when say, a cancellation happens prior to a driver picking up a rider. We had trouble understanding whether the conditional circumstances where priority would/wouldn't be raised/lowered could be recognized in the simulation class without the use of my partner's helper functions in container.
Alas we've handed it in and it's over now anyways so it's just a waiting game now.

Adios

j

No comments:

Post a Comment