2013年11月30日星期六

Last remark: On privacy, and my answer to the puzzle


It is so sad to say that I missed the very last lecture. What even sadder, we got back our paper on the tutorial and I did only slightly above average :( Again I got full marks for programming, yet I got only 3 points out of 10 for the first 2 question on Internet. Definitely I should work harder for the final exam.
To begin with, my answer to "product of sum":
(define max-n
(cond
[(equal? (quotient n 3) 0) (expo 3 (/ n 3))]
[(equal? (quotient n 3) 1) (* 4 (expo 3 (/ (- n 1) 3)))]
[else (* 2 (expo 3 (/ (- n 2) 3)))]))
This puzzle, for me, is more of a mathematical challenge than a programming challenge, and after learning about Dr. Racket, I find that learning a program is just like learning a new language, as long as you get how ideas are expressed then there is not much things to worry about. You only need to naturally use these expressions. You will even enjoy it!
On privacy: Internet has penetrated into all the aspects of our life and work. We can study and work by it. We can find a job by it. We can communicate by it. We can entertain by it. We can buy and sell by it. We can do almost everything on Internet, and almost anywhere, anytime.
However, at the same time Internet provides services for us, it is inevitably invading our privacy to some degree. The services on most websites require our registry. If we want to enjoy these services, we have to provide much private information, including our names, gender, address, telephone number and sometimes bank accounts. Due to the poor Internet administration and weak network security, our information might be open, stolen or sold. Even sometimes the information will be misused by the criminals.
Considering the above mentioned, we must enhance the alertness when using the Internet. First, when we need Internet service, we should always log on those big legal websites. Second, if the service requires important private information, you should think twice before you type in it. 

2013年11月14日星期四

No single reader... So lonely

:(

Nov.14th New puzzle comes!


Yesterday we had term test two, which counts 6% of total. For me the Racket questions were fairly easy but I found the first two short answer questions really really challenging. The first one, asking about whether it is essential for government support on the creation of internet, sounds very stupid to me (well I mean I got stupid when seeing this question). I ended up using the common sense in the last couple of minutes because I just could not relate it to lecture materials. By contrast, the second one was so specific. My brain was stuck when learning about the internet and thats exactly what Danny asked about... Good shoot...

Before the test, we still had a two-hour lecture as usual. This time we talked about some social issues such as how many hours of work do we prefer to have every week. It might sound illogical that although modern computers and machines have been used to replace the majority of human work, we still end up working for longer hours and also harder than the past generations. One possible answer I could come up with is that we are now opening a broader and broader market on production and consumption so that far more works are required  than ever before. 

Anyway, what I really want to talk about is the new puzzle problem: the biggest possible product of a series of numbers that have the same sum. For example, the list of positive integers that add up to 1 is (1), and the product of this list (if you allow unary products) is also 1.There are two lists of positive integers that add up to 2, and they yield two different products: (2) (with product 2), and (1,1) (with product 1). There are several lists of positive integers that add up to 3, and they yield several different products: (3) (with product 3), (2,1) (with product 2), and (1,1,1) (with product 1). And the puzzle is: If n is a positive integer, what is the maximum product that can be formed of a list of positive integers that sum to n?

Intuitively, I think working out this question needs the previous knowledge on recursion, but I can not think of a solution immediately. Also, a good way to get further is to try some small numbers, after which I got the idea that the biggest product is made up of threes or all three but one or two twos. Maybe we can split it into five conditions(n=1, n=2, n=3, n=4, n>4) but again, I fail to get the entire, logical solution. Nor can I suggest a clear way to work this out. As we have learned well before, there are mainly four stages of solving a problem: Understand the problem, devise a plan or two, carry out the best plan, and lastly look back to verify or seek for breakthrough, It seems that Im half way to the second stage.

Love puzzles anyways. To be continued...

2013年11月7日星期四

Nov.8th A few things to talk about


We are going to have another test just next Wednesday.
Yesterdays lecture was also not that easy for me. We talked about 3 different ways how computers communicate with each other. Danny was so well-prepared that he used vivid schemes and even held a physical activity in class to help us comprehend. I could follow him this time yet I was worried if I got all the points he mentioned about, since all the details might appear on the term test as short answer questions which I didnt do well last time.
Dr. Racket was getting boring...... I wished that we could have another function to learn but we just used recursion tools to represent the same idea we had learned in the last class. I also wished to have another puzzle to solve but we didnt. Generally speaking, Im much more fond of programming than the long long history of computer and beyond.
Slogs are getting much shorter...... Does it mean that Im getting smarter(because I avoid writing dull things and is getting used to everything especially Dr.Racket) or lazier?

Oct.31st Hard lecture


Happy Halloween!
We moved to another topic and talked about the operating systems in modern computers and I didn’t quite follow it :( Although we are only supposed to know how they developed and applied to computers, I was always trying to figure out why those programs worked and that’s obviously beyond my knowledge. The first lecture was like a brainstorming to me and I was frequently lost in my thought and missed what Danny talked further about.
However, Dr.Racket was fun and easy. I think I’ve got used to its language and had also successfully written down some unique small programs to produce images of my own. It was really cool.
Also, a quick summary of Sneeze project. It is due on Nov. 1st and Im again ahead of schedule. This project seems to be a collection of functions in Dr. Racket. I didnt face any difficulties writing each of the expressions thanks to the videos, the practices during the tutorials and the quizzes which highlight the key features. However, when I happily clicked run to watch for the output, I was shocked and confused at the result showing that there was no single red dots appeared! Luckily it didn’t take too long to figure out the bug, which is that I typed the function Immunity wrongly with quotation marks! Then I fixed it immediately and it worked just so nicely:)

Oct. 26th Summmmmmmmmmaries!


The worst thing in the world is to pick up what you should have done well before. Last week we talked about how computers present images and sound using a series of bits and right after we had a 50-min term test. We were allowed to bring an aid sheet yet I found it useless with the actual test. All in all, I’m not very positive about the result but I tried my best to think actively and answer each question properly. Hopefully it’s not too bad.
For the lecture this week we moved on to a new topic discussing how memory is encoded, stored in different devices and prepared to be retrieved. It didn’t surprise me that the whole process is just like how human brain deals with memory. I’ve learned some relevant knowledge in previous Psychology class and had a few experience on programming( of course programming is needed to determine what to be loaded and what to be stored .) so it’s not so hard to hit the point when it comes to computer. The main challenge for me is to think about how to make the devices smaller, to get rid of heat as well as to store more memory within limited space. I’m always able to get the most advanced devices sooner or later, but it seems that I’ve taken them all for granted without thinking even a bit about what on earth make them work. What a shame that the machines are getting smarter and smarter while we just end up being duller and duller! Anyway, I love the idea of discs, in which each small dip on the surface represent a zero and each flat represent one so that all the memory can be encoded into binary bits and then written in the disc. Moreover, you can even classify different kinds of information by naming a series of folders and gather similar information together. 
What was most fascinating: Paper-folding puzzle solved! Thanks to the function COND (condition), we were able to recursive all the previous steps to form a complex crease. The general idea is that for crease-pattern n, it is a combination of three parts: the right part is exactly the crease-pattern (n-1), the middle part in D( a single downward trend) and the left part is exactly the inverse string of crease-pattern (n-1). Frankly speaking, I cant see any mathematical theory in this solution, but this is obviously easier to effect than my idea presented before. Therefore, we still choose this one to write into program because its more easy to present and work out.

2013年10月15日星期二

Oct.9th Summary of Wikiproject.


By now Ive almost done with my whole assignment on Wikipedia. 
As is suggested by Danny, we can either choose 3 articles which need simple improvement or focus on one article that need various polishments such as formatting, checking spelling and  grammar, translating etc. He also suggests that we select the articles listed under Help Out in the Community Portal. However, I plan to work on an article other than those. I asked Danny if its okay to do so, and luckily he said it fine as long as I do enough work and really learn something during the process.
This following is the link to the article which I want to work on:
https://en.wikipedia.org/wiki/Kira-Kira
Kira-Kira is a young adult novel which I have read in versions of both English and Chinese. Thats one of my favorite novel for teens! In Wikipedia, however, theres only a plot summary for it and theres no reference. Based on my understanding to this book as well as the privilege to get access to Chinese version, I planned to do the following improvements:
1.Polish the existing plot by fixing spelling and grammar, updating more detailed information as well as adding links.
2.Create new lead sections: Introduction of the author (I have a photo-copy of an interview of the author on the Chinese-version book, and I plan to try my best to translate it into English); Background information of the story (the special situation of Japanese-Americans); The main themes (Ill summary by myself and might quote some paragraphs that are related to the themes).
3.List a series of questions to readers(especially young generations) to reflect.
4.Translate some paragraphs into Chinese by my own to make it bilingual :) (I wonder if its necessary)
Although I havent received the feedback from my TA yet, I was so curious and eager that I could not wait a single time to design my own page on Sandbox, which is definitely a cool invention. People use it to work on certain topic with his own ideas while without disturbing others works. I havent yet sure about how you can let your distribution appear on the real page instead of the sandbox, but this does not really worry me as the sandbox is good enough that it looks exactly like a real page. I just enjoy the process and appreciate it very much :)
However, when I was about to carry out my plans on Wiki, things were just so different. First of all, it disappointed my that the internet is too powerful than what I imagined. I got a study guide listing a series of questions from the paper-version book which I had planned to add to the page as a new head section, but after a broad search on the internet, I just found a free and same version on line! My goodness... This meant that there was no more need to list them as a new section but I could just add a new link named Study Guide under the section of References. Luckily, although there are a lot of interviews with the author, I didnt find any as specific to the topic Kira-Kira as the one I have, although its in Chinese. So I translated it into English and added a new section called Interview with the author by using the notation ==  ==(Actually I also added a subheading using ===  ===). Another thing that surprised me is that when I learned about how to insert an image, it turned out to be a huge amount of steps. Not only do they ask about where and how you get the image to make sure it is legal, you are also responsible for any further use of the image to Wiki and even elsewhere. I was really moved by this because it can indeed enhance peoples awareness of law. And such rules can also help to put an end to the abuse of copied work.
To sum up, what I have done so far are as follows:
1. Expand the general information prior to head sections by adding new information and form new paragraphs. Also add new wikilinks.
2. Fix several grammar mistakes in the former plot summary, the majority of which are false of the tense. Split the summary into two parts and name them separately as two subheadings.
3. Translate and new heading, as mentioned above.
4. Add two new images.
5. Add new references.
By the way, the key feature about this Wikiproject is actually to understand and work on SC(source code). You need to go through several notations and learn about what changes they actually make before you start your work so that you can make everything neat and systematic, and which is most important,it works!

