Tuesday, April 2, 2013

Interesting Privacy Problems:)

For this semester's last slog, I am going to talk something about my opinion of privacy problems we discussed in the lecture on Tuesday.

For the time I have come to Canada, I have met a lot of situations of asking about my private information. I have to say, that makes me annoy. I have to say, there are so many donations in Canada, and there is an organization called "I am a Girl". This organization's members always standing on the street, and ask passengers to make donations. Unfortunately, I got stopped once, and they introduced a lot of information to me, and finally convinced me to do the donation, and they also got my credit card information. However, I do not want to do this donation any more, because I am a student, I actually have no money for myself, but I have to provide 25 dollars each month to them, which make me short of money every month. And in the lecture, Prof. Heap also talked that we never know where those money actually goes. So sometimes we really need to be careful about providing private information of ourselves. 

This lecture also reminded me about my management lecture, we talked about long distance calling these days. With the high speed of development of technology, the price of call different countries is extremely low recently, and it is surprisingly almost the same as local calling. So some abroad promotions appear. There is a company named "Duck Cleaning", and it is located in India, but everyday they have a certain group of people to call different countries to promote they products. But the thing is, "how do they get our phone numbers?" This is a serious problem. For phone numbers, we can say they are private information, but at the same time we need to give our phone numbers to other people, so at the same time, phone numbers are not private information. However, we want to take control on our information so that we can share our information to people we want them to know. Unfortunately, the reality is not as ideal as what we thought. Our information has been sold to other people, and even other countries. And our information also helps the information provider earn lots of money by selling our private information to others.

So from above I have experienced, I have to say that if we do not take care of our information, and if we are not aware of protect our own information, then our information will risk our life. So we really need to be careful about providing our information, and then we can avoid those things happen.

Sunday, March 31, 2013

Term Test 2

I am sorry that I post some comments of my own term test two. For this term test, I felt it was not hard, and all those staff was talked in lectures already. I got two questions wrong, the second one, and the last one. I am very interested in recursion for this semester. And I also wrote a SLOG for recursion. And the last question on the test paper was not fully recursion, but the way of giving the code is similar. The whole process should be completed step by step.

For the basic concept, I know how to follow the instructions step by step, and the code is not hard but clear very much. When I was doing CSC104's term test, I always felt that I can do really well on this course, because I really get all the materials taught in lectures. At the same time, I do not need to recite all the histories of computer science, that is the best part I like. By preparing aid sheet for the tests, I can have more time to understand the material I learned on classes, and I can answer test questions based on my own understanding of the problem, and use precise words and terms to answer the question with the help of the aid sheet. So I feel this way of learning knowledge can really help us understand what is happening in computer science. I love this style of teaching so much!!!

However, I was careless when I was doing the test, and I got the last question wrong. When I was doing the second part of the question, the string-length is 3 now. So I need to use the first condition to get the next string, but unfortunately I forgot one letter when I was doing the string-append. I definitely know how to do this question. But just because of carelessness, I lost one letter of the new string, and then the final answer is completely changed. Therefore, when I gave my summary for this code, I provided the wrong conclusion based on my incorrect final answer. What a pity!

This time, I made a stupid mistake. I got the last question wrong was not because I did not know how to do it at all, but carelessness. I rally feel disappointed about myself. But I will keep confident for myself, and I will do my best on the final to correctly answer all the questions I know!

Saturday, March 30, 2013

Project 2!!!

As we have finished Project 1, we now this week got our Project 2, which is excited because I did a good job on the first project, and I learned a lot from the first one, I expect my work this time, and I hope I can get this done quicker and skilled.

We get three parts for this project this time. And in this week, I only finished the first two parts, which is not so hard and they are the materials we are supposed to master for this semester. The first one is called contrast. This project is amazing, and I like this effect of this program. By finishing this code, we can increase the contrast of any picture we pick, and we can make the pictures more beautiful, which are more like some arts!!!

And for the first one, I did not have so many problems. I follow each step shown by the instructions. And after I compare different defines and check-expects in this code, I finally figured out all the tests, and all those tests were passed. And within this code, we also added the "key-press" part, which make the contrast process easier and more convenient. By using “b”“g”“r” on the keyboard, we can control the level of contrast we want to add on the picture. And when I was see the difference of two picture, with one has a higher level of contrast, the other one has a lower level, I felt this code is awesome!!! And one example of a pair of picture of comparison id given below:









