2013-02-25

CSC 104 Slog-Week Six (Feb 11th - Feb 17th)



CSC 104 Slog-Week Six (Feb 11th - Feb 17th)
Something new learned in the class:
[History of computing]
Some convergence
Two general ideas:Digital& Binary: two state is the smallest, most easily designed
Memory should be reliable, fast and cheap
Magnetic & transistor
Early 50s, change dramatically
1970s was an electronic switches
Boolean logic
Simple operators
two values. true and false can be combined (get a signal on a and b and also get a high signal on f ----pay attention to logic
Bitwise operator
A B Cin  -> in
Cout S -> out
A&B addends—can be 1 or 0
0+0=0
0+1=1
1+0=1
1+1=0
e.g.
   1 1 1    ->Cin
1011  ->A
+  101  ->B
------------
10000
  binarbydecimal
multiply each digit by the appropriate power of 10
e.g. 5897=5*1000 + 8*100 + 9*10 +7*1
what happens when u add zeros on the right
what happens when u drop digits from the right
àa general rule: for multiply by 10, for divided by 10 and then round down
multiply each digit by the appropriate power of 2
1011=1*8+0*4+1*2+1*1
what happens when y add zeros on the right
what happens when u drop digits from the right
àa general rule: formultiply by 2 , for divided by 2 and round down
Binary
Challenges I met this week
  Binary
  I never learned this before so it is kind of not that familiar to me. However its not a big deal because I learned really hard on the class. By the way, for this class, I felt a little bit bored when we were asked to discuss what will happen if a decimal number is added or dropped a zero. I can understand that it is the basic of understanding the effect of binary numbers added or dropped by zeros but I wish that it could move faster on those things which are not that difficult :)
Though I don't smoke....
  SLOG
  I read some other students SLOGs and I start to feel confused about the form of SLOG. Is it okay to write it like what I am doing now (like now I always summarize the things that I learned this week and I feel it looks more like a notebook rather than a blog)? I am really not sure whether this is the type of SLOG that you are looking forward to reading and give a high mark at last. Please tell me if there is anything that I can do to improve my Slog. THANKS VERY MUCH.

The test/quiz/assignment
  I didn’t do well in this quiz. I feel like I made one wrong (but since I haven’t got the quiz paper so I am not that sure about that up to now).
  It was about the structure of values.
Structure of Value
I will do a correction and summary in next SLOG when I get my paper next week. Hopefully I will get to totally understand it at that time.


❤ Feedback to other's blogs
I read 's blog this week. She said she did well in Test one and she was really busy because she had two tests this week! Oh my god that's really horrible. I never had two tests in the same week. Wish she can do well in the final exam!
I left the comment :"Good luck with your final test! :D"

CSC 104 Slog-Week Five (Feb 4th - Feb 10th)

CSC 104 Slog-Week Five (Feb 4th - Feb 10th)
Something new learned in the class:
[Dr.Racket]
  Values
here are some new terms that I learned this week, I recorded them down for the reviewing in the following days.
-(length menagerie)
-(first menagerie)
-(rest menagerie)
-(list-ref menagerie 0)
  We get whatever in position 0 (which is the first stuff in the list.)
-(range n1 n2 interval)
 We get a list of number beginning with n1 and ending up with (n2-interval) counting by the interval.
-(reverse menagerie)
-(Define-struct exhibit (name pic feet))
-(make-exhibit …)
-(exhibit-pic )
-(exhibit-feet …)
So many stuff to memorize!
-(exhibit-name …)
-(map sqr num-list)
-(map sqrt num-list)
-(map string-length )
-(map add5 num-list)
-(map scale-pingu scale-list)
-(image color-list im)
-(color-list ->bitmap
image -> color-list im))
-(Define (Bluer c)
   (make-color
    (color-red c)
    (color-green c)
    (quotient
      (+ 255 (color-blue c)) 2)
    (color-alpha c)))
    -(swap-red-blue c)

NOTE THAT
-The computer will respond these with (list … …)
-When we say (make-color 1 2 3 4)
1 responds to red intensity, 2 responds to green intensity, 3 responds to blue intensity, 4 responds to alpha.

Challenges I met this week
  The key points of programming during this week are not very difficult and we didn’t learn the history of computing this week. Anyway, this week went so far so good.


The test/quiz/assignment
We had a mid-term test this week. I prepared the history of computing for a long time because there are a lot of things to memorize, while it turned out that there weren’t lots of things about it in the test. Anyway it’s good to not have many problems about it so that I can get a good mark.  :)
  As for the programming part, I lost two points altogether. One was because I didn’t explain clearly about why it takes a computer a substantial amount of time for values as (Fibonacci 40) or (Fibonacci 50). The other is because I wrote “im” as “pic” which didn’t match the one offered in the questions.
Fibonacci
   For this test, I am glad that I didn’t hand in the test paper immediately after I finished the test, instead I checked for several times until the time was up. It helped me to correct some small mistakes and get a higher mark. In general, I feel like I did not bad but there is still a space for me to make progress. Hopefully I can get a higher mark next time.

CSC 104 Slog-Week Four (Jan 28th - Feb 3rd)

CSC 104 Slog-Week Four (Jan 28th - Feb 3rd)
Something new learned in the class:
[About the history of computing]
  Programmable VS Electronic As for electronic computing, it began by storing information in vacuum tubes.
  Problems of vacuum tubes: consumed huge amount of power, unreliable when warmed up, took up huge amounts of space. Also, they were big, hot and slow compared to transistors.
  By 1970s, the computing power of eniac fits in your hand.
  By 1980s, mass-produced desktops landed with a clunk.






[About the Dr.Racket Program]
  Racket events how to make a timer (We use a fish as the hand, which is kind of funny!)



Challenges I met this week
  Didnt quite understand the terms of developing a timer at first. However, after watching the videos and reading the textbook online I got understand it.
The terms that I summarized from this:
-big-bang function takes one or more parameters: the first parameter is the first image the animation should show, and any remaining parameters are event handlers.
OH NO! So many stuff to memorize!

- Event handler* is a functions for the animation to call whenever a certain event happens. There are several kinds of events: draw the screen, clock tick, mouse activity, keyboard activity, etc.
-to-draw function is an event handler (drawer handler) whose job is to decide what to show on the screen at each step.
- show-it is a built-in function and a draw handler which takes in an image and returns it unchanged. This means that whenever Dr.Racket needs to redraw the screen, it will show the current image.
    e.g. (big-bang pic:calendar (on-draw show-it 300 200)) develops an animation that displays an unchanging picture of calendar on the top-left corner in an window which is 300 pixels wide and 200 pixels high.
-on-tick function is a tick-handler which will be said as (on-tick function-name interval). It is called every time the clock ticks. The interval parameter is how many seconds there should be between one tick and the next. If we leave it out, the animation will run as fast as it can. The function-name parameter is the name of any function that takes in an old image and returns a new one. We can write a function ourselves to do this job or just use the one thats already built in.
  e.g. (big-bang (overlay pic:calendar (rectangle 100 100 solid white))
               (on-tick rotate-cw 1/2)
               (to-draw show-it)

Summary helps you understand these better!
NOTE THAT
-This is no differ
ence in writing (to-draw) or (on-tick) first.
-Technically, on-tick and to-draw are not functions, but rather something called special forms. What this means in practice is that we cant use them anywhere except as an argument to big-bang.
Specific tips to develop a timer
-DISK is a timer disk
 Define it as a outline of a white circle which has the image-width of the BAR.
-SH-SPEED is a speed in degrees/second
 Define SH-SPEED (/ 360 60)
-rotate-second produce image after 1 second rotation.
-rotate1 produces image rotated by 1 degree.


The test/quiz/assignment

Luckily I totally understand the quiz and got a perfect in the quiz. Hopefully I’ll do as well as this time next time.
I am Miss Happy~

❤Feedback to other's blogs
This I read   's blog. She said that "With more knowledge about the Racket Program, I use it more frequently to check my work and practice defining commands. "
Feeling that this is a really good way and hopefully we can stick it to the end! So I left a message: "Practice is always the best teacher for us!" :P

CSC 104 Slog-Week Three (Jan 21st - Jan 27th)



CSC 104 Slog-Week Three (Jan 21st - Jan 27th)
Something new learned in the class:
[About the history of computing]
Chinese common tally system
  Representing information with the table showed in the slides: we read the corresponding sequence on the top and then read the one on the left side. in this way the information is represented. For example, “C” can be represented by 1000011. Note that the space should also be represented by the particular sequence.
  Early devices (tally systems): Clay tablets and Abacuses. For clay tablets, its read-only when its backed but it can be read and wrote on when its only sundried. ---------This remind me of the chinese common tally system. We uses the Chinese character "正" to count numbers.
Hindu-Arabic numbers
  The progress made in the number systems: Hindu-Arabic numbers used the positional notation which makes it easier to calculate. We add powers and logs to multiply quickly and extract roots.
  In the industrial revolution, we began to use loom and engines.
  At first our data are digital, while later on the analog computers model began to use smoothly-varying quantities such as water.
[About the Dr.Racket Program]
  Racket Definitions we learned how to make definition of a function.

Challenges I met this week
  Dont know how to write the program at first.
Oh my Dr.Racket
  Since before this week, we only needed to distinguish the functions and describe the functions effect when the run button is clicked in Dr.Racket system, I havent tried to write down the expressions in Dr.Racket myself. This time, on the class I had to try to imitate the expressions in the system and finish the exercise of making definitions all by myself, which was pretty hard for me at first. However, later on when I got used to writing it, everything became better.
The things I learned from this problem:
When we are told to write another check-expect, just take another example. They just want to see whether we have totally understood the function they give to us.
When writing the definitions part, usually just copy down the check-expect with the specific examples substituted by universal words like im representing images, s representing strings, etc.

The test/quiz/assignment
Luckily I totally understand the quiz and got a perfect in the quiz. Hopefully I’ll do as well as this time next time.


❤Feedback to other's blogs
This week I read 's blog and left a message: "Indeed, reading week is a good time to review stuff :D But it's always very hard to study on holiday ;P".
Reading week is a good chance to make some change, we just always can't make good advantage of it!