Friday, April 5, 2013

Weekly log 11 Goodbye CSC104, Danny, Orion

What We Talked about in class this week:
We talked about intellectual property.This is issue is closely related to other topic, security and safety. The idea of internet is pretty paradoxical itself: people want to share but not everything, there is a limit between sharing and privacy. In order to avoid this security violation aided by computers, people should create solid passwords,be sure to know the cooperation where downloading stuff from or divulging identifying information to, apply security patches to software, and avoid reading dubious email.

How do we define property then? A long time ago, people believe that the mixture of labor and nature is your property.However, raw materials are not unlimited, and sometimes, they are rather scarce. A human being is usually considered to be the owner of his/her body, having the right to use it as he/she will. Intellectual property , as a human being's thought, is recognized when the press industry was boomed. Computer and Internet doesn't change essence of copyright.Music, software with copyright usually requires payment depends on the person or organization with the ownership.Bill C-11 is enacted to increases penalties for some copyright infringement (like the DCMA), generally lower penalties, increase the scope of fair dealing, and introduce strong penalties for breaking digital locks (DRM).

My Feedback:
The computer or internet-related copyright issues are always interesting. Since modern technology copy software, music or movies so fast and easily, people don't bother to buy the expensive original copy. I tend to download music a lot (in China it is legal). Now I realize they are someone's ideas, intellectual property. If we infringe it, it is the same as stealing or robing a cell phone or wallet from the owner.

What I think about CSC104 at the end of school year:
Basically, it is a pleasure to take this course. Danny is funny and obviously enthusiastic about what he is doing.He likes helping students with all he has, so does my TA, Orion. I don't feel like stupid when I ask questions. I am now fairly familiar with DrRacket, I learned definitions, aggregation, recursion,creating events. It can be my calculator and Photoshop.Sometimes I just like to mess with it randomly.I am also exposed to a bunch of information about the history of computing and computers.If I didn't take this course, I might never know how early computers look like and how computers operate and take orders. Moreover,it is a great experience to struggle for completing a difficult project with a friend. we developed very intimate friendship. simultaneously, my problem solving skills get improved a lot.

Bye Bye CSC104. Bye Bye Danny.Bye Bye Orion.Thank you all for making my first year a great one! But I won't say goodbye to computer, since I will definitely explore and learn more and more.




Thursday, April 4, 2013

Problem Solving log -- paper folding problem



Program:Take a strip of paper and stretch it so that you have one end between your left thumb and index finger and the other between your right thumb and fore finger. Fold the strip so that the left end is on top of the right end. Repeat this several times, each time folding so that the left end is on top of the right end of the strip.


When you're done, keep holding the right end and unfold the entire strip. Some of the creases point vertex up, some down. Can you predict the sequence of ups and downs for any number of times you carry out the folding operation?

Understand the problem
I know that I can take a piece of paper, and stretch it and hold it using both hands. Then I fold the paper so the left end is on top of the right end. After I unfold it,there is a crease point down, we call it "down". We refold it like we did before, then fold it again (time 2), after unfolding, the pattern is up, down, up. Now we know how to fold the paper properly.
The question is clearly asking for a method to predict the crease pattern, say, at time 5, what pattern of "up" and "down" folds do you get?
    Devise a Plan
Plan A: write down the pattern and observe if there is any pattern.
 
    Carry out the Plan 
Plan A: write down the pattern
time 1: d
time 2: u d d 
time 3: u u d d u d d
time 4: uuduuddduuddudd
time 5: uuduudduudduddduuduuddduuddudd

conclusion: it is pretty hard to see any pattern.

Devise another Plan then...
Plan B: 
visualize the problem, draw pictures.

Carry out the Plan:

   
Observation and Conclusion: After drawing what pattern looks like every time we fold the paper, We draw a red straight line through it center.We can see that the left half of the picture is the previous picture, and the right half is a rotated- 90-degrees-counterclockwise version of the left half. The blue line indicates this pattern.The center crease is always "down".
After visualizing and find the pattern, we go back to the plan A to confirm it.
Plan A: write down the pattern
time 1: d
time 2: u d d 
time 3: uud d udd
time 4: uuduudd d uuddudd 
time 5: uuduudduuddudd d uuduuddduuddudd 

Pattern:
the center is always d. left part is the copy of the previous one's pattern. The right part is symmetric to the left part with respect to the center point.


    


Monday, April 1, 2013

Weekly Log 10