For the second one, it is called fractal. When my group members and I started this one, we got in trouble. We did not know how to give an example of sierpinski, and we tried all kinds of ways to describe it, but none of them worked. We went to ask one of the TAs we met in lab, but she even did not know what to do:((( We were so sad about it. But luckily Prof. Heap was having his office hours. So we went to his office to get some suggestions. And it really helped a lot. He explained everything for us, and taught us how to figure out this kind of problems. And I found that CSC is really about logic, and each step is based on the previous one. And we also need to be very careful!!!!!! I still remembered that last project was all about big letters and small letters all those kind of stuff.But this time I learned from the last time, I was really careful, but I still feel I did not get on the right track right away. I hope as I practice more, I could get better on it. 

The codes took me pretty long time to finish them, and get them work properly. But I enjoy the process. I can learn how to build up my mind logically, and it is like teaching little children knowledge that they do not know at all, so I have to provide every detail about the knowledge, and explain as clearly as possible. So CSC is hard, but I really like it!!! Hope I can learn more, and get on the right track quicker next time!!!:)))



Friday, March 29, 2013

Working hours for a normal human!!!

For today's lecture, it was really fun, I enjoyed it so much!

Today, Prof. Heap talked about the technology we created for efficiency and effectiveness in human society.Prof.Heap told us, if a human keeps working up to 21 hours without any rest, this person will feel so tired and he/she cannot focus on the project properly, and some problems will occur. It is very dangerous.

And we also drew a chart of human's productivity under crunch mode:
In this graph, we can see that above the time-axis, the shaded area is the productivity. As we can observe that at the beginning, as time goes by, our output is increasing, and the productivity at the beginning hours is really high. However, after a certain amount of time, the output becomes to decrease, and at a pretty fast speed. Surprisingly, at a certain time, output can even become negative, which means the total output is decreasing, and at an increasing speed. As we have been explained in the lecture, the negative productivity is because as a worker works too long, some unavoidable mistakes will occur, and the worker cannot concentrate on the work very well since he/she is too tired to work properly. Therefore, this is the reason why the crunch mode for human is not possible, it will not increase efficiency, but ruins all the work which has been done. 

So, from this lecture, I learned that, no matter work or study, we cannot just keep doing something without any kinds of rest. Even though we believe that we have the ability to finish all the work within a continuous working process, but our body is always honest. If the body cannot work properly, even if we have our spirit to support us, we still cannot do everything as good as we expect. From learning this kind of information, we conclude that enough rest is necessary for our bodies to recover, and then we can do work by a higher productivity. So no matter how busy I am, I will cherish my body, and I will rest if I need rest. And then I can do a better job!!! 

Monday, March 25, 2013

Binary calculation of computer

For the binary calculation, I learned it when I was in middle school. It was amaing for me at that time that everything can be translated into a series of "1" and "0". Anything you can type in a computer, it can be translated into numbers, and then the computer can give respond so quickly from translating those numbers into the languages we understand. And in the past, I only knew a little about how to translate base 10 numbers into binary numbers, but now I also get an idea of how to translate symbols and words into "0" and "1"!!!
This is the table we learned in the lecture, and it demostrates how we can use numbers to stands for symbols. I feel it is a lot of fun because maybe one day I can use this method to create some private code with my friends and nobady will understand us. :)))

And we also learned how to do binary addition and multiplication. Which is pretty much the same as base-10 addition and multiplication. So I did not find it is hard at all, but the result is really long so I need to be very careful when I am doing the calculation.

I love doing calculations but the history we talked in lectures were a little bit abstract. I am a visual person, for different parts of a thing I need to see the whole parts of this thing and see where they are setted. But for the lecture, I cannot imagine where the part is in the computer, so I I feel the lecture is kind of abstrct for me. And when I am answering some hard questions on the text about the functions this part has, I cannot figure out all of them.

But next time, I will download a picture from the internet, and I hope I can get a better understanding of all the lectures, and I will do well on the exam. :)

