2013-03-15

CSC 104 Slog-Week Seven (Feb 25th - Mar 3rd)



CSC 104 Slog-Week Seven (Feb 25th - Mar 3rd)
Something new learned in the class:
[Computer system]
  Sound can be represented by sampling the amplitude (strength) of the sound wave at regular intervals, and storing the strengths as numbers.

  Images can be represented as a grid of numbers, with each number representing the strength of a particular color in one pixel (picture element) of the image. Since a detailed picture contains a large number of pixels, a great deal of storage is needed. Different image formats make different choices about how many different colours to encode for each pixel.

Computer Designers are so awesome!

[Dr.Racket]
  rot13: produces character 13 places (cyclic) ahead
(define (rot13 c)
  (cond
    [(char<=? #\A c #\M) (integer->char (+ 13 (char->integer c)))]
 [(char<=? #\a c #\m) (integer->char (+ 13 (char->integer c)))]
 [(char<=? #\N c #\Z) (integer->char (- (char->integer c) 13))]
 [(char<=? #\n c #\z) (integer->char (- (char->integer c) 13))]
[else c]))
(check-expect (rot13 #\5) #\5)
(check-expect (rot13 #\A) #\N)
(check-expect (rot13 #\N) #\A)
(check-expect (rot13 #\a) #\n)
(check-expect (rot13 #\n) #\a)

rot13string: produce new string by applying rot13 to each character of s
(define (rot13string s)
  (list->string
   (map rot13
        (string->list s))))
(check-expect (rot13string "Hello!")
              (list->string (map rot13 (string->list "Hello!"))))
ROT13


Challenges I met this week
  I didnt know that every time we apply rot13 we have to type in #/before the number, so I failed to run the function correctly every time. I believe that next time I ll pay more attention to the definition of the function into details.




The test/quiz/assignment
The quiz this week is not about the content we learned this week. It’s still about the racket aggregate: how to decompose and reconstruct images. And I think that I did perfect in it.
The Wikipedia assignment is kind of hard for me, and it actually took me nearly two days to finish the “3-hour assignment” in part 2. Since reading the instructions of editing articles on the website and also looking for materials about the article are actually not easy for me as a result of my poor English. Feeling like the standard of judging whether we spent long enough time on the assignment is not that fair. But to get a good mark, what I can do is only to spend another two days to finish the next “4-hour assignment” for wiki3.
Yeah, csc104 requires a lot of reading and writing which makes it not like a computer science class to some extent. But maybe that is a good way for me to improve my English. Sigh anyway.

❤Feedback to others blogs
I read 's blog again this week lol. She stated what she had learned this week and it was a really long blog. So I left a comment: 
"Seems that you have learned a lot from this week lectures :D"

No comments:

Post a Comment