Saturday, January 26, 2013

Defining Week 3

I think I will come up with some creative post titles or start my posts with computer science puns/jokes.

Tuesday's class was the introduction of definition and coding! When the professor handed out a handout and told the class to fill in the empty line, I was so scared  because it was so overwhelming to see that much coding in one page. To be honest, I sat there re-reading each line and attempted it. It was somewhat successful, but felt discouraged.

Learning about definition brings some ease when I'm writing my functions because it can get long. However, I think what's frustrating and confusing is how one code can have so many coding embedded.  For example:
This was from the definition video
(check-expect (rosette pic:calendar)
                       (beside
                         (above pic:calendar (flip-vertical pic:calendar))
                        (flip-horizontal
                          (above pic:calendar (flip-vertical pic:calendar)))))

Visualizing how the pic:calendar would look in the end was confusing, so I kept on re-watching the videos over and over again. The check-expect test does help when checking the functions that I am creating. But after watching the videos, I realized that these embedded functions are similar to "peeling an onion", that I have to go pass one layer first, to get to the next layer. It helped in the end!


No comments:

Post a Comment