Tuesday, 29 January 2013

csc104 blog#2

sorry for my belated blog..(it is supposed to be done last Friday lol)

so, for the lecture this week, we go over the evolution of computer.
At the early stage, people used clay tablets..(a stone liked tablets made by clay, people write/read information when sun-dried.
Abacuses-some kind of calculating tool,calculate by counting the rings or stones?? (not quite sure about it)
And then people invented some kind of huge machine "Pascaline" its a first generation calculator with number of gears. (not quite sure how it works too, looks like we calculate by turning those gears and read the numbers?)
The next one would be Jacquard loom and Babbages different engine (ya..same as above..huge,giant "machine" to solve simple maths..)
After hundreds of thousands of years...we finally have Personal Computer!!!
but those are not important,since they would not be on our exams...
so whats important?! Dr. Racket video!! ( this is the best way to learn because everything we need to know has been record as video and we can review and review and review .....u know..)
so video this week is to define something..for example (define jumbo im1), when we insert jumbo, im1 would be the feed back..or (define lucky 12345), we got 12345 back after inserted lucky etc..
the next would be i called it "multiple definition", which is a little bit complicated...
for example (define p im1)
                   (beside p (flip-horizontal p) (flip-vertical p))
then what you'd get would be im1(flip-horizontal im1)(flip-vertical im1), we have more than 1 command/definition and gives 1 result that's why i called it "multiple definition" lol
of course this is the simplest example of "multiple definition" there are lots of much more complicated example in the video I am not 100% confident about it but as long as I keep practicing I will be fine..

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!