Thursday, 4 April 2013

The last week

The first class in this week was about privacy. Beginning with this topic, professor Heap asked us: "how many people would like to share their personal information?" I thought a small fraction of people in class would raise their hands.
Two extreme situation: 1 completely keep privacy, 2 share all the information in public
I thought we should combine them together and learn to control important personal information.

Professor said that we could draw a diagram for the information we shared with different people. The center is our closed friends and relatives, a circle around the center is acquaintances, and the biggest circle is the rest of the world. I agreed it but my diagram was different. My parents will be in the center, my relatives and very closed friends are in the second circle, following another big circle of other friends and classmates. The last circle will be strangers.

When he talked about privacy leaks, I did not know very much about them such as "buyer loyalty plans", "911","rfid","recorded viewing", and "black boxes". I felt new about it.

Then I downloaded the tutorial handout. At first, I did not quite understand what is the difference when running (list 1 2 3) and (list 1 2 (list 3)) since their results are the same (list 1 2 3). Then, I followed the steps to see how it functions and I figured it out. They are both list, so it uses the first function: (apply append (map flatten L))

(map flatten L) flattens each value. (flatten 1) is (list 1) since 1 is not a list so it satisfies the second condition, which is (else list). Similarly, (flatten 2) is (list 2) and (flatten 3) is (list 3). However, (flatten (list 3)) is different though the result is the same. (list 3) is a list so it needs to use the first condition: (apply append (map flatten 3)) and the result is (list 3)
so their results are the same, which is (list 1 2 3).

I would talk to my TA tomorrow to confirm my idea. Hope I could do well in the quiz.

1 comment:

  1. I think you have the right idea for flatten. Try typing it into DrRacket and running it.

    ReplyDelete