Sunday, November 25, 2012

Test #2 and Project #2



         The result of the second test didn’t reach my expectation. I found some my problems which caused the mistakes in this test. Here is a brief summary.
         First of all, I did not pay enough attention to some details during the learning process. For example, regarding the first question of the test, I knew how each type of the networks is built, but I was not clear about their uniqueness and disadvantages compared to each other.
         Secondly, I did not solve each question carefully. In Part II of the test, I knew how the codes work and what they will produce in DrRacket. However, I did not read over them entirely. I didn’t realize that I actually jumped over several lines when I was writing the test. That’s why I lost 4 marks in part II.
         I will definitely improve my learning quality in class, and have a better review before the final exam. I wish I can do a better job in the final one.
         Moreover, I finished the second project last night. I encountered one problem which took me almost one hour to solve it. When I was adding two check-expects before the lines below,

(define (interpolate-image i1 i2 n)
    (local ; f is defined only inside interpolate-image
    [(define (f c1 c2) (interpolate-color (/ n DENOM) c1 c2))]
(map-images f i1 i2)))

I replaced i1 and i2 by pic: hacker and pic: calendar in my check-expects, but the tests failed. DrRacket told me that all the lists must have same size. I didn’t know where the mistakes were. I tried my best but I still couldn’t make it work. Then I decided to replace pic: hacker and pic: calendar by (circle 5 "solid" "green") and (circle 5 "solid" "blue"). To my surprise, the tests passed. I was glad the check-expects finally worked, but I don’t know why the tests passed exactly even now. I guess the two pictures must have same size so that their color-lists have the same size too. I am not quite sure about that. I think I will check with my TA during my tutorial section.

Sunday, November 4, 2012

Working on Project #1




         Frankly speaking, I like this project.

         I am always wondering what could be created by using DrRacket. I have been studying DrRacket for almost two months, and I have learned many commands regarding manipulating images, numbers, strings, and lists. I know DrRacket is powerful, but I don’t know what kind of work I can produce in DrRacket. However, this project shows me what DrRacket can achieve. It is about a simple animation of a clock with working hour, minute, and second hands. Although what I need to is to fix some disabled features, I still become more passionate about DrRacket.

         All the mapping and listing parts in the file are hard for me. My mind was messed up at least three times with check-expect and definitions of make-clocktime and set-clock. The way I solvde my problems was to download all the files about DrRacket code in the previous classes. I reviewed them, and compared some particular lines in those files with the corresponding lines in the project. The review helped me understand the functions of some commands that I am not familiar with. I also learned how I can write those commands properly by consulting our professor’s works. For example, the file about changing the colors of a clownfish is really helpful for me to fix the first part of the clock. Besides that, right-click on the commands was also helpful. The documentation explained everything in details, and it also revealed some good hints to let me work through the project.