Thursday, 17 January 2013

csc 104 diary

so here we go!! my first blog ever in my life and its because of csc 104...

the first class was on Jan 8th and we actually didn't learn anything significant,just a brief cover about the course and the course outline...o yeah..we did cover the first few pages of lecture slides...the most interesting topic in that lecture was "paper folding"...we have been asked to:
fold over upper surface of paper strip
after one fold, it has a downward crease
fold the once-folded strip again
and it has one upward, two downward
there are good physical reasons you
can't experiment far beyond 6 folds
given the number of folds,
predict the pattern
i was not quite sure what the prof is trying to teach at first.... so i Google it after class, and i found out that the purpose behind "paper folding" is not about "you can't fold a paper for no more than 7 times".. is all about "algorithm". it is a logical thinking of computer programming, also a step-by-step procedure for calculations. Since computer is not as smart as us, we have to tell the computer the exact command, exact instruction in order to solve problems.

the second class, Jan 10th, continue of last lecture..

prof Heap has used a simple example to demonstrate concept of algorithm..."Making peanut butter jam sandwiches". To teach someone who had never made peanut butter sandwiches to make PBJ. I remember that's what i wrote down...
1)  pick up a piece of bread
2) put some peanut butter on bread
3) pick up another bread
4) put some jam on bread
5) stick them together!

lucky prof Heap didn't pick my paper and speak it out .. because what i did was too simple, totally lack of information to teach someone (computer) how to make PBJ (to solve problems).
In order to make PBJ, I have to tell him,the computer, every single piece of information, every detail that it will use in order to solve problem...I would say computer is someone who doesn't know anything before you teach it..but it learn so fast, in a second, as long as you teach him right,and do not allow a single mistake...
So back to the PBJ, prof Heap acted as a computer tried to follow the command of procedure of making PBJ..but here is the problem, information was not detail enough, as I mentioned above..for example which way to turn in order to open the lid of the peanut butter jar? how to scoop up peanut butter? the angle that you put the knife inside the jar, and the amount of peanut butter that you scoop up blah blah blah ....
so to think logically is very important in computer programming, i am not a logical person obviously so what can i do when i encounter problems? i think the best way to solve problem is to discuss with classmates, exchange idea is very important, it helps each other to understand concepts better..
(but make sure i don't copy someone's work... )

In today's lecture Jan 15th, prof Heap talked about how to use write simple programming command by using DR RACKET...it is pretty fun.. for example DR RACKET can recognize number, integers and do some simple calculation..
>(+ 2  2  2)
> 6

>(* 3  3  3)
>27

To recognize True or False
 >(True)
>True

>(false)
>false

>(not true)
>false

>(not false)
>true

It can also flip picture vertically/horizontally..rotate picture, re-size/modify picture by removing pixels etc..I feel good about this topic because I have watched the video prof Heap posted online :)

so far I am pretty confidence with what we have done so far..what I need to do to for now is to practice more by using Dr Racket and prepare for the quiz coming this Friday!hopefully everything going smoothly!


 
 

No comments:

Post a Comment