Wednesday, April 2, 2014

Week 12 - The LAST WEEK! Project 2!

It is the last week of this semester. It is a little bit sad, because I have not really fully enjoyed school, and we have to do finals. I do not like finals.

This week, we have to do project 2, Maze. I am totally confused! On Thursday, I went to the CSC help centre to seek for help, and the TA there was so good to help me out of the problem. However, I did not quite finish the project, and I went to the help centre on Friday again.

I just could not believe I see my high school friend there, but I am not sure. I know that he is studying computer science in U of T, but he is still on third year. What a coincidence! Anyway, I am a humanity student who was totally frustrated about the coding questions. My TA helps me a lot on the problem, especially when I was doing the "make-cute" function, I typed it wrong into "boolean to image", which is not correct. The correct contract is "image to image". Finally, I could finish the project and handed in on time. It comes out of a "maze" with trees and one person standing in the beginning of the maze. It is very interesting. There is so much fun to do with the project, and turning the codes into some functions using big-bang.

For the quiz this week, I did not do well. There were three parts of the quiz, and for the position part I was not sure about it. For the final review, I decide to look up the previous final exams and find out questions that I have problems with, and I will go to the help centre or ask TA for help.

At the end of this class and also my SLOG, I feel like CSC104 is a computer science course though, but no difficulties for a student like me, who has been two years being away from math. There are a lot of similarities between CS and math, I was good at math when I was in high school, but not in university. As a humanity students, starting a journey in science world is so interesting. I hope there could be more courses like CSC104, that some students like me could enjoy it, and become interested in science world.

I wish to thank our professor and our TA. Getting up at 8 is not something easy to do especially in winter. I am really thankful for you guys to provide such a good course for us. I wish I could take more courses on CSC sincerely!

Thursday, March 27, 2014

Week 11 - Flattening and filter

We are learning flattening in class. The prof first use check-expect to check the flatten of two or more lists to describe the goal of "flattening". Flattening is a list of lists of lists of...things. The prof writes three check-expects but one of them failed.

Then, we define L as a list contains one list as an entire list expression:
(list 1 2 (list 3 4) 5)
so the first element of the list (first L) should be 1.

The model for a list is the element, and element is independent whether the element is a list or a number. For example, if there is a list looks like: (list 1 2 (list 3 4) 5), then the third element of this list is (list 3 4), and this inner list is considered as a single element of the whole list. Also, (list 3 4) could also be defined as L1 and represented in the list using L1 instead of (list 3 4), and people will know that L1 refers to this list.
Professor uses box as an example for us to think back to real life.

This is very interesting!

==============================================
On Friday, I asked the TA about the filter that we had for the quiz.
I was confused about the alphabetical order definition:

; word-L is a list of words
(define word-L
  (list "how" "now" "brown" "cow"))


; less than gnu?: string->boolean
; Is w less than "gnu" in alphabetical order?
; (check-expect (less-than-gnu? "aardvark") true)
(define (less-than-gnu? w) (string<? w "gnu"))

The TA explains to me that, when you have the filter function, then you apply the first character to "gnu", and when you find it is in front of "g", then it is filtered. If is not, then goes to the next character which is n. So if filter "less-than-gnu", it would comes out: brown and cow.



Friday, March 21, 2014

Week 10 Test 2

In Week 10, we have our the second test on the materials after midterm. I did not do as well as last time, which was sad. My aid sheet was useful though, but I should write more information on check-expect, that would be better.

I did my aid sheet the day before the test, and I have another essay that is 40% to be handed in in the afternoon. It is really a rush!

The first part of the test was about binary, which was not a big challenge for me. I did the aid sheet for those part, and I could apply the knowledge easily. On the second part of the test, there were programming questions. For the first several parts, we just have to do what Drracket has to do, apply the codes and write down the results. It is easy and interesting. Recursion questions are on the test as well, which is the part that I am not really good at. It needs to take a lot of thinking, but when I actually apply the number into the function and think carefully, I will get the desired result.

This term test worth 6% of the final grade, and I hope I did not do too bad on that.

After the test, We could check our result by applying the coding in Drracket. I did that every time after my quiz to check my answer. However, I could not remember all of them, and sadly, I did not finish some check-expects in the last few minutes because I was short of time.


Tuesday, March 18, 2014

Week 9 - Quiz 7

Class is finishing in few weeks! Time files!

Last Friday, I got my quiz 6 back and write quiz 7,
Gladly, I get 6 out of of 6 for quiz 6.
For quiz 7, I was unsure about that. Quiz 7 is about recursion.
The code looks like that:
; f: number -> image
(define (f d)
      (cond [(zero? d) (circle 10 "outline" "blue")]
                [else (above (beside (f (- d 1)) (f (-d 1)))
                                    (circle ( * 10 (+ d 1)) "outline" "blue"))]))
