Sunday, 26 January 2014

From OOT to OOP

         First, a bit of history: my very first foray into programming took place in 9th grade tech, a course where we spent half a semester in the computer lab learning how to type and manipulate spreadsheets, and the other half in a workshop building pop bottle rockets and other fun toys. Near the end of the computer-focused portion of the course, my teacher introduced us to OOT. We used it exclusively to draw pictures, by inputting coordinates to serve as the endpoints, verticies or centres of lines, rectangles and circles of various colours. The final assignment was to draw a house with a tree, under the sun. Being a chronic overachiever, I made my picture terrifically complicated. My house had curtains and a chimney with smoke coming out of it; my tree had several branches and many leaves (as opposed to the ball-on-a-stick models of my classmates).
        In order to create thIs great work of art, I had to draw squares on top of squares and circles on top of circles and carefully plan the layering, so as not to create the impression the picture had been drawn by a small child. 
     If someone had wanted to recreate that picture, they would have had to draw the same endless series of circles and squares. However, with my new python knowledge, I could create a class house, with methods to create doors and windows or a class tree, with methods to create branches and leaves. But that's not all! With python you can create a class and methods for just about anything under the sun, because, to quote my instructor, "just about everything is an object in python". 
     Python, and other object oriented languages, allow you to create objects that correspond to real world objects and concepts. The objects can contain both data and functionality-- they are a compound data type. Objects can then interact with themselves or each other by way of  funtions-- in a previous exercise for this class, we created "dog" and "toy" objects, which were able to interact with each other via a "play" function.
     The multifunctionality of the objects (which are an example of abstract data types) allows users to create bigger, more complex software systems with ease. For this reason, object-oriented languages became to dominant programming paradigm in the 1980s.  Later in this class, we will be writing classes and functions for a more sophisticated toy-- a ."cheesy" version of the Towers of Hanoi logic puzzle-- check back soon for updates!

Jumping in with Both Feet

  I’d like to speak for a moment about a dilemma that I’ve often faced in my time as a student: the battle between talent and tenacity—my fancy alliterative phrase for “strengths and weaknesses”. When planning my first foray into post-secondary education, I didn’t know what exactly I wanted to do, but I was sure of two things:

1)    That I would NEVER study or practice business, and
2)    That I would NEVER be a computer scientist/engineer/physicist

The first, because I had no interest, and the second, because although I knew I was smart, I didn’t think I was the right kind of smart to do all of those things. Writing comes naturally to me, math… not so much. But the beauty of education is that enough tenacity can help you to overcome a lack of talent, and in some cases, to develop a talent you weren’t aware you had.
            That, dear reader, is what happened to me last semester. As I continued to use my gloriously expensive and hard-earned Bachelor of Science degree to work in customer service for a coffee conglomerate and contemplated my options, I realized that my employability and grad school prospects might be greatly enhanced by some basic programming skills.
            So, I enrolled in Programming for Total Noobs (also known as CSC 108), and even though I didn’t have a natural penchant for Python, the course was so well organized, well taught and well-paced that my tenacity was able to help me achieve great success—so much so, that I became the one offering help to other students!
            At the successful conclusion of that endeavor, I aspired to my next challenge—this class. I wasn’t expecting it to be easy, but I was initially thrown off guard by the course structure. The first lecture was an unmitigated disaster, with the instructor thrown off by jet lag and lack of sleep (thanks end of break snowstorm!), and the slides sparse and hard to follow. By the time my first lab rolled around, I was horrified—random assignment based on birthdate landed me with a partner who regaled me with tales of his inattention and lack of effort in 108, interspersed with gripes about the difficulty and pointlessness of the lab we were working on that day (spoiler: it was NOT a difficult lab). Productive learning environment? I think not.
            Happily for this narrator, though, things have gotten better.  Turns out my teacher is much better at his job when he’s had a proper amount of sleep, and what he fails to explain in class, he makes up for in spades by being incredibly active on our class discussion board. Switching lab sections brought a new partner, a new TA and a new lease on life. Unsurprisingly, cooperation is better than condescension when working in pairs. With these changes made, I'm looking forward to talking the challenges this course will bring.

Introduction

        If this blog were a great novel, this would be the hard-to-read first chapter, you know, the one that’s meant to develop context and set the stage for the epic story that is yet to come. You’ll need to suffer through my equivalent of Harry’s early years (and awful summers) at 14 Privet Drive, or the lengthy section of Les Mis devoted to providing minute detail on the construction and organization of the Parisian sewer system which precedes Jean Valjean’s last great escape from Javert.
            Unfortunately, these dry chapters are terribly essential parts of the book because context… is kind of a big deal. Accordingly, I’d like to provide you with some background and context for this blog. So:
            This blog is a record of my experience in Introduction to Computer Science (CSC148) at the University of Toronto (Winter 2014 term). In this space, dear reader, I will share my trials, tribulations and reflections on all aspects of the course with you. This includes #commentary on course content, structure, instruction and assigned work.
            As somebody who completed a minor in English literature, and has dabbled in teaching and tutoring science from time to time, I’ll admit upfront to being prone to analogies, similes, metaphors, purple prose and obscure literary references. As somebody who’s currently training for a marathon, I promise that at least some of these analogies, similes, metaphors and less-than-stellar attempts at wordplay will be related to running, starting with the blog title, obviously.
            I look forward to sharing this experience with you—and if you’re a fellow 148 student, to hearing your views on class-related content.