Friday, 25 January 2013

Learning to define variables

As I mentioned in my last post, I really wanted to know how to create a definition so that I can make simple phrases represent large pieces of code. Luckily, we got to learn this early on in the course. This week I learned how compose of definition, set identifiers for a specific value, and properly used check-expect statements to prove code.

First off I'd like to say that composing a definition was actually easier than I though. I have no idea what I was doing in my last week's problem, but I am confident I would be able to tackle that problem easily now. For example, I learned that simple phrases like "tippy-toes" can be defined to resemble an image of a robber on his tiptoes or anything else. This is fascinating function and I know I will readily use this throughout the course.

Second, I learned that I can set definitions to represent long pieces of code that is relatively too long to write or tedious to copy and paste over and over again. Especially in scenarios when codes needs to be recycled repeatedly, composing definitions will surely reduce my time spent on dull tasks and keep me happy. = )

Thirdly, after a long time spent glued to DrRacket, I finally understood the purpose of the check-expect statements. These are tools used to verify whether or not subsequent code resembles our check-expect statements. I'd like to recount a certain problem I had encountered with this tool. When I first watched the tutorial video, I was completely lost.  I understood the reason for writing a contract and purpose statement, which was to explain to the viewer what the upcoming code was about.  But, words like pic:hacker and pic:calender being repeated over and over again really scared me. So, I decided to write the code out on DrRacket for myself and understand it line by line. Soon after I realized that pic:calender, etc., represented placeholders for an actual image. They themselves can be thought of as definitions of a certain image. So, instead of using those words I used random images and developed my own check-expect statements. When I wrote my actual code, it passed the tests! I was glad that I got to figure it out.

It has been a great week, and I'll see you in my next post!

Friday, 18 January 2013

Impressions of CSC104

Hi, my name is Bilal Negash and I'm a first year student. This isn't the first time I am writing a blog. I've previously made one in my last year of high school English. It wasn't as successful as I hoped it would be, mainly because I had only posted ONCE. I guess it was due to a lack of dedication for the material. I intend to fully commit myself to blog once a week for the rest of the semester, letting you know my personal impressions and feelings about this course.

First off, I'd like to quickly mention that I really like Professor Heap as our lecturer. I can tell that he is very enthusiastic about the material and is really passionate about computer technology in general.  I am looking forwards to a wonderful semester in the course with him.

Secondly, I'd like to discuss DrRacket, a programming application used for the course. I've personally had some programming experience in the past with Visual Basics, but I've got to say I really like DrRacket. Mainly because the computer language interface is really user - friendly. Although the language may seem weird at times, ex. putting + or - signs at beginning of code, it makes sense, in retrospective, that it is tedious to put multiple signs when there are a lot of numbers. One problem that I encountered when fooling around with DrRacket was trying to define a variable. After watching the " expressing values tutorial videos," I wanted to see if it was possible to define a variable, "image-area," by multiplying two default definitions "image-width" and "image-height." With no luck, I was unable to figure this out. But, I realized that we weren't expected to know how to define variables yet, since the upcoming DrRacket videos involved definitions. I guess curiosity got the better of me. In order to better prepare myself for this course, I shall look through the picturing program pdf. and understand how to properly define and express variables.

This is all I have to say for my first blog. This is a wonderful and engaging class and I hope everyone is able to benefit from this course as much as I hope too.