5.4.13

Last Week

Today is the last day of this semester.

As I mentioned before, I was very nervous when selecting this course because I considered myself as a "computer illiterate". But gradually as I learnt part of the history of the development of computer and some Dr. Racket commends I started to be more confident about my computer-related knowledge. Also, contributing to Wikipedia made me really proud of myself as it is my first time to bu a "contributor" instead of a "user" of Wikipedia.


Overall, I think the CSC104 course I take in this semester is really helpful to me. I would highly recommend this course to student who has interest in knowing something about computer but is not confident about him- or herself. :)

Problem Solving

The problem I was working on is from Professor Heap's email:



Suppose you have tiles that are 1*2 rectangles, and you have a walk that is 2*3 units long. There are three ways to tile your walk: three vertical tiles, on vertical tile followed by two horizontal tiles, or two horizontal tiles followed by one vertical tile.
How many different ways are there to tile a 2*4 walk, or (indeed) a 2*n walk(where n is some natural number)? Can you come up with a general procedure that works?
What happens if your tiles are 1*3, and you have a walk that is 3*n units long?

I think the best way to solve this problem is to draw every possible way.


Walk              # of ways
2*1                 1
2*2                 2
2*3                 3
2*4                 5   
2*5                 8
2*6                 13
...

From the list above, we can easily find that the number of ways are Fibonacci numbers.
i.e. when there is a 2*n walk, there will be 
(1/√5)*{[(1+√5)/2]^(n+1) - [(1-√5)/2]^(n+1)}
ways to tile the walk.

After answering the first question, I tried to work on the second question:

Walk                           # of ways
3*1                                   1
3*2                                   1
3*3                                   2
3*4                                   3
3*5                                   4
3*6                                   6
......
However, according to the list above, I was not able to figure out the rule  of the number sequence. Thus I still have to work on this problem.

1.4.13

Project #2

  Just finished doing the second project. To me, I would say that project 2 seems easier than the previous one. It is like if you try to do it you will be able to complete the 2 simulations successfully.
  However, what I want to point out is that although I have fixed all the comments that are marked out, I think there is still one thing that can be improved. In the second simulation, it is obvious that we expect a non negative real number as param-base, but as we keep pressing the left key, we will end up getting -1 for the param-base. Therefore it is a bug that can we can continue to work on.

25.3.13

Project #1

Last week we got our test 2 paper back and also found that the marks of Project 1 was posted on the MarkUs.

When I just started doing the project, I found it was really strange because I was pretty sure that my code was correct but the pictures of mouse and fox just stay constant without changing their sizes at all when I clicked the "run" button. It was not until one of my friends encountered the same problem and we asked the professor that we finally knew that we had to change the numbers of FOXES-START and MICE-START so that we could see the two pictures changing size, otherwise the numbers of mice and foxes are just kind of stays on an equilibrium.

The second part was much easier than the first one, and I tried to solve the bonus problems but ended up failing. It makes me so sad(coz it really works on my own computer!), but anyway, trying to do the bonus is a kind of success as well, right?

26.2.13

Wikipedia Assignment #2

As we all know the 2nd part of the wiki assignment is due this Friday night. But for a student like me who has a so called “Procrastination", I have just started doing this assignment. What a pity.

Although I am still not very sure about what I am supposed to write in this assignment, I decided to read the "Help Out" section first because it is really my first time to try to make changed to Wikipedia and I know almost nothing about how to edit. By reading the articles and watching several videos, I did learn some basics of editing Wikipedia and here I want to write down some editing basics to share with you guys in case some of you may also start late as I do and don't have enough time to read all the tutorials and other stuffs.

-Italics: emphasis, title of book, mention a specific term
 To make italic text, you can just highlight the text with your mouse and then click the I button in the toolbar. And this will add 2 single quote marks at beginning of what you want to be italic and another 2 at the end, i.e.

''Tim Hortons'' -> Tim Hortons

-Bold
 Making bold text is just similar as making italic text, and the only difference is that this time it adds 3 single quote marks ar the beginning and the end of what you want to be bold, i.e.

'''Procrastination''' -> Procrastination
And what if a text is both bold and italic? Well, so it'll be like

''''Blogger'''' -> Blogger

-Headings and subheadings
To improve the structure, we always need to use headings and subheadings, and here is how we create them:
Here is what I typed in


 And here is what I actually got







So when typing like "==XXX==", we end up getting a underlined heading and when typing "===XXX===", we end up getting a bold subheading.

-Links
To insert a link, we just highlight the text and then click the "Link" button, then you'll see






















then we just put the URL or the title of another Wikipedia article under the "Target page or URL".

-Citation
The last most useful thing is adding citations. Adding a citation is quite easy actually, the only thing to do is to click on the "Templates' menu and choose what kind of citation you want to add. One thing I have to mention is that if you are adding the first citation to an article, don't forget to put {{Reflist}} or <references/> just under the reference title, which is like ==References==. This will tell wiki where to display your citations.

I guess that is all we need to use to make basic changes. Hope this post will be helpful.

18.2.13

Feb 11-15

Just now I suddenly found I forgot to post new blogs in the last few weeks because of the endless midterms(I know you understand my feeling :(  )

On February 7, we had our first midterm in the lecture hall. Because I was a little bit late that morning, when I rushed into the hall, I saw that almost everyone had already got their test paper and were ready to start. That made me really nervous but luckily the test was not too hard and that calmed me down.
Last Tuesday we got our papers back and I feel so proud of myself for doing well in the first midterm. I remembered that there is a saying- a good beginning makes a good ending. I do hope that this saying is reasonable and my beginning will bring me a satisfying ending.

Another thing that makes me confused is the word "list".  For example, when I type in "menagerie", Dr.Racket will give me a result like (list im1 im2 im3 im4).I don't know under what kind of conditions the result will begin with a word "list". Is it like when I expect to get more than one image or picture I should be expecting to see the word "list" at the beginning of this list as well?

27.1.13

Jan 21-25

I think many of the students in CSC104 have to admit that what we learnt this week is really kind of hard to beginners. I feel like we suddenly jumped to another level of programming which is much higher than where we were last week.

The paper folding problem has always been confusing us for the last few weeks and this week we had a noticeable progress which is we finally found the basic rules of how the pattern behaves. As Professor Heap showed to us, if we divide the piece of paper into 2 sections, the creases on the right section is just the same as what it was before its last folding,that is :

1 fold                D
2 folds             U D D
3 folds         U U D D U D D   
                   .......
We can see from the diagram above, the right section after the second fold is "D", which is the same as what the paper looked like after the first fold and after the third fold, the underlined part "U D D" is just what we get after the second fold. On the analogy of this discovery, we then can will be able to find what the paper looks like after any given times of folds with the help of computer software, and the only thing left now is to turn our discovery into a programming language.

The second important thing we learnt this week is how to build definitions in Dr. Racket. A simple definition is easy to understand, but if we compose an output as an input again and again, the definition can be more and more complex. I tried several definitions in the Dr. Racket by myself and found it's funny, and trying to understand a complex definition is a good way of training logic as well.

According to the calendar, I saw that there is an assignment due next week, hope it will not be too hard.