Readers,
It is my fault that I did not make known to you the purpose of this blog...
The FlyingFish has been too eager diving into the ocean.
Now that I'm in the air, I have a few seconds to talk about it!
I am currently undertaking a course by the name of Introduction to Computer Science(CSC148).
This blog(or SLOG) is to record my journey, whether filled with failures or success.
An important note is, it is highly likely for this blog to continue beyond the timeline of this course, as the author is discovering the joy of blogging. :)
Back on Topic: My Feelings about the first few weeks of 148
Well, I am very glad that I get to talk about my own thoughts of the class!
Coming from 108, I find 148 to be a very different course. In 108, we were fully armed with the tools needed, and all that we need to do is synthesize. From videos to lectures, I seldom find myself lost on the crossroads. Assignments grow in size and difficulty, but I always find them manageable.
However, to be honest, after the first class in 148, I was engulfed by uncertainty.
In class, more abstract ideas are discussed, as opposed to how such ideas should be implemented. There are many ways of implementations, but they all belong to that idea.
For instance, we can use composition to use a class in another, but we can also use inheritance to foster that connection. As to how to structure classes and their relationships, it is up to our judgement.
Sometimes, especially for me, it can be very hard and time consuming to figure out which class should inherit from which and what should the overall structure look like.
In Assignment 1, I misinterpreted the instructions and ended up having two gameview classes, with my specific gameview implementing the SubtractSquare game. In other words, my main focus was on gameview rather than game state.
I thought I was doing the right thing, until I discussed more with one of our group mates. Hence it resulted in hours of chaos(not the chaos from chaos theory) and frenzy to fix the code. In the end, we managed to complete our game state and reform other classes.
While working on the assignment, I experimented with "mutual inheritance" between two classes.
For instance, here is an arbitrary example:
Module HappyFace.py:
from SadFace import SadFace
class HappyFace(SadFace):
''' A confused face.'''
def __init__(self):
SadFace.__init__(self)
Module SadFace.py:
from HappyFace import HappyFace
class SadFace(HappyFace):
''' blah blah blah'''
def __init__(self):
HappyFace.__init__(self)
Unfortunately, the running of the programs resulted in errors. Hence I conclude "mutual" inheritance is not allowed. But wouldn't it be cool(and perhaps useful) to have lots of classes that inherit from each other?
------------------------------------------------------------------------------------------------------------------------
Overall, I think 148 is a very challenging class. To resolve my confusions, I have to dig more into the readings and watch more videos from previous sessions!
---------------------------------------FLYINGFISH's FINISH LINE--------------------------------------------
See you next time!
EXOCOETIDAEE.BLOGSPOT.COM



No comments:
Post a Comment