Thursday, 31 March 2016

SLOG Week 12



To conclude this semester's SLOG entries I thought i would take some time to discuss what i believe to be the biggest emphasis of this course: algorithms...




even though I don't fully understand recursive functions and how to implement every function, I find it so fascinating how algorithms can try and solve our biggest problems working with data in such simple ways. Before this course I doubted the true scientific-ness of computer science and thought of it more as a pseudo-science similar to linguistics... It would be a bunch of human logic that is translated into a language (in this case: code, and in the case of linguistics: syntax trees, morphemes, etc), and while that is true and is one of the reasons that I find my study of Linguistics to be much more akin to a human communication... computer science is much more closely related to logical communication between constantly proliferating complexities of code. What i mean by that is that while language is constantly evolving and changing, it is only doing it within the limits of human ability to communicate the language... which is decidedly limited and fixed. As one delves deeper and deeper into a language, their experience with acquiring lexical and syntactic and morphological ability in that language is mostly able to be anticipated.

Chinese has a huge variety of writing variations of different characters that can change quite arbitrarily with and often times without much regard for the constituent parts that make up the word/letter. There are many many many rules that cannot be broken or else risk the possibility of being unintelligible. The difference with computer science is that the possibilities for constructing something meaningful is bound only but the speed of hardware/software and big-Oh notation... Computer Science has the ability to keep reinventing itself and building itself on top of what is already there in order to make communication of information faster and more efficient. The range of possible ways to complete a task is almost infinite in code as the rules are constantly being rewritten by emergent technologies, faster computers and more advanced code. Computer Science has the ability to infinitely recurse itself into perpetual superiority over older code whereas the study of a science like Linguistics is limited by the errant, unpredictable and difficult to describe rules that make up hundreds and thousands of individual languages (rules that change much more slowly and in less recursive ways than computer science does.) Language is usually a descriptive act of describing the things that make sense to us in a way that makes sense to us. Computer Science is a bit different in the way that code is built to communicate logic rather than human language...

Most of what i've just said is me talking myself into better understanding computer science, a kind of schizophrenic self-directed babbling. I see know how important it is to consider all component parts of a program before implementing code. While I hope that one of the distinctions you were able to get form what I wrote above was that comp sci is evolving faster than linguistics is, they are so similar in how they change and adapt to the contexts in which they are needed to perform tasks. Language is so vitally important and I'm glad to have had the exposure i have had communicating in object-oriented code. It inspires me to continue down the road of computational linguistics to write code that can better solve the inconsistencies with human language in the technological age, ie: autocorrect technology, and translating. Comp sci is vying on catching up with the constant changes within language and represent them accordingly in computer programs that are better able to serve the language user's linguistic queries on technology.









the end









SLOG Week 11




So I weathered the storm of recursion. My marks are sure to take a hit form this past assignment and form the last test but oh well, im glad that we have been moving away from all this now. Moving into Big-Oh.. I am anticipating my falling in love with comp sci theory in this sense of run-times, Big-Oh and efficiency as I have been watching a lot of videos on searching algos and have had a personal interest level with this aspect of computer science for quite a while now. I came across this talk that Facebook's Mark Zuckerberg did at Harvard where he draws upon the importance of these concepts in the creation of large websites, etc.



My overall conceptualization of computers as being subject to scientific laws is beginning to solidify around the importance of keeping a good perspective on what duties code is meant to perform and the efficiency of code. Some applications of code in facebook is mostly organizational, forever compartmentalizing information into large swaths of indexable and searchable information. The discussion of logarithmic run time and recursiveness as being some of the purest measure of code has helped me realize the strategic and hierarchal nature of computer science. That certain implementations of code are more pure, efficient, dominant than other forms. It is such a huge challenge to constantly keep these things in mind but is slowly exposing itself to me as being just as interconnected and interrelated of a science as any traditional life or biological science, etc.



while i truly do love computer science I feel like my straggling behind the rest of the class's weekly content has finally caught up with me and i am no longer on top of (if I ever was) the topics. On a very basic level I see how everything works together but don't entirely knwo how to explain it in every given situation.

J

Wednesday, 23 March 2016

SLOG Week 10



