As excited I was to write the first test, I was lucky that someone pulled the fire alarm. It looked to me like the test was expecting us to have coded quite often and be fast with writing and this was not something I was comfortable with. This all emphasizes the need for language-esque practice practice practice. Practice makes perfect!
I felt like if I had written the test I would have neglected a lot of python syntax legality when implementing different functions. Things like __eq__ methods, while on one level all they are doing is creating equality parameters for class objects... on another level the way they are designed is not vert natural to me. __str__ methods are completely straightforward, but it's just a kind of reverse-thinking to how I would code some sort of condition
if ____ == _____ :
< function >
then the rest of the task that you would want to code would be just go below an if and all execute in a big bulky one function heap. I thought that's what computer science would be more about was just more of what 108 taught us. It is still a challenge to think in an object oriented way sometimes. Sometimes I think of it like a living things, that crunches data by using many distinct classes that work together to complete an organized Tree-like network of interdependent and interrelated classes. But to think of them as functions, of functional pieces of machinery is a whole 'nother ballgame. Everything from the meta and how to define how programs 'handle' data they are given... to the many layers of interdependent micro code that builds the larger program, and properly designing the classes accordingly.
Small breakthroughs this week as im starting to understand the Matryoshka doll analogy for recursive functions! The reading we did this week for List Comprehensions is this perfect image of this kind of infinitely iterating simulacrum of function calls within some range or condition. I feel like it is easy to understand recursion for list comprehensions largely because of the fact that they are List and are collecting relatively simple information. The turtle recursion for drawing trees recursively is totally fascinating, it can produce something like this:

or this

from the same basic recursive turtle principle as what is used to make this

and eventually this...

and so on....
This is really interesting and I feel l like I know how to do it if im given a partially pre-assembled program that has helper functions instatiated. I still struggle with the fluency I feel is needed to quickly and efficiently assign object oriented classes to perform certain tasks. I'm getting there.
The assignment is very complex to me. The node-based, container class and recursive and helper functions all come together in a hugely complex but also complicated bunch of confused connections. I have been asking my partner a lot of questions about how the container works and just generally how the information is being passed around. As usual it isn't too too far out of my capability to do the whole project but it is very much an issue of efficiency as my style of implementation is to keep chipping away on the things I think I know how to do but I always have to keep going back to edit and adjust functions... wasting so much time coding in circles
Slowly but surely,
J
No comments:
Post a Comment