This is not so hard. If we get (f 0), then we have to replace d by 0, and if it is zero, we should get a circle that is "outline" and "blue" sizes 10.
If we get (f 1), we have to replace d by 1, and the (f (-d 1)) is exactly the image we get for (f 0). There are two (f 0) images beside each other, and those two images should on the top of a circle that is outline, blue and sizes 20 which is (1+1) *10.
For (f 2) and (f 3), we should think the same way.

I checked in Drracket, it looks like that:






Wednesday, March 12, 2014

Week 8 - Project week

This is week is super busy!

Approaching to final, every course has so many assignments! CSC104 is easy, and I have one project to do for this week. I went to the CSC help centre to ask for some aid, and the TA is really nice to help me out with the definitions. Learning from the CSC help centre, I know some of errors that I have made in my definition, and how to define a complex definition with conditions. At last, I finish all my five definitions and pass 15 tests of Dr.racket, and I also write a short paragraph about the change of the variables. When I click "Run" in the finished project, a green square appears, and a blue part and red part show up, it marks the spread of disease. When I change the number of variables, the speed  and shape change as well. That is so cool!

I asked the TA about how should we change the three variables and write the description of it, she told me just to change the three numbers at the top. I did and I found that was so interesting. The shape of the animation could change, the rate of the sneeze spreading could change as well.

This is the project that we could apply to our daily life, which try to build a model for daily life cases. That is so fun!

For this week's class, we are doing more in recursion. This is the most challenge part in CSC104 course but it is interesting as well. The professor showed us how to make lots of stars in patterns. That is very cool! I hope I could do more practices on recursion that I could do better on the test.

Friday, March 7, 2014

Week 7 - Recursion

Well, up until this week, recursion is something I have found the most challenging in this course, which I am still confusing after watching the video.

I studied for quiz 6 last night, and I was confused of the definition.
For example, the definition looks like this:
(define (c n)
  (cond [(> n 0) (overlay (c (- n 1))
                          (circle (* n 5) "outline" "red"))]
        [else (circle 1 "outline" "red")]))

After watching the video, I try to understand like this:
Since this is the process of converting number to image, and n should represents a number that is given and applied. Given the number instead of "n", we could apply into the definition just like equation. (c (- n 1)) is the number "n" subtracts 1, which indicates a certain image. The ((circle (* n 5) "outline" "red"))) is the another circle of 5 times the size of the number n. Those two images should be overlaid or beside (according to the definition). If n is not bigger than 0 in this case, it should apply to the "else", which is a red outline circle.

I did this in the quiz and discusses to one of the TAs, she said I was right. I am happy! This is interesting!

Tuesday, March 4, 2014

Week 6 - The most interesting course -- CSC104

I do not wish to say this is a "bird course" because everything is just so interesting and easy (at least at some point)! I still can't forget the day when I took the first test of this course. I did not sleep because I have two upcoming tests in one day and I just finished one on Thursday, which is the day before. Once I slept, I might not be able to get up at 9:00am. I know that was a stupid choice, but it was fun to see the sun rise. I was so glad that we could bring the aid sheet and that just saved me!

Happily, I get 35 out of 40 for the first midterm with two hours reviewing though I expected something like 100 or 95 but ended up with 87.5%. Well, not too bad.

Sadly, I only got 50% for the Wikipedia assignment which is 2 out of 4. That is too bad. I wish I could get 4.0 at this course, and hopefully the mark of this assignment would not greatly affect my overall performance. Anyway, I really need to catch up.

The course is so much fun to study, and the only challenge for me is the time of the lecture: 9am! I try to get up as early as possible and run to classroom. Why it is still winter in Toronto?! I wish I could do all my best in the rest of the course, and also get a full mark for the SLOG assignment!

Doing well on CSC104!


I searched for the past exams for CSC104 in U of T library website. I find it is fairly easy (at least I could do the programming questions.) However, I am confused about the word questions, and it seems like there are a whole lot of it! Help! I think I definitely need to talk with the professor or TA to seek for help, and least find the materials that I could study with. 

For test 1, the professor said there would be less word questions and more programming questions, and there actually really only one word questions! I like the professor! He is so nice! I hope for test 2 and the final there could be a tendency like that as well. Programming questions are so much fun to answer, though I know word questions are very important in terms of conceptualizing study of this area. I do not know what other computer science courses study, but I feel like I fall in love with this course as well as the field of study! I wish I could take more CSC courses and hopefully minor it!

Talking about the project, I have not really started yet. I hope it would not be too hard, that I could have plenty time dealing with it and get a good mark as well. Getting a good mark does not mean everything, to me, it would stimulate the interests of study this course and give me confidence!