Now that the exam is over I turn my attention to the project. I am on one hand invigorated to take on the challenge of implementing the Puzzle and puzzle tool superclasses but on the other hand am completely terrified. I still don't understand the SENSE in which depth first and breadth first searches are recursive and don't know the best way I should be thinking of their creation of different orders of the subsequent extensions in the Sudoku, MN, PegSolitaire, and WordLadder instances of puzzle class. I am not really comfortable with the drawing out of recursive calls but moreover don't really understand how one would arrive at a is_solved solution faster or slower than the other. I SEE how they iterate but feel overwhelmed by the context in which it will iterate in certain instances of the puzzle class. The implied reflexiveness of recursive superclasses necessitates a large amount of understanding about how the subclasses/instances of superclass works... there are so many references to __eq__, __str__ and other conditional helper functions that I can't keep track. For days i've been trying to draw out a flow chart like i did for the previous assignment for RideShare where I was able to show the passing of objects between classes by drawing a diagram.







I had origianlly drawn this for the RideShare program to better uderstand how the information all connected and I think it helped me quite a bit!

Alas I still dont know how I could draw this program... I am trying to write the __repr__ for depth and breadth right now, and while it helps visualize iteration it doesn't fully explain the way in which this will yield correct extensions faster than with the other given the puzzle instance in question.... arrgghh idk...

Onward and upward..?

J

Wednesday, 16 March 2016

SLOG Week 9




I'd be lying if i said I wasn't afraid of this test. I don't really know what to expect as the first test emphasized writing so much that i imagine this one won't focus on writing much at all really. Function writing and class implementation/ recursive functions are what I have been practicing most.

I still do not feel like classes are an extension of my communicable abilities w/r/t coding... I thought that it might come as quickly as it did in 108 where we could quite quickly master the basics and keep building on our knowledge in leaps and bounds. Alas I still don't fully "get it" and am scared that I will do the parts of the test that deal with recursion, completely wrong. I find it bewildering to manually trace out the recursive call based on how i've made my code... a lot of times I try and just write something and hope that it works. To say that I have been relying on examples too much would be an understatement. While I really do understand the concept of recursion I really don't understand how to represent the operations I need performed in a recursive way... I keep reverting back to simple class implementation rather than advanced, cleanly made recursive classes.
I wanted to have a kind of phantom-limb ability to code by this point, that is to say that I wanted to be able to intuitively settle into any sort of program design with a set of steps that I am able to follow and more efficiently work through the instances of classes, subclasses and make them all interact together in a meaningful way. The recursion seemed like it would be too difficult to fully grasp right form the get go but I didn't realize it would take this long before I understood it.




When I see the characteristics of a program, and the code structure that would need to exist in order to have it be created I wanted to have an instinctual reaction like in the phantom-limb image, above. When I see data that is meant to be hierarchically organized I want to instinctively know that this or that subclass or helper method should be implemented in order to have the overall goal be achieved. The heavy emphasis on Trees, Linked List, etc really asks a lot more of our intuitive understanding of the node class, data types when breaking down how these ADT's into smaller manageable, clean code.

I hope next week i'll make some more progress

J

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

Thursday, 3 March 2016

SLOG Week 7



This RideShare project >= the most fun project i've ever done and

school_career.max(stress) == school_career.current(stress)

It was challenging and completely impassible at times but i've managed to finish and become inspired by this project
As I was working on the RideSharing program I came to a realization of how my true comp sci passion of computational linguistics is relevant to what i'm learning with Abstract Data Types and the types of programs we're to implement in the RideShare program. I have always had a keen interest in how some grammar pattern would be able to be coded in say Google Translate, for instance. I find the design process of ADT's fascinating in how you essentially build the rules of language constantly off of other patterns within that language and other infinitesimal numbers of conditional situations... kind of like with how we were meant to make the event class communicate with dispatcher, and simulation then execute subsequent function calls that are the result of previous function calls. The systematic nature of a program of this size and scale was very challenging but I think that my ability to understand is contingent upon mere familiarity through practice. There was never any time (except the very end of the debugging of a minor inconsistency with the average ride time in the monitor / simulation classes) where I felt like the material was out of my ability to code. But to do it well and quickly was out of my abilities, especially thinking in terms of inherited, extended, and overriden methods in multiple classes.
We learned about sorting algorithms in CSC108, such as insertion sort, merge sort, selection sort, etc. This week we learned about binary trees and traversal. It makes a lot more sense to actually see this data visually than it is to have it explained in the handbook and even in lectures sometimes. especially with learning about PRECISELY how levelorder, or postorder etc, works.. it only makes sense to me if and when I practice iterating through examples manually (on paper). CSC108 did a better job of utilizing visualization for search/sorting algos...

Till next time,

J