Thanks for Prof. Heap of giving such a good course to us. I will put a lot of efforts on this course.

Sunday, March 24, 2013

Recursion is like a animation, fun!!!

This Tuesday, Prof. Heap gave us a handout to do some practices about recursion. Throughout the whole exercise, I only had two basic questions, but both of them got solved after that lecture. The first question is the term "outline". I do not understand it because for those exercise we did before, we always provide a shape with "solid" as a term to describe its property. But at this time, we got "outline", and I start feel confused. However, after I asked Prof. Heap, he told us "outline" means a shape only contains the outline but not a solid one, it is an empty shape. And the other question is that I do not understand what "below" means, and I thought below means put every thing in order in a vertical line, and the later one is below the previous one. But I found I was wrong, below means put every item in one horizontal line, but start from bottom of the previous one. So I really feel I learned a lot of things.

And because of that lecture, I really get interested in recursion. In this class, I got some amazing pictures:


For the first picture, it is like a maze!!! From creating this picture, I start to have the thought of making a real maze by using recursion. I know the process will be really complex, but I still would like to have a try first, and if I can figure it out in the future, I will definitely post online to show everyone my own maze!

And for the second one and the third one, they are both symmetrical. For the second one, we can use this kind of knowledge to create accounting table or other kinds of tables for calculations, ect. So it is very helpful. For the third one, it looks like a snowflake, and it also has a nice name related with "snowflake."
But unfortunately, I did not remember the the whole name of that shape. But for this shape, we can use it as decorations in this society, and it can make our life more colorful!!!

I really hope I can know more knowledge of recursion, and then I can create more beautiful things and make my world more fun!

Wednesday, March 20, 2013

Project Ball has a lot of fun!!!

After doing the first project, I got some confidence on doing the second one. However, as I finish the first glance of this ball project, I felt that I could not understand English anymore... I did not know why, at that time, I really could not understand what was saying on the project, I tried to read through the whole process many times, but I failed understand what I needed to do to get the result I needed. So the second day, I asked Pro. Heap about what was going on in this project. And I found that I was limited in the thought that "check-expect" and "define" are almost the same, what was written in "check-expect" was the same as what was in "define",, but this time, we added the term "boolean". Because I was not sure about the meaning of boolean, so everything I did so far did not make any sense to DrRacket.

Luckily, after asking Pro. Heap and getting the exact meaning of boolean, and I suddenly felt everything is not so hard, and I could figure out each step with my group mates. 

But everything was harder than what we thought, I did changes based on the knowledge I had and the instructions given to us, and I found that we still got many things wrong. I remembered our problem was the ball's y-direction. I did not realize the difference between the dx, and dy:
       [(and (> (ball-dx b) 0) (past-right? b)) (- (ball-dx b))]
       [(and (< (ball-dx b) 0) (past-left? b)) (- (ball-dx b))] 
       [else (ball-dx b)])
and

[(and (< (ball-dy b) 0) (past-top? b)) (- (ball-dy b))]
       [(and (> (ball-dy b) 0) (past-bottom? b)) (- (ball-dy b))]
       [else (ball-dy b)])

I put the same sign as showed in dx, so I got everything correct, but only this part bothered us for a long time. And with another student's help, we figured out what was our problem. Even though I knew this mistake was so stupid, but it was always good to learn from our own mistake, so after finding out our mistake, I understood all the steps we did. So I felt that I got closer to the world of computer science, which made me really happy.

And as we tried and asked TA about the key-press, we finally also got the answer for key control of the ball. Now, I am really proud of what we did and what we learned from this class. It does not matter whether the material we learned is real computer programming or not, at least we can develop our ability to explore things we do not know, and we get improved on working with other people. So I really appreciate the way Pro.Heap teaches us, and I will keep learning carefully, and I will definitely love computer science more!!!

Ecosystem——complex, but very interesting!!!

First of all, sorry for the delay of posting slogs. 

So two weeks ago, we got our first project to do, it was a real programming project for me! In this project I need to understand every term first, and then follow the instructions to write down some definitions and check-expect to make every test works properly, and get the "real" ecosystem on our laptop!!!