Im running out of time writing this...... Anyway, I love this assignment, as well as this SLOG Im just working on. It was a challenge, but I see it as a treatment now. Although Im confident that I will get a high mark on the assignment, thats not where my efforts pay off. Again, I just ENJOY the process so much.

Ps. Things to highlight for todays lecture: We talked about binary system which computers are based on and compared it with the decimal system that is commonly use in our anathematical computation. We multiply each digit of a integer by the appropriate power of ten to get its value, divide it by the base ,which is ten, and round it down when we drop a digit from the right and multiply it by the base ten if we add a zero to the right. The binary system works exact the same except for it is based on two instead of ten. Every time you add a zero to the right of a binary digit, it is doubled. And thats the underlying language of computer. Interestingly, we humans always like to make things easy, as 5897 is just 5897, while computers seems only like complex things. I learned in the lecture that a decimal number as simple as 40 is represented 101000 in binary system, let alone 5897! Well, maybe thats why we invented such a complex and power machine, so as to stay lazy......
And which interests me most, we learned to define a term today, in the middle of which the same term just appears again. This means as long as you meet with this term, you should go back to the initial stage of the definition and do the orders again. This conveys the big idea of recursion, which, as Danny pointed out when I asked him after class, is going to be extremely useful when we work out the paper-folding puzzle. Aha, did I talk about of the puzzle so often? Thats where my main interests focus:)
Todays Dr,Racket is pretty easy. List, structure and map, as long as you figure out the meaning of these functions and get used to them, then you are done. So far I got all my quizzes full marks. I think Im getting smarter thanks to my paying fully attention during the lecture. That really helps. Also it works with me to prepare beforehand by watching the videos.
We talked about the term test next week and Ill focus on it very soon. I guess Ill write a summary some days later in the blog too.
Finished for today! Cheers!