What I learned about computers, networks:
Huge impact on everything: Computers have a huge impact on society in terms of work, leisure, privacy, education, and democracy, and other social conditions. Some people say technology is the driving force of society while others believe that social forces that are dependent on technology impose a great effect. It is hard to determine since our sources information regarding computers and society are partisan.
computers and work:
Shifts in the way how humans work: First,computers are the first dramatic shift in the way humans works. Probably the first shift is from hunter-gatherer to agricultural humans, then from production based on humans and animal muscle and individual crafts to manufacturing (industrial revolution).During industrial revolutions, technology increase production, meanwhile, it deprives traditional workers (e.g. weavers) of a livelihood. Some of the workers even smashed the machinery. Those who did gain employment with the new machinery often had to work 12, 14 or even longer every day. In a sense, industrial revolution decrease workers living standard in the first a few decades (ironically).Reports shows that productivity grew very slowly during the first decades of the industrial revolution.
Same paradox happens in computer era. Even though technology largely increases our productivity, it seems to lengthen our working hours. Moreover, many blue/while collar jobs disappeared and lots of people work for longer due to the fear of losing their jobs. In 1980s and 1990s, reports showed that household incomes dropped as productivity went up. Some argue that we have traded more stuff for less time.
Unemployment and jobs: ebb and flow with the cyclical recessions. Many jobs created (services, computer-related sectors)  while others disappeared (typesetting, watchmaking, machining, telephone operators) due to the development of technology.
Working mode changes and telecommuting: Working mode changes dramatically as well.Increasing numbers of worker spent their working time in front of a computer and some use telecommute.Pros of telecommuting include flexible work hours, lower cost for office infrastructure,and a smaller social impact of commuting. Cons include intrusion into home life(lengthened working hours), reduced impact with co-workers, and less "visibility" to superiors.

Technology and privacy
We want network to share and there is a limit of how much we want to share. Some privacy is needed while some is bad, thus a balance is required. Using computers, privacy can be deliberately or inadvertently violated. Even though we can choose to share information narrowly with a certain group of people or with general public, privacy is often violated and information can be widely spread.Truth is, the surveys we do, our website viewing history, credit information, stuffs we buy,even current location can be accessible due to technology.Even laws are enacted to limit the privacy intrusion, computers accelerate the collection and spreading of this information. They also make it possible to combine information from several sources, so that you end up revealing a great deal more than you realized.







Wednesday, March 27, 2013

Weekly log 9


What I Learned about OS:
operating system in the early days of electronic computers prepare a sequence of computer jobs to be run on computers. In order to deal with the delayed gratification, a job control software was developed and could provide the users with output nearly instantly. Rather than have everyone users wait for the first one to be finished,the feedback is provided to everyone  at the same time. The is achieved by having a single CPU slice time between the various users. This is efficient because CPUs spent too much time waiting for resources to become available is there is no time-slicing.

For personal computer OS, initially, that means no OS required since each application took charge of the low-level details.There was only a single application running at a time, so no time-sharing was required. Rudimentary OS meant that the details of interacting with hardware could be delegated to hardware drivers, so that applications could more easily be written too run on different machines. Examples include CP/M and Geco. Apple and DOS made their appearance.

Then, OS for PC has time-slicing to run multiple applications.The power of hardware for personal computers made possible of time-sharing between multiple users, complete networking capabilities, accounting and logging of all system activity. Unix found its way to PCs in the form of linux and the Mac's OSX, and many capabilities found their way to the desktop with microsoft's NT.

An operating system should contain a kernel, providing access to hardware while shielding application soft ware; and a system utilities for file compression, dis fragmentation or formatting hardware.

My question:

How does the time-slicing work? I am quite confused about it .




Friday, March 15, 2013

Weekly log 8

What I learned this week:
sierp

; sierp : number -> image
; Sierpinski's triangle of depth d


(define sierp_0 15 "solid" "green")