The first problem for me was that there were so many terms! For me, in this course, it is more logical than other kinds of courses. So I need to remember all the basic things, and based on those basic terms, I can build different DrRacket files. So in ecosystem, I have terms like"MICE-START","FOXES-START", "FOX-DEATH-RATE", "MOUSE-BIRTH-RATE", "FOX-MOUSE-EAT-BREED-RATE","FOX-MOUSE-MEAL-RATE". So in this process, I kind of confused a little bit, but luckily I got through everything. And I started to read through all the work I need to do. I carefully followed every instructions, and I felt the whole thing was not so hard, because "check-expect" and "define" are pretty similar, I could get hints from either one. So after I finished all my work first time, all 9 tests in this project passed. I felt very happy. 

However, the second day, I went to ask Pro. Heap about my project, I found that my update part was not successful. And I also got an idea how to edit that part, and I, with my group mates, went to lab to figure everything out. And that this time, we really met some troubles. When we trying to replace each term by using eco, we mixed up a lot of things, and we accidentally got the wrong equation for finding the total amount of mice and foxes. So we tried the useful hint we got from other students, but we failed the test. We were so disappointed, because replacing each term in the equation took really long time as we did it very carefully, but unfortunately, we were not careful enough. But as we all know, making a mistake is really easy, but finding what is wrong is really hard. So finally, we decided to delete everything we did, and check everything we had already did. And after 10 minutes, we found that we got the wrong equation. And then we took a long breath, and kept working on this project. So after we corrected the mistake, everything went pretty smoothly. And finally we got our updated ecosystem, which made us really excited.

As for our group's result, at first, if we set mice number and foxes number into the balance ratio, we got fox' picture and mice's picture are same size. But if we change anyone's initial amount, then the size of the pictures of those two animals are not the same any more——one picture will become larger and larger, and after a certain amount of times to grow larger, this picture will become smaller and smaller until that picture almost get disappeared. This process reflects the real situation in real ecosystem. So I suddenly feel that computer science is so amazing, everything in this world can be modeled by computer, and we can also create our own "society" on computer!!! I wish I can learn more in this year, and get more knowledge of making lots more interesting programs!:))) 


Sunday, February 17, 2013

Animal Cow!? Hard! Hard! Hard!!!

For this week, actually, the lectures are not hard, we even did some of them last week. And it includes the "list" thing. I felt it was hard. But finally I got all of them, because we have the video to watch:) I love the videos so much. I can pause it whenever I want, and I can take some notes even when I was watching it, and I can do some practices, too, which really helps me a lot!!! However, I reviewed for the quiz so well, I took a lots of notes, and I remembered them all. And I was so confident on the quiz. But surprisingly, I got one question that I could not understand what the question is asking!!! The instructions for me were too confusing, I do not know what is going on on the defining session. And this is the first time I feel that I did not review so well. Usually I help others to review, and we all get good marks. But this time I felt I still have something to learn, so for that question, I will ask Prof. Heap next week, and understand it fully. I really want to be a producer in Computer Science's world. And I believe I can do it!!! So try it J!!! I know you can do it!!!

Sunday, February 10, 2013

The Start of Many Things to Work with!

This is the fourth week of this semester, and during this week, we got our mid-term test, which is so exciting!!!!!!!! But when I was reviewing for the test, I felt worried about the test, because there were two historical questions last semester, but I was not sure how many we would get. But this is the first time, and first class to get a test with an aid sheet. I really like the aid sheet. Even though I have to say that I really did not use it much, but this is a really good way to help us organize everything and then write notes down to enhance the memory. And the best thing is that we can use this aid sheet to help us review for the final! I love the way Pro.Heap give us the test. And from this way I really learned a lot of things.

However, not everything in this week was easy. I also felt a little bit rush when I was listening to Tuesday's lecture. I knew everything was based on the programs we had learned before, but I just felt all those materials were given too fast,I want to understand everything, but then I do not have time to take notes (I am not a person who can repeat every programs we taught on lectures). So I just tried my best to take all the notes, but I got a lot of stuff not quite understand. But that's OK, I will work harder next time to be a good producer for this society and myself. Good Luck!!!!!!!

Sunday, February 3, 2013

