Wednesday, 2 December 2015

Mistakes in Term Test 2

I did not do to badly on the first question however I spent too much time on it during the test. What confused me was what combination of the numbers in the list (range 0 256 1) make black and which make white.  The last part of question 1 as well was one which troubled me. I guess I have to practice the functions color-list->bitmap and image->color-list more before the final exam. I will take random pictures and apply these functions to them on Racket and will keep on altering the parameters of these functions, so that I can differentiate between the outputs of each of them. The other mistake I made was in the last part of question 4. The function was :
(define (q a-list)
 (cond [(= (length a-list) 1) (first a-list)]
  [else (above (beside (q (rest a-list))
               (q (rest a-list)))
               (first a-list))]))
and we had to show the result of :
(q (list (triangle 10 "solid" "black")
         (circle 5 "solid" "black")
         (square 10 "solid" "black"))).
The reason why I got this question wrong was because I did not write down the two main intermediate steps which would have helped me draw the final result. I tried to draw the image by just looking at the input of the function. The final answer was, two solid black squares of size 10 beside each other above a solid black circle of size 5, beside this the same image again and this whole image was above a solid black triangle of size 10. The intermediate steps I should have written should have been:
1.) (above (beside (q (list (circle 5 "solid" "black")
         (square 10 "solid" "black"))) (q (list (circle 5 "solid" "black")
         (square 10 "solid" "black")))) (triangle 10 "solid" "black"))

2.) (q (list (circle 5 "solid" "black")
         (square 10 "solid" "black")))

The second intermediate step would have helped me to get the result in 1.) I will make sure now that in the final exam I write down all important intermediate steps so that I do not make these kind of mistakes again.

Saturday, 28 November 2015

Project II

Having done about half of project II, I can say for sure that it is much easier than the first project. Even though after completing the first project, I understood what each function did, it took me a lot of time to write some of the functions and to fully comprehend their purpose. However in this project most of the functions seem straightforward to construct and their check-expects make it easier to get an idea of what the function should be, than was the case in project I. It is also easier to see which functions require apply, map, or filter in them. The functions that use functions created earlier in the project are also easier to construct since the output of most of the functions is relatively easier to understand than that in project I. The functions are short in length however they are powerful. Maybe I am finding this project easier because I spent a lot of time on the first project and have now got the hang of how to construct complicated functions.

Thursday, 26 November 2015

An easy way to stay up to date with material in CSC104.

In my opinion the quizzes are the best way to ensure that students stay up to date with the course work. Since they are every week except the week we have tests on, students make sure that they pay attention to what is being taught every week knowing they will be tested on it in the following week. When the tests come its easier for me as well to study for it since I have been studying for the quizzes weekly. It also ensures that students play around on DrRacket more which helps them to understand the program even better. I am pretty sure if there were no quizzes weekly I would have to spend more time studying for tests than I have to now and would not be as comfortable in using Racket as I am now. Apart from helping students stay up to date with what is being taught in lectures, it is an easy way too boost our grades, since the quizzes are generally easy and cover the basic concepts taught in lecture. It also ensures that students come to their tutorials to solve and ask their TA's questions.

Wednesday, 18 November 2015

My mistakes in term test 2

The worst part after walking out of a test for which you were well prepared is when you realize the mistakes you made. The test was easy however I made some careless mistakes. In the recursion question I forgot to replace fish with image, as fish was just a placeholder in the function. When solving that question I was just thinking what the body of the function should be, in order to get the images in the check-expect function, however I should have made sure that my placeholders were correct as well. I made a mistake in the last question as well, the one which involved putting two images beside each other above another image. I did not leave enough time to solve that question so I did not have time to go over my mistakes in that part. I did not write down what that function on a list containing the last two elements of the original list, due to which my final answer is probably wrong, as it involved putting the image resulting from the function on a list with two elements beside each other and above the last shape in the original list of three shapes. I hope I manage my time better in the final exam so that I have enough time to correct my errors, and not make these kind of mistakes again.

Tuesday, 17 November 2015

How the maze-generation project helped me understand the course material even more clearly?

To be honest I was initially struggling with the maze generation assignment and felt I was spending to much time on it. I was feeling frustrated, that even though I felt my code was right, my player kept moving off the maze. I changed my code many times to make sure this would not happen, but it kept on happening. However on one try, I was finally successful. I forgot to add a condition to one of my functions which was causing the player to move off the maze. Even though the assignment is due two days after the test, having completed it I feel that my knowledge of conditional, struct functions as well as the ability to use, map and apply in different situations has made these respective concepts even clearer to me and hopefully this will help me do well in the test. The functions used in the assignment are complex, in the sense that they require a lot of time to digest, to fully understand what their purpose is.  They are integrated which helps ensure that students play close attention to each of them, so that they can successfully use them in the following functions. It was fun working on the assignment, thinking that the purpose was to create a maze from the material we have learned in class. This shows how powerful computing actually is. I feel this is a good way for students to ensure that they really understand the material taught in lectures in depth. I feel after completing this assignment I will be able to better understand the remainder of the course material.

Thursday, 12 November 2015

My favourite lectures of CSC104 up till now.

