Ir al contenido principal

CSC WEEK 10


By week ten, the focus was mainly on project 2, recursion and list of operations and Fibonacci numbers. During that week, we received a little of background about the project thematic. This was mainly focus on animation. We were asked to run an infection, and to play around with the immunity and infection duration, to see how virulent a disease could be. Additional to the project introduction, we focused more on recursion operations on extensive lists, such as the ones that conform a webpage. There was not difficulty in that topic, because it was similar to what we have been doing the rest of the semester. Moving out from the recursion and list operations, the class focus was the introduction of Fibonacci numbers. The main notion was to understand that computers are not as fast as we think. In fact, with Fibonacci numbers, we observed that the computer had a tough time processing the command due to the redundancy in the definition. Thus, we ended it up with a situation where sometimes the computation blows up, because of the redundant calculations. The entertaining part began here, we started to create a solution to this problem. But first, we calculated the time for Fibonacci 100, just to see how long the computer will take. As we increased the Fibonacci number, the ratio of time increased as well, by a ratio of 1.6. Therefore, to calculate Fibonacci 100, the computer will take around 18 billion of years. Sometimes there is some sort of happiness or utility to do computation that take time. For instance, passwords have a vast number of combinations. And because many people are trying to hack our passwords, it is a good consequence that processing all the combinations take that long. But in other occasions, such as the Fibonacci numbers, re-implementing a definition is needed. As we established before, the problem was that we were almost doubling the ratio of time. The reimplementation for this problem was to produce to numbers instead of one, for example fib10 and its predecessor fib9. This will reduce the number of computations to 100, which is fairly quickly for a computer to do. Overall, the baseline at the end of this week was that we can make computation faster and shorter by rethinking how implement a function.

Comentarios

Entradas populares de este blog

CSC WEEK 9

Along with the concepts of colors, we started the animations topic. In fact, an image is not animated if does not change somehow. To change an image, we use the function repeated which takes 3 inputs: a function, an image and a number. However, this function produces a list of images, not exactly an animation. Thus, we started to work with the big-bang function. As its name suggests, big-bang function creates something, in this case an animation. Even though this new command allows us to create something different and unique, as an animation; I did not like it at first because I had trouble initially understanding what it is asking me to do. Specifically, I was confused on the use of freeze which is a function that basically delete all the previous information of the element, in this case animation. What happens is that you delete all the previous information of an animation. In other words, you cannot come back to the original image. I understood that after performing by myself di...

CSC WEEK 11

Number representation was the topic for week eleven, which basically focused on binary numbers. At the beginning of the week, I did not feel comfortable with binary digits, but through the week I, certainly, progressed with my understanding. As humans, when counting we tend to group things in 10. However, computers do not use decimal numbers, they use voltages, which is similar as use just two fingers, instead of ten. In binary numbers, the only digits are one and zero, and because we are so used to do operations in base ten numbers, it is difficult doing operations with binaries. In fact, it took me a while to feel comfortable doing sum or multiplication with binary, specifically addition. But thanks to the practice fields that professor submitted, I mastered operations with binaries. I realized that it was the same as doing operation with decimal numbers, but just using zero and one, for instance, 1+0=1, 0+1=1. The only difference is when adding one and one, which equals one and ...

FINAL REFLECTION

CSC104 course was a surprisingly interesting course for the different topics studied in class, especially big-bang and Fibonacci numbers. However, sometimes it could be overwhelming when some definition produces an error. That is why I would recommend to a future student when writing a design function do not panic if it does not work at the beginning. Moreover, if you see that is not working properly, go to the interactions area and play with the various parts of your definition to gain a sense of what is the function of each part. Similarly, using check expects will help you at designing your function, because you will see what it is the supposed outcome of the function. Finally, I would strongly recommend using the help manual during the designing of the function, to see which command could help you with the desired output. Basically, for preparing for this course, organization and constant practice are keys. I would say that doing the weekly exercise will help you to master eac...