LOLCATZ!!!!! Hardest Part So Far!!!!!!

  For this week, I found that everything is becoming harder. I remember for the first class we had an exercise of lolcatz. And from this class I found that everything becomes complicated now. Before this, everything is more focused on history, introduction and mathematics. These things are really interesting for me that you can think by yourself and then try different ways to figure out the answer. However for last week's class I became confused. I tried to ask Prof. Heap about the questions on lolcatz, but I still did not get it, and I even did not know what we are supposed to do for that exercise... 
  I know as we learn more and more, the materials will be harder and harder. But the good thing is like Prof. Heap said, "I do not want you guys just to be consumers, but I want you to be producers. You can learn how to really produce some programs yourselves, and then you really master all those materials." I really like what he said, and those words encourage me to try my best to do everything. And I do want to master all the materials he taught us, so I went home to study and read corresponding materials on the textbook, and watch all the video he provides us. For the first time, I did not get what was going on on the video, but I did not give up, I open the DrRaket at the same time to follow things mentioned in video, and did step by step to get a better meaning of each point. I watched the video again and again to make sure everything was clear enough for me to study further with lectures. And I also wrote down my questions to ask TAs before quiz on Friday. So I know I tried really hard. And I am confident that I can do this course very well. 
  So I will continue doing work on this course, and I hope I can do well on next week's test!!! 

Sunday, January 27, 2013

Crazy UP and DOWN


         Crazy “up” and “down”? Crazy “up” and “down”!

Have you ever thought about making a paper into several ups and downs by folding it in a certain way and then record the result for each fold to create an algorithm for it? I always feel this kind of questions should be put on mathematic competition paper. However, we are actually doing this on our computer science class, which make me, a math girl, feel excited so much!
  Before getting answer of this question, there are several steps we can follow. We need to follow the instructions first, and then write down each step’s result, next we need to analyze those records, and finally we can get the answer.

(Understand the question and follow the instructions)
We were told to fold the paper in a certain way. This is really important; because you need to follow the rules and then we can get the correct results. As we did in class, some people fold in a different way, which means that they did not follow the instructions so much; thereby they got a completely different answer. And our instruction is that we fold the paper from left-hand side to the right-hand side, and record the direction of the crease, and then fold the paper again from the left (closed side) to right (open side).Keep doing this folding, and write down every result, we can hopefully find a pattern of all those results. However, it’s impossible to fold the paper as many times as we want, because as we fold the paper for six or seven times, the folded paper now is too thick that human cannot have such strength to fold it anymore. So the only thing we can do is to analyze the results we already get so far and estimate the following ones, which means we need to create an algorithm for the patter.

(Pattern I tried to find and some sample pattern)
The one I tried:

As we can see from above pictures, we notice that as we do one more fold, we will one “up” and one “down” just beside new ceases we got from the previous fold. So the new creases are actually based on those previous ones. So if we can build up an algorithm in DrRacket, to give this kind of define, then we can get the patterns right away just like we did on the Fibonacci one. And then we put every time’s creases “up” and “down” together, so we will get the final answer for the question.

Sample answers:
1.  As we were shown in Tuesday’s lecture, we can draw the creases and after we do some samples, we can easily find that if we draw a line as the symmetrical axis, we can rotate the right-hand part counter-clockwise for 90°. And then if we want to get the next one, we just need to copy the previous one’s shape on the right side, and then rotate it for 90°to get the left side. And we will get the new crease. So in the same way, we also need to use the previous one to get the next one.

2.  For the second one, we write down each fold’s creases. ( "U" means "UP", "D" means "DOWN".)
                                                                D
                                                             UDD
                                                        UUDDUDD
                                             UUDUUDDDUUDDUDD
                       UUDUUDDUUUDDUDDDUUDUUDDDUUDDUDD
UUDUUDDUUUDDUDDUUUDUUDDDUUDDUDDDUUDUUDDUUUDDUDDDUUDUUDDDUUDDUDD


So from the above records, we can find that the right side of each fold is exactly the previous one, and except for the middle D, we also notice that that each “up” and “down” is just opposite to the one it faces on the right side. So the same theory, we still need the previous one to get our next pattern of the creases. And if we want to do maybe the 1000th fold, it is really a huge work to do. But as long as we follow the ways we found from the above three methods, we can get it, even though we need enormous amount of time!