My favourite lectures of this course are by far the ones in which we learnt about recursive functions. To me it was such a neat idea of how a certain value in a function can be created by simply using a value previously generated. The nested circles we created for example were a good way of demonstrating the purpose of recursion in my opinion. Patterns such as those can be found in many places, for example in wallpaper for a room. Now I know how such images are generated. I enjoyed the Sierpinski Triangle lecture as well. The different ways in which we could stack the triangles and manipulate the function to create the triangle with one colour, random colours, or having the same colour in a row was pretty fascinating to me. The power of recursion can be seen from what we generated in these lectures. This concept which is easy to understand, to produce such intricate images shows the true power of coding, and proves why it is so important in todays world. As the semester comes to an end I am pretty sure the remaining lectures will be more fun and hopefully I enjoy them as much as I enjoyed the ones on recursion.

What I find challenging in this course and how I plan to overcome these challenges?

Animations such as big-bang in my opinion are very challenging to visualize. I initially had a lot of trouble trying to understand the function, however after practicing it on DrRacket I kind of got the idea of what the function does. It takes an initial value, a function that produces an image, and a function that produces a value and keeps on performing repeated transformations. ( on the new values that the function, whose output produces a value) However if such a question comes on a test I feel like I would spend the most time on it. For me it takes a lot of time to digest what the big-bang function is doing, and which function in it produces an image or a value. However hopefully I will be able to be able to become much better at using this function, which I aim to do by applying it on DrRacket.
The other thing I find challenging in this course is the assignment. Even though I have spent a lot of time trying to generate the maze, I find some of the codes are way more advance than what we have learned in class. For example the try-move code; I have fixed it to do what I understand is the purpose of the code but it keeps giving me an error. When the try-move code did not give me an error, my maze was generated however my player could not move in any direction, even though I felt that my key function, which allows the player to move in any direction was correct. Up till now I have been working on this assignment alone, but as we are allowed up to two other members in a group, I guess I will work with two other classmates to see where I have gone wrong, or see where I can help them out. That is the only way I feel I will be able to successfully generate the maze and understand what the big-bang function actually does in this case.

Thursday, 5 November 2015

What I hope to learn from CSC104?

The different types of data that we have learned so far helped answer a lot of the questions I had on the first day of class. The way we manipulated pictures using different functions like the kaleidoscope function and the big bang function fascinated me a lot. I have to be honest initially I found it a bit complicated, but by practicing it on Dr.Racket I got the hang of it. The use of recursive functions for example to create nested circles as well was something that intrigued me. I hope by the end of the course I learn more functions and tricks to manipulate data like images. Getting a good grade in this course is not my only aim, but also ensuring that I remember and understand everything we have learned, so that in the future I can apply this knowledge. Studying Mathematics and Economics, this is one course which I find very applicable to the real world. It is also fun to play around on Dr.Racket and learn from my mistakes, which not only helps me understand the program but is also a faster way to learn what we have done in lecture. I hope by the time I complete this course, I am confident enough to learn many more computing languages and enjoy them as much as I enjoy using Dr.Racket. Functions like map and apply, to lists, which save time to sometimes produce the same results, that could have otherwise been produced is also something that interests me. These kind of tricks are what I hope to learn more of as well as the course progresses.

How my view on computing changed since I started this course?

We all know how important computing has become in todays world. I have never really been good at using computers, and as a result of that feared taking courses which required coding. I have used coding languages like SAS and R as part of two of my Statistics courses. However despite doing well in those courses, my fear of coding did not go away. I would take more time to do the assignments in those courses (which required coding to solve the questions) than on average other students would. I felt that coding was something that no matter how much effort I put into it I would not be able to understand. Since these days, every job qualification requires minimum experience in some computing language I decided to take this course. After the first class, in which we manipulated the vanishing leprechaun image, I felt that this course was not for me and that I would struggle in it. However, I kept studying regularly and started to understand everything we did in lecture. The weekly quizzes in my opinion are a good reason to stay up to date with the material. It is an easy way to boost your grade as well. After seven weeks of class, I can proudly say that I am really enjoying this course, and up till now doing well in it. My fear of coding has almost disappeared. The reason why I was scared of taking computer science courses previously was probably because I did not have confidence in myself to do well in them. Whatever we have been taught up till now helps me understand why computing is so important these days. It helps people to do things they would not have been able to do otherwise. Without the power of computing it is impossible for technology to advance. It is also almost impossible to get employed these days without having experience in computing, as everything has become electronic now. The other beauty of computing is that it has multiple languages, each used for different purposes. For example Economics students use STATA mostly, while students in Statistics use R or SAS most frequently. My second year Advance Calculus professor, himself said that a degree in Computer Science is more valuable in todays world than a degree in Mathematics as it is more applicable in the real world. That was the first time I have ever heard any professor admit that another subject is more valuable than the one he teaches. If I were able to go back in time, by three and a half years I would definitely have done a Computer Science major along with my Math major. I would recommend future students who share the same views of computing as I held, to try to conquer their fears and take at least one computer science course while pursuing their undergrad degree because some where down the road, the knowledge of computing will surely benefit them.

Sunday, 1 November 2015

why I chose CSC104?


As a fourth year student studying Mathematics and Economics, I decided that in my final year I take some different courses. What better course to take than a computer science one. One of my friends, a computer science specialist told me to take computer science courses, as they are very helpful in the real world today. Me, not being to good in computing decided to take a computer science course to challenge my fear of computing. I hold no regrets of taking this class, CSC104. I thoroughly enjoy it. The ways we can manipulate pictures and use various functions on them is a very cool to me. I now regret not taking more computer science courses in my previous years.