Saturday 1 December 2012

Last but not the least ----- ALGORITHM solving

We have learn the how computer processes an algorithm. We also learnt how important it is to come up with an algorithm that can be interpreted by the computer. And the here is the how I have solved the paper folding problem that was mentioned in class:

1. Understanding the problem:
For the paper folding problem, we are suppose to figure out a specific algorithm that can be used as a cookbook for any logical person to proceed with no problem. Devising the steps to fold paper is not that hard but here it is:
-----------------------------------------------------------------------------
1st. take out a strip of paper and hold its left side with you left thumb and index figure.
2nd. hold the paper stripes right side with you right thumb and index figure.
3rd. fold in half by folding the paper from your left hand to the right.
4rd. Now repeat this steps from 1-3 according to how many folds that's needed. And see the pattern that was created after that much fold.
-----------------------------------------------------------------------------

2. Devising a plan: 
Now to figure out the pattern that will be created from the number of folds. There are one most easy way to go about it, which is just proceed the steps with the algorithm stated above for how many number of folds. However, a normal, healthy person can probably only fold up to 6-7 folds(unless you are Arnold schwarzenegger).
Therefore, to come up with a more efficient methods I will try to record down the different folding patterns and examine them to see if there is specific pattern that can be found.

3. Carrying out the plan:
Record of different folds: (D for down and U for up)
1 fold: D
2 folds: UDD
3 folds: UUDDUDD
4 folds: UUDUUDDDUUDDUDD
-------------------------------------------------------------------------
Now after organizing it a bit, I am starting to see a pattern:
                     D
                   UDD
              UUDDUDD
     UUDUUDDDUUDDUDD
I can see the center pattern will always be D. Let's call its left sides pattern as L-SIDE and the right sides pattern as R-SIDE. So we can see the fold pattern on the R-SIDE will be always the previous fold pattern. And the L-SIDE will be just the same previous fold pattern with its fold's centre pattern changed to D instead.

Thus: I can predict the next pattern will be:
5 folds:   UUDUUDDUUUDDUDDDUUDUUDDDUUDDUDD


4. Looking back:
There are many algorithms used by computer. You can say every computer action is dominated by an algorithm. And by combining all these different algorithm, we are capable of making computer process complicated tasks. However, not all algorithms are solvable in this world. Therefore, we still have much to learn to improve the computer we have today.

Friday 23 November 2012

Assignment 2

The main focus of this week is assignment 2 and wikipedia.

Wikipedia III involved editing and translating article from Chinese to English. It took much more time than I have expected and estimated but I still managed to complete it since I have done the wikipedia editing through out the weeks.

Now moving on to the assignment 2 that will be due next week. There is still many incomplete functions that I have to work on. As of now I am still stuck on one of the way to implement the function, more attempted will be made later on tonight with the hope of solving this. I will make use of my resources - classmates, tutorial, and Professor on Wednesday if I still cannot figure it out by then.

So I will leave this week's post like this. For the topic for the up coming week's SLOG, there will be my attempted algorithm post. Please look forward to it ^0^.


Friday 16 November 2012

Term test II and Assignment 1

The lecture material we have learned this week makes me think about how the technology that have impacted our lives. It is a good thing and a bad thing from different prospective. The advantages of the technology provided us better life-styles, extended life-expectancies, more career options. Thou on the down side, we are working longer compare to before. But overall, I believe it is human nature to advance in life over time. So these changes are unavoidable.

I guess after my hard work on studying for the term test II. It definitely paid off in the actual test. I am fairly confident about all the question I have done on the test. And I hope my actual marks would reflect what I have in mind.

The assignments we have completed is really useful as it links up everything we have learned so far and applied it to an actual program. I think by completing the actual assignment, it really helps build stronger foundations for the final exam.

Sunday 11 November 2012

Getting ready for the term test

A bit late on the blog entry this week due to varies assignments needed to be done. I am still glad for that fact that I remembered about the weekly blog on  Sunday.

The quiz that I have done this week is relatively straight forward after doing the tutorial exercises. There is nothing tricky to be elaborated about in the quiz I believe. The major focus I have this week is the preparations for the term test 2. Reviewing the printed out slides and in class notes are a must, however, for me to go through the recursion problems is still quiet a hurdle for me. Thus, my main focus of the review will be figuring out all the details of how the program traces through each operations of the recursive function.

Friday 2 November 2012

Quiz and Tutorial for the week

The tutorial problems for this week dealt with manipulating character inputs in Dr.Racket. For the most problem, we made functions to generate a variation from the result of the user input. And the most interesting function we were asked to implement is the reply functions, where we "fake an A.I" in the program. And this "fake A.I" would reply "I need coffee","I need a nap" or"bedtime!" when you type in "good morning","good afternoon" or "good night". The tutorial really showed me the extend of computer programming.

The quiz we have had this week seems to be more tricky as the same can be said about last week. I foreseen the future quizzes will be harder. Guess I should prepare more for the later quizzes.

Saturday 27 October 2012

Weekly learning

Some computer history and components are taught to us this week. I find some of the facts quiet fascinating, such as dipping flash drive into water, after drying, it will still work properly. Another fact about how hard drive stores information by using magnetic disc contained within, and the data is stored in there through magnetizing the north and south pole.
With the addition of the coding scheme using true and false condition through "condition", it will be probably useful when we are implementing the additional features of the assignment 1, clock. Since I have a lot of assignments to be working on, I will leave this blog this short and concise until next week.

Sunday 21 October 2012

Review of mistakes made on the term test.

After taking back the midterm and reviewing what some of the mistakes or short-comings I have, it seems my marks were lost to the partial marks lost from 1st and 2nd question of comparisons. And the for the final question, I have finally realized what the Prof. Danny is looking for in the answers. I believe I have understand all the codes I have made so far, and I was surprised when I learned that I had to make more check-expect cases for the function. Before talking to the professor, I thought it was just a repetitive step that doesn't have any actual meanings. But after talking to the professor, and listening to him explaining it in details. I understand the multiple check-expect cases are needed to pick out different program code that might result 1 of the check-expect case to succeed. And multiple cases are needed to pick out these non-intended program codes.

I would hope to receive a term test solution soon so I would be able to compare what I am missing in the definition and comparisons in my question 1 and 2 though.