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 that’s 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 I’m 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.
Yesterday’s 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 didn’t 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 didn’t. Generally speaking, I’m much more fond of programming than the long long history of computer and beyond.
Slogs are getting much shorter...... Does it mean that I’m 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 I’m again ahead of schedule. This project seems to be a collection of functions in Dr. Racket. I didn’t 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 can’t 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 it’s more easy to present and work out.