This week I will be revisiting my post on First Impressions of the course. For the most part, I still feel the same as I did when I wrote the post. I've decided to pursue a minor in computer science, and I definitely still see programming as a way to solve problems in other fields more efficiently. Working on assignments could be frustrating when I could see no possible solution in sight. But every time, with enough patience and perseverance (and definitely brainstorming with peers), I was able to figure something out. And a lot of the time it was so elegant and simple that I was astounded I hadn't thought of it earlier. Learning to stick with a problem and follow it through to a graceful solution is the most valuable soft skill that I practiced in this course. One of my peers expresses this very well in his final SLOG. At one point he writes that when stuck on a difficult problem sometimes the "only pragmatic choice is to forfeit effort, and either retry later or divert attention to a different problem." This is a sentiment that I definitely agree with. Most memorably, during one of the labs, my partner and I were trying to implement the body of a function that determined the longest path length in a binary tree. We couldn't come up with a solution at all. We were stuck staring at it for at least ten minutes before we decided to take a break and work on other functions. As we were finishing the rest of the lab, we had the idea to recursively define variables to keep track of the current longest path, and update them as we traversed the tree. In taking our immediate focus off of the problem, we were able to come up with an answer that ended up being less than 8 lines of code to a problem that had seemed insurmountable.
I definitely agree with my earlier statement that I regret taking CSC108. I feel very strongly that I could've put in the effort in my spare time to pick up the python syntax. This course is on a whole other plane than 108. I've found myself thinking about problems in a new way, rather than practicing syntax in simple problems. Although, that isn't to say that I didn't enjoy CSC108. I think I much preferred the teaching style actually. The inverted classroom approach really forced me to keep up with material and engage during lecture. I felt like I was learning a lot more outside of the classroom in a way that suited me. Whereas, in 148 I often noticed myself losing attention during lecture, and even during labs. I really didn't like the weekly quizzes and performed at a much lower level than on the rest of the course work or even the tests. I should note that the strike definitely affected my experience greatly. Although I didn't particularly enjoy the labs or quizzes, they did keep me honest and on track with the material. When the strike hit, I really slacked on the time that I spent on material outside of class. I wish I had been more disciplined with myself. This course managed to challenge me, but I feel that I could have gotten a lot more out of it by doing extra exercises and working on personal projects. As I continue on in computer science, I will be making a concerted effort to throw myself into the material more. I will start personal projects and connect course material with these projects, and even other course material from my major in linguistics.
Alie's SLOG
Friday, March 27, 2015
Sunday, March 22, 2015
Impressions of Week 9
I was pretty stressed going into the test because I wasn't sure what to expect. I assumed that we would be asked to implement a few tree methods but I couldn't really predict what they would be dealing with. I'm glad that I added ordered traversals to my cheat sheet at the last minute. I had been pretty skeptical that we'd be asked about them, and hadn't spent much time at all looking them over. I actually ended up spending the most time of any question on the test just checking and rechecking the post-order traversal. I kept confusing myself and doubting my answer. Although the rest of the test was straightforward and I felt confident in my responses, I was pretty disheartened by how much I struggled with the traversal. It made me feel like I still don't quite understand recursion, especially with regard to trees.
It really felt like there was no material covered at all this week, especially without the lab and with the 20 minutes lecture. However, I did feel that it was important that I came to understand the static nature of trees. I don't think I had realized before that once a node is in a binary search tree, it does not move from its place, even when new nodes are inserted.
It really felt like there was no material covered at all this week, especially without the lab and with the 20 minutes lecture. However, I did feel that it was important that I came to understand the static nature of trees. I don't think I had realized before that once a node is in a binary search tree, it does not move from its place, even when new nodes are inserted.
Sunday, March 15, 2015
Impressions of Week 8
This week’s lecture focused on a new data structure: the linked list. A linked list contains nodes that carry information about themselves, and the nodes following them, and we can package these nodes together using a “wrapper” to represent the linked list in its entirety so that it closely resembles a list structure. There are two ways of understanding linked lists. The first is each node contains a link to its next node, as if it were a train of elephants holding each others' tails. And the second is that each node contains the list of all the nodes to follow it.
I found working with linked lists to be finnicky. I always had to keep in mind the attributes of the node class and the wrapper class, and be careful not to "walk" over a node and not be able to access its information anymore. For this reason, I'm currently unsure as to why I would need a linked list. I enjoy learning about these new data structures, but I wish that I were taught some applications of each one. Until then, I don't foresee myself building a linked list into any of my programming projects.
Sunday, March 8, 2015
Impressions of Week 7
This week was spent learning about binary tree structures. Everything was fairly straight forward and easy to grasp. I really like the idea of binary search trees for organizing information. At first it seemed a little chaotic, but I think that's just because I'm so used to things being organized linearly. It's always a little frustrating when class time gets eaten up discussing the assignments, but I did get some useful tips.
Sunday, March 1, 2015
Thursday, February 19, 2015
Object Oriented Programming
All my programming experience has been with object-oriented programming, but I don't think I ever understood quite what that meant until learning about objects formally. And I'm sure that I won't have a complete understanding until I gain more experience with other programming paradigms like functional or declarative programming.
In object-oriented programming, different objects of different types interact with each other to store information and solve problems. Objects can be of different types to allow them to be best suited to their specific task. There are types built in to Python already (int, str, bool, etc.) or they can be created using a class.
For example, continuing with my previous discussion of a mental lexicon, we can create a class "Lexicon". To reiterate, our brains' file words into our vocabulary as if they were dictionary entries containing several specific pieces of information, and we refer to this dictionary as our mental lexicon. It will include information like pronunciation, subcategorization (possible complements), and meaning.
So, we know that this class will contain objects that are words, and that these objects will contain pieces of information necessary to be able to understand and use these words grammatically. We will first write an "__init__" method to initialize instances of class lexicon. In this method we can define several necessary parameters to add a word to the lexicon, such as meaning, pronunciation, and category. The "__init__ " method is one of several special class methods that can be accessed using specific syntax, some others are "__eq__", "__repr__", and "__str__".
Now that we have created this specific lexicon class, we can create subclasses that inherit its traits and expand into even more specific functions. For example, we could have a class "Synonyms" that stores alternate meanings of words, or a class "French" to use our lexicon with a different language. These subclasses would not only be able to inherit from the superclass "Lexicon", but would also be able to extend and overwrite its methods. We can see how being able to create such a specific type of object would greatly improve our efficiency in solving problems pertaining to language.
In object-oriented programming, different objects of different types interact with each other to store information and solve problems. Objects can be of different types to allow them to be best suited to their specific task. There are types built in to Python already (int, str, bool, etc.) or they can be created using a class.
For example, continuing with my previous discussion of a mental lexicon, we can create a class "Lexicon". To reiterate, our brains' file words into our vocabulary as if they were dictionary entries containing several specific pieces of information, and we refer to this dictionary as our mental lexicon. It will include information like pronunciation, subcategorization (possible complements), and meaning.
So, we know that this class will contain objects that are words, and that these objects will contain pieces of information necessary to be able to understand and use these words grammatically. We will first write an "__init__" method to initialize instances of class lexicon. In this method we can define several necessary parameters to add a word to the lexicon, such as meaning, pronunciation, and category. The "__init__ " method is one of several special class methods that can be accessed using specific syntax, some others are "__eq__", "__repr__", and "__str__".
Now that we have created this specific lexicon class, we can create subclasses that inherit its traits and expand into even more specific functions. For example, we could have a class "Synonyms" that stores alternate meanings of words, or a class "French" to use our lexicon with a different language. These subclasses would not only be able to inherit from the superclass "Lexicon", but would also be able to extend and overwrite its methods. We can see how being able to create such a specific type of object would greatly improve our efficiency in solving problems pertaining to language.
Friday, February 6, 2015
Tracing Recursion
I found the lab on tracing recursion to be quite confusing. This is probably a result of having been sick during the week's lecture. I read quite a few summaries of recursion from various resources, an felt confident in my understanding of the concept. But when it came to actually tracing function calls, my understanding felt like it was crumbling. I was confused by when to retrace and when to reference a call that I had already traced. And in this confusion I started to question whether I actually understood how recursion worked.
After the lab, I looked over the practice examples and became comfortable with the format. I also talked over some problems with my friends and regained my confidence with recursion. This particular topic seems like something that just requires a little time to wrap your head around, before it can be understood with ease and immediacy. I'm excited to explore the power of recursion in creating efficient solutions to problems. Even the basic example of using recursion to sort a list quickly, got me stoked to get deeper into the topic.
After the lab, I looked over the practice examples and became comfortable with the format. I also talked over some problems with my friends and regained my confidence with recursion. This particular topic seems like something that just requires a little time to wrap your head around, before it can be understood with ease and immediacy. I'm excited to explore the power of recursion in creating efficient solutions to problems. Even the basic example of using recursion to sort a list quickly, got me stoked to get deeper into the topic.
Subscribe to:
Posts (Atom)
