Saturday, 27 October 2012

Pixels

Opppss.. I forgot to post this. I sent it to my email since I did not have my blogger password available when  I wrote this..
I am having trouble completing exercises 8.33-8.35. Each of these questions deals with two challenges; pixels and movement. I began my search on Google, trying to figure my pixel problem out. My search led me to a very complicated page, which did not further assist me with my queries. So I decided that I was going to make my way to see Professor Heap at 5pm. We worked on 8.35- “develop an animation of a rectangle initially 1 x 2, which grows by 1 pixel in height and 2 pixels in width at each clock tick, centered in a 200 x 200 window.” The hardest part was to figure out how to make the picture grow 1 x 2 pixels. Prof. Heap had an idea to use one placeholder (x) and 2 times that placeholder (2x). So here is what it looks like..
;double-rectangle: number-> image
;draw-rectangle w by 2w centered on 200 x 200

(check-expect (double-rectangle 1
            (overlay
                        (rectangle 1 2 “solid” “yellow”)
                        (rectangle 200  200 “solid” “white”)))

(define (double-rectangle w
            (overlay
                        (rectangle w (* 2w) “solid” “yellow”)
                        (rectangle 200  200 “solid” “white”)))

(big-bang 1
            (on-tick add1)
            (on-draw double rectangle))


Thank you for your help Prof Heap!

Thursday, 11 October 2012

Post Test Reflection

So to respond to the question posed in my last blog as to how I am enjoying the course and have I really gotten over the shock factor.... I am pleased to say that I am feeling right at home (or as close to home I could ever be to this foreign computer language) in CSC104. This is not to be confused with finding the course easy. Far from it, I am challenged each week in class with new information, harder than the last; which comes just as I have finally grasped the last week's material... It takes an entire week, with many hours of work to understand and remember how to correctly program what we learned the previous week. Right now, for example, I am still struggling with how to change the colours of a picture (ex take out the green etc, which we did in class yesterday). What am I going to do to make this material easier? I am going to wait for the tutorial exercise to be posted. Hopefully it will be related to what we learned last class, in which case, with some extra practice I will hopefully be on track to better understanding the material. If that does not help, then I will search through the online textbook trying to find the section that further explains what I am having trouble with. If that is too unsuccessful, I will turn to my best friend google and hope for some assistance.

Opps... I think I forgot to mention the test...

First of all, I was surprised that the test was only worth 10% when I check the previous week. In hein-sight I wish it was worth a little more, but at the time, I was really happy. I was nervous about the test, not knowing what to expect and how much detail we had to know. But, after taking the test, I realise that I studied really hard and that I was ready for the test :). One thing that made studying for the test easier was that I had already done a majority of my studying the previous weeks, while studying for the quizzes and working on the tutorials.

So to conclude.. I am enjoying the class, am still a little scared that the programming will get way over my head, but also a little bit more confident in my programming abilities. I think that is a small cause for celebration :D

Saturday, 6 October 2012

Three, Two, One, Blastoff!!

I know I am a little late on this post, but regardless, I am going to blast into the past, back to week one and two of class and share my thoughts with you. This is the beginning of my programming adventure... I am extremely nervous, hesitant and well, scared.

I signed up for this class in August with an understanding that I was going to learn lots about computers as well as a LITTLE BIT of programming.

I really enjoyed the programming we learned in class 1. It was extremely basic and it didn't take long until I was bragging to my dad (who is a computer programmer) that I knew how to do so many cool things. After the first week of class, green star quickly became my favourite image to draw: (star 30 "solid" "green"). Being a little naive, I thought that the rest of the semester would continue to be this straight forward and simple.

Needless to say, after class 2, I was beginning to have second thoughts. (I did not realise how heavy a focus this class would have on programming :P) I had an instant flashback to my grade 9 computers class, where I struggled with understanding our small unit of 'Turing'. WHY did I choose to use up my last first year elective with a programming class??? What was I thinking?


Stay tuned for the next post to find out if I am surviving CSC104...