I don't think my feelings have changed regarding recursions, that is to say, it is interesting but infuriating sometimes.
With recursions, practice really makes perfect, and I feel that I am getting a lot better at understanding the flow of it. I think that is the case with many other students as well, as I take a look at other students's slogs. Trees have been quite interesting, and i said earlier, it reminds me of the Tree of Knowledge. I wonder if Google uses this type of model to organize their search engine, since it seems to know everything!
I feel that the course slogs have not helped me at all. I know that the intended purpose of the course slog is to allow us to reflect on what we have learned, and perhaps make connections with real life, but in my opinion, it is hard to reflect upon it when neither Diane nor Danny give any indication of what these things relate to in real life or how it affects our lives, etc, and I am not really a computer savvy person so I did not bring with me any real own knowledge of the science. The other thing that the slogs are for is to get us to write and practice writing, but the problem I have with this is that I do not feel comfortable to express all of my ideas on a public place, and my mode of expression feels somewhat artificial. Given the circumstances, I do not feel like I am enjoying writing more at all. I had stated in my first slog on why geeks need to know how to write, but the type of writing I was talking about is exceptionally advanced, i.e. research papers, but those things require an entire separate course pretty much to learn. I would argue that geeks would need their own english class!
I have read some other slogs, and some people comment that writing helps to get our ideas on a function out to help us plan what we are doing, and I totally agree with that, but I think that, personally, I can already do that, so the slogs do not help me in this respect even if it helps others.
Now, i personally understand the the concept behind writing down out thoughts, I do it personally all the time in my private journal. It certainly helps to reflect upon our ideas, as this helps contribute to our overall understanding of a problem. By keeping record of it, one can go over it even if one forgets the original idea, and the combine that idea with whatever is in our head at the present time and see what manifests inside our think tank, as mentioned in the previous paragraph, I don't have own knowledge of compsci and the lecturers do not go over the history of compsci or anything to give us a deeper understanding of how it affects our world, so to stimulate our own perception of compsci. I could certainly guess how it affects us, like my example on Google, but guessing is just that, a guess.
This week, we learned about Big O and time efficiency. Luckily for me, I have learned that in 165 and so understanding it was easy. I have not gotten a chance to practice the worksheets as everything has been so hectic, but I really enjoyed doing Big O in 165 as it was very fun to do proofs. Time efficiency was difficult for me, as it requires understanding the function and coming up with a function for generic value such that the function calculates the running steps required for the function to execute.
Sunday, 5 April 2015
Reactions to Week Seven
This week we get to practice with more trees, we learned about Binary Trees and practice recursions.
The worst thing is that the I find recursions so difficult. I mean, during the lab, it took me over an hour to implement list_longest_path. I think the problem is that I have not gotten the hang of it, because I notice other students and they seems to be fine, it is simply a question of experience. I find it hard to keep track of what is going on in the recursive process so I don't know whether I am doing things correctly. The funny thing I notice however, is that usually, the way we expect the recursive code to look is exactly what we want to have to implement it. for example, with list longest path, i had to recursive keep track of the longest path, and so i put list longest path' inside 'list longest path', and it seemed like all I had to do was 'assume' list longest path would spit out what is wanted (the longest path for tree rooted at root), and just use the return value to compare with what I have so far in a separate list and return the longest path from this list, and so on, recursively. By implementing the overall functions in such a way it seems to work, hooray!
The worst thing is that the I find recursions so difficult. I mean, during the lab, it took me over an hour to implement list_longest_path. I think the problem is that I have not gotten the hang of it, because I notice other students and they seems to be fine, it is simply a question of experience. I find it hard to keep track of what is going on in the recursive process so I don't know whether I am doing things correctly. The funny thing I notice however, is that usually, the way we expect the recursive code to look is exactly what we want to have to implement it. for example, with list longest path, i had to recursive keep track of the longest path, and so i put list longest path' inside 'list longest path', and it seemed like all I had to do was 'assume' list longest path would spit out what is wanted (the longest path for tree rooted at root), and just use the return value to compare with what I have so far in a separate list and return the longest path from this list, and so on, recursively. By implementing the overall functions in such a way it seems to work, hooray!
Reactions to Week 8
We explore the data type LinkedList, which is basically a list that contains a value and a child that has another value with another child and so on... it like a chain. LinkedList is pretty much a Tree but with one child. It thought it was fun to play with it, but the LinkedList __add__ method was hard to implement. The reasons why is because I had a hard time figuring out how to do the code so that the chains of two list would be combined, and I had to create a set of "dummy" lists to keep track of everything and combine the lists at end. I had practice with the while loop, which is always good since it is not easy to use and it is important, (I remember in assigment 1 when I had to use it to implement my game).
I get the general theme that the data types we are learning are Tree types, i mean, we had already learned about binary trees. I enjoy learning them because they remind me of the idea of the Tree Of Knowledge in the Bible, which is a really random connection but that is how it is. Haha.
End of term course evaluation!
Phew, what hectic term it has been. From the TA strike to recursions, I'm glad it is all over.
Naturally, the TA strike has been such a pain that I do not know when to start, except that perhaps I missed those quizzes at labs, such easy marks ... sad.
Recursions have been the main idea for this course, as this has been the method of implementation we haven used for Tree type data, which is the main way of organizing data we have learned. I have to say that recursions are both tiresome and interesting. Tiresome because, for some functions, it is hard to know what to do for it. I know I have to do some kind of recursion, but I don't know how and getting the recessive model correctly by keeping track of each step of execution can be head aching. I learned that it is better to write it down first. In assignment two, for example, the recursion needed for strategy minimax was very difficult. I felt i was implementing it wring not only because the model that I need to keep track of was complex, but I might not have understood correctly what need to implement. This last part is the other thing that is confusing about recursions, since sometimes it is hard to know precisely what needs to be recursed. Assignment three helped with my understanding of recursions greatly, since it allowed me more practise with recursions with functions that I thought were actually easier than some of the labs. Start with the base case, and the write some code for when it is not a base case, etc.. which is easy once I got the hang of it.
I wished I made the effort to be make some compsci friends, given that I am a commuter, that would have helped greatly academically. I would then be able to share my thoughts and confusion with them, which might have helped in my overall learning.
The classes were quite good, I learned a lot from Diane, as she makes it very clear the concepts of trees, ADTS, and recursions. One problem I had was that perhaps Diane did not put enough focus on what kind of methods and functions would be useful when actually writing the code, as I am not experience with all of the methods, and that would have helped saved a lot of time for me personally to not have to look for methods that I could use.
This week in computer science has been mild, given it is the last week, and most of the time we just spent asking questions on exams etc..
Time for exams, yay!
Naturally, the TA strike has been such a pain that I do not know when to start, except that perhaps I missed those quizzes at labs, such easy marks ... sad.
Recursions have been the main idea for this course, as this has been the method of implementation we haven used for Tree type data, which is the main way of organizing data we have learned. I have to say that recursions are both tiresome and interesting. Tiresome because, for some functions, it is hard to know what to do for it. I know I have to do some kind of recursion, but I don't know how and getting the recessive model correctly by keeping track of each step of execution can be head aching. I learned that it is better to write it down first. In assignment two, for example, the recursion needed for strategy minimax was very difficult. I felt i was implementing it wring not only because the model that I need to keep track of was complex, but I might not have understood correctly what need to implement. This last part is the other thing that is confusing about recursions, since sometimes it is hard to know precisely what needs to be recursed. Assignment three helped with my understanding of recursions greatly, since it allowed me more practise with recursions with functions that I thought were actually easier than some of the labs. Start with the base case, and the write some code for when it is not a base case, etc.. which is easy once I got the hang of it.
I wished I made the effort to be make some compsci friends, given that I am a commuter, that would have helped greatly academically. I would then be able to share my thoughts and confusion with them, which might have helped in my overall learning.
The classes were quite good, I learned a lot from Diane, as she makes it very clear the concepts of trees, ADTS, and recursions. One problem I had was that perhaps Diane did not put enough focus on what kind of methods and functions would be useful when actually writing the code, as I am not experience with all of the methods, and that would have helped saved a lot of time for me personally to not have to look for methods that I could use.
This week in computer science has been mild, given it is the last week, and most of the time we just spent asking questions on exams etc..
Time for exams, yay!
Sunday, 8 March 2015
ADTs and reaction to recursion
The concept of ADTs has been comprehensively explored throughout this course. Our first big test on ADTs has been assignment 1 where we have to design generic codes for games, but does not specify specifically what game it is. The challenge that was faced by this is that we had to figure out what universal qualities existed across a variety of games, and should we express these qualities in the code. For my personal generic game codes, it was hard to figure what should be in GameStrategy, because, I couldn't fathom what is universal among all strategies other than who moves first, second, last, etc... One example of an ADT that we learned about was Stack, which is a ADT that stores things in a stack and removes the first item in it. We learned about the idea of it, and generic Stack functions were implemented in class. Although, anything more specific to a certain type of data would be subclassed, which is the entire point. If there were functions that must be implemented in the parents class but cannot, then we raise a not implemented error to tell future readers of our code that this should be implemented but could not for the parent class. This idea is like creating an open world that is customizable to anyone personally, but the basis of it should remain open so that anyone else could work with it just fine. Another ADT that we learned about was Trees, which is a fantastically cool idea. I think that the ability to access data at one point, and from that one point we can access more data, is the most interesting and practical. It reminds me of folder that has subfolders in them, so that we can find more information, but they are all stored in one giant parent folder so that we know where it is. The applications of it, such as the ability to do arithmetic in order of operations, is simple yet so helpful in our lives that people take it for granted. But really, it is those little things that affect our lives the most. I think though, that after doing many labs, I have gotten a better hang of the concept.
Recursion has been a tricky but useful concept. On one hand, it allows me to save code space, and it is certainly effective and allows for accessing data stored in a Tree-like data type, where we must access files within files. I think it is definitely fun to create recursion code. However, it is also tricky in the sense that I need to keep track of everything that goes on in the recursive executions to make sure the code works. For example, I could have a return statement that actually does not work because it returned the function inside a recursion process so in fact it did not return anything to the user, but if I don't have a return statement, how am I going to get it to return anything? That is the tricky part of it all! Well, I used my recursion skills to do A2, and it definitely was not easy at all ! It was hard to visualize all of the complications that could arise the the recursive process. I was quite disappointed with myself because I though I had the hang of recursion, but it is clear that the more steps are required in a recursion like the one we had to do for Minimax, the harder the recursion becomes.
Recursion has been a tricky but useful concept. On one hand, it allows me to save code space, and it is certainly effective and allows for accessing data stored in a Tree-like data type, where we must access files within files. I think it is definitely fun to create recursion code. However, it is also tricky in the sense that I need to keep track of everything that goes on in the recursive executions to make sure the code works. For example, I could have a return statement that actually does not work because it returned the function inside a recursion process so in fact it did not return anything to the user, but if I don't have a return statement, how am I going to get it to return anything? That is the tricky part of it all! Well, I used my recursion skills to do A2, and it definitely was not easy at all ! It was hard to visualize all of the complications that could arise the the recursive process. I was quite disappointed with myself because I though I had the hang of recursion, but it is clear that the more steps are required in a recursion like the one we had to do for Minimax, the harder the recursion becomes.
Sunday, 22 February 2015
Trees! Trees!
We learned about the concept of trees in the past week. The theory behind it is that we access a main data centre point and then from this point we gain access to more data stored in its children. This simple concept of data organization allows for the storing of complex data in an organized way which enables humans to do very practical things with it, or so I would imagine, given that I have seen it in practice, but the profoundness of it is clear. Writing code for the practice questions and the labs I found were tricky, because I needed to take into consideration trees within trees within trees, but i definitely loved the challenge.
Sunday, 8 February 2015
On Recursions
This past week we have been doing recursion exercises. I have to admit, they have been pretty fun, tracing the the function call in your head to figure out what will be produced. The clever thing about the recursions is that many of the recursive functions have itself as code in the function body. For example, def o(g):
........
return sum(x in o(f))
A very clever implementation indeed. I love that it is easy to look at and it is efficient. The practice of tracing is not hard either, since if the function does what it proposes to do, then the produce should be what is expected so there is nothing challenging.
........
return sum(x in o(f))
A very clever implementation indeed. I love that it is easy to look at and it is efficient. The practice of tracing is not hard either, since if the function does what it proposes to do, then the produce should be what is expected so there is nothing challenging.
Saturday, 31 January 2015
Hooray! Finished assignment 1!
After days of brainstorming and contemplation over what we need to do and what we need to code, whether the design is efficient, and whether it satisfies what the instructors could possibly be looking for with their open ended assignment instructions, I have finally got it over with to satisfaction and hopefully, excellency. The assignment itself was tricky in many regards, requiring the stimulation of my imagination and , somewhat philosophical, consideration of what is needed to be done. When I wrote code for the Game Strategy, it was incredibly time consuming to figure out all of the necessary ingredients that are considered general to all game strategies. It was like trying to answer a riddle. Ultimately, I settled with a few attributes. The attributes were related to who gets to start the game, isolate the good moves from the bad ones, and choosing the move out of the available moves. The last two attributes would be made tailored to the specific strategy chosen.
It feels good now that I have finished the assignment, and I feel that I have learned a lot from the assignment, including the ability to plan, organize, and tackle problems in a different light. When I first started the assignment, I felt entirely overwhelmed because they asked for generic code, something I had no clue what was meant, but looking back, it seems pretty obvious, and I can see how useful designing generic codes can be in real life. It is like making a toolbox so that other mechanics can use it to work their own projects out of.
Now that test 1 is coming up, I will definitely need to go over the lecture notes, understand the design concepts, and read read read !
Much of the material I understand, but hopefully the test will not be testing us on something similar to a1, as then it would be too intimidating.
It feels good now that I have finished the assignment, and I feel that I have learned a lot from the assignment, including the ability to plan, organize, and tackle problems in a different light. When I first started the assignment, I felt entirely overwhelmed because they asked for generic code, something I had no clue what was meant, but looking back, it seems pretty obvious, and I can see how useful designing generic codes can be in real life. It is like making a toolbox so that other mechanics can use it to work their own projects out of.
Now that test 1 is coming up, I will definitely need to go over the lecture notes, understand the design concepts, and read read read !
Much of the material I understand, but hopefully the test will not be testing us on something similar to a1, as then it would be too intimidating.
Saturday, 24 January 2015
Why Geeks Should Know How to Write
The art of writing predates computers for thousands of years. It is used to record history, express ideas, teach, and inspire human beings. Geeks, aka computer scientists, need to know how to write for three important reasons. To record works and discoveries that have been done during research, to communicate with other scholars form other disciplines, and to promote computer science to the general public. For anyone who is undertaking a project, something which computer scientists absolutely must do, they need to record the past stuff that they have done or discovered, and record it well, so that in the future they can understand what they have done or thoughts that they had had before, in case they forget it. It is extremely useful for their peers and students as well to understand what they have done, and this requires good writing, no ambiguity, so that their peers and students can continue their work and coordinate with what they are doing. Beyond their peers and students, computer scientists need to interact with other scholars as well, in fields ranging from mathematics, life sciences, and possibly even social sciences. Some of the most incredible breakthroughs in human history have been achieved via the collaboration of scholars from a variety of subjects. Computers, for example, were made possible by scientists who managed to sequence the human genomes, and through the interactions between mathematicians, scientists, and engineers, humans come up with a system of 0101010 codes. Writing then, is absolutely essential, as one cannot expect scholars from different background to understand computer scientists' lexicon. In continuation of the tradition of scholarly exchanges, one must know how to write. If computer scientists cannot write well, then they might endanger the entire field of computer science to simply something niche. There exists many misconceptions about what computer science is and what computer scientists do. No, they do not fix computers, and their work goes beyond simply making video games. These misconceptions can simply be solved if the 'geeks' of computer scientists learned how to write, to communicate with the public what they really do, to inspire people and to change their views of the subject, so as to continue and enhance the field of computer science, given a more diverse pool of students with different ideas -- but this can only start if the 'geeks' of computer science know how to write, persuasively, clearly, and informatively.
Subscribe to:
Posts (Atom)