; sierp : number -> image
; Sierpinski's triangle of depth d
(define (sierp d)
  (cond
    [(zero? d) sierp_0]
    [(above (above (sierp (sub1 d))
   (beside (sierp (sub1 d)) (sierp (sub1 d))))]

How does it work??

 first, if d is zero, DrRacket produces sierp_0, which we define as a  size-15 solid green triangle. If d is greater than 0 (above 0),say d = 1, we get
[(above (above (sierp (sub1 1))
   (beside (sierp (sub1 1)) (sierp (sub1 1))))]
=>


[(above (above (sierp 0)
   (beside (sierp 0) (sierp 0)))]
=>
now we get a sierp_0 above two sierp_0 sitting side by side together.
basically, sierp_0
        sierp_0 sierp_0

Feedback on the test:
I think this test is harder than the last one because neither my friend nor I had time to check it over, compared to the last time which we got 30 minutes left. And I think I got the first question wrong because I didn't know what the question was asking about by "how is the way computer store info differ than the way viewers see the info?". Can I say viewers view a picture while computer store a bunch of bits?

Reminder for myself and my friends in this class:
The deadline for wikiproject is approaching (next Friday),please make it adjust your schedule and to-do-list! I hope this time I can ace it!!








 

Monday, March 11, 2013

weekly log 7

What I learned about contemporary computer architecture:
  some main features of hardware architectures: a Central Processing Unit, which contains an ALU and a control unit.
  Control unit is responsible for sequencing the operations. Evolved from physically soldering together circuits or connecting them with plugs, the sequencing instructions are now stored in main memory.  These information are represented by a list of numbers, called op codes. This is how Von Neumann architecture works basically.
  The choice of instruction set is important. One is a small set of simple instructions and the other one is a large set of more complex instructions.The CPU communicates with main memory over a bus which refers to a set of wires.The CPU can get smaller amounts of memory for immediate use, called register; and intermediate amounts of memory called cache, and main memory requiring small, medium and large amounts of time respectively.
  Here is how machine cycle works. Say there is a demand to add two numbers stored in main memory. The first number is loaded and being copied the contents of Address A1 into register R1. Next the machine cycle loads the second command into instruction register and decodes it and advances the PC to the next command address, loads the contents of main memory A2 into register R2. The result of the operation is stored in R3. Next the machine cycle loads the third command into the instruction register, stores the contents of register R# into main memory location A3. The next command is loaded then and the machine cycle stops.

Feedback about Project:
The project ecosystem is not easy. Especially for the last definition. It was not until that I went to helping center that I realized that in order to make the big bang work, ecosystem should contain variables to update every time instead of constant numbers.Because I didn't pay enough attention to the instruction on top of the DrRacket File,I thought I did something wrong because when I clicked "run" nothing happened. What I learned from this is always be meticulous and careful, plus contact with Professor and TA in time to avoid tortuous path.

Question about the coverage of upcoming test:
Does it cover recursion videos (4 of them)?


 

 









Thursday, March 7, 2013

Weekly log 6 post reading week


This week we learned:
We learned a coding/decoding method called ROT 13 and we actually created a function on Dr.Racket to mess with. The idea is easy to comprehend to humans, however, like the peanut butter sandwich recipe, we need to be very specific and consider each situations, like considering the case that our input is not a letter, for instance, ? or =. In this case, we need to use a function called cond
(cond
[question1 answer1]
[question2 answer2]
...
[else defaultAnswer])

If question1 evaluates to true, answer1 is produced. Otherwise we move on to the next question/answer pair. If none of the others match, we get else/defaultAnswer.

Thank to Dannyexplanation, not it is really clear.

If we input an ?, we should get a ? back.

My questions about assignment 1:
The ecosystem one:



; update-ecosystem : ecosystem -> ecosystem

; Produce a new ecosystem accounting for new

; mouse and fox births and deaths.

(define (update-ecosystem eco)

(make-ecosystem

; max makes sure mouse population doesn't drop below 1

(max 1

; !!! fix the expression the comment below describes.

; subtract number of mice that get eaten annually from the number

; of mice in eco, plus the new births

(- (+ MICE-START (new-mice MICE-START )) ;mice in eco plus the new births

(eaten-mice (+ MICE-START (new-mice MICE-START )) ;eaten mice (mice) (foxes)

(+ FOXES-START (new-foxes (+ MICE-START (new-mice MICE-START )) FOXES-START)))))



; max makes sure fox population doesn't drop below 1

(max 1

; !!! fix the expression the comment below describes.

; subtract number of foxes that die annually from the number

; of foxes in eco, plus the new births

(- (+ FOXES-START (new-foxes (+ MICE-START (new-mice MICE-START )) FOXES-START) 
foxes in eco plus new births

(dead-foxes (+ FOXES-START (new-foxes (+ MICE-START (new-mice MICE-START )) FOXES-START)) ))))))
dead-foxes nf nm

However when I run it, the mice eat all of the foxes immediately! 
What did I do wrong?