Saturday, February 16, 2013

February 17

In this week, we learnt many interesting things in CSC104 such as the comparison between digital and analog, how binary system works, and how to convert a based 10 number into a based 2 number.

At the beginning, I had some troubles with binary, for example, when converting 1011 into a based 2 number, I did not know where did 8, 4, 2, and 1 (1 x 8 +0 x 4 + 1 x 2 + 1 x 1) came from. However, after I looked at the based 10 calculation, and I found that we were just multiplying each digit by the power of 2. In the previous example, 1011, 1 is just 2^0, 2 is 2^1, 4 is 2^2, and 8 is 2^3. 

On the other hand, DrRacket is really not as straightforward as binary, and it makes me very confused. For example, when typing in "rest menagerie", why the word "list" comes before the pictures all the time? Also, what is "map" and when should I use it? There are just so many functions to remember!

Anyway reading week is coming, and hopefully I would do a lot of "reading"!

1 comment:

  1. The command (list ...) produces a list. Indeed, there is a short-form '(...).

    (map ...) is a very powerful command. It takes another function, such as add1, and applies it to every element of a list in order to produce a new list.

    I don't think it's good to try to memorize piles of commands. Just as in a natural language, memory comes from doing. When I was a little kid, I didn't take notes on all the new words adults were using in my presence. Similarly, if you try things out in DrRacket, the meaning of commands and expressions will sink in.

    Also, my standing instruction to TAs is to tell students what basic commands mean in a test situation. Your responsibility is to understand how they combine together.

    ReplyDelete