Friday 23 January 2015

W3: Why Geeks Write

    Why geeks write? Believe it or not, it can prove to be beneficial.

    Keeping a debugging log helps keep your work organized. A bug could actually take more than just a couple of days to find and solve, it could take weeks or even months. And if it does, how will you remember exactly what you've attempted and the results of those attempts? Maybe you almost solved it and all that was needed was some slight tweaking, but let's say you've already spent a long time getting to where you are now, and you feel tired and just want to sleep on it. Maybe the next morning, with a clear head, you could retrace your steps and it'd be fixed- but what if you didn't keep track of it and it as a few lines here, a few lines there, and now you can't remember exactly where you left off. Or, maybe you attempted something earlier, and it fixed some part of it, and now you've found the solution to fixing the rest of it, but uh oh, now you can't remember what you tried before.
 
    Maybe you think you've tried everything and you decide to ask a someone else for a little input, it will be good to share what you've tried and maybe they can take something you've tried and change it a little to make it work, but it will also give them a general guide as to what has been attempted so they can come up with new solutions. Or, perhaps you've been at this for so long, you're beginning to feel a little numb and you've read lines over and over so many times you're not really reading it anymore, and instead, you're brain is just "reading" it to you, you may read it as something but once someone else reads it, they immediately pick up on an error or even small detail that could be the first step in solving the problem. Or if you encounter a problem similar to something you've already solved, and you documented your method in correcting that problem, then maybe you can refer back to that and use a similar approach. Sometimes it could even be a bug where you don't even know where to begin. You just stare at it and think.... well... uh... so... hm..... Maybe you need to brainstorm HOW to debug this bug.
 
    Personally, I always like to write ideas down, just in plain English, and expand/add detail later on; whether it be starting an assignment (the panic has set in as I count down the days till Assignment #1 is due while I blunder around in my small amount of code and read and re-read through the handout) or fixing a problem. In my experience, even writing code for csc108, when something didn't work and I wanted to change the code a little, I always copy and pasted onto a new page just in case it turned out worse or if I wanted to revert to my original code or compare my original code with what I had at the moment. That is what I did before I decided to ask my friends and fellow peers for insight, before asking on Piazza, before going to office hours, asking TA's, going to the help centre etc.
Whatever the case may be, it's good to keep track of your work for future reference. It could end up saving you lots of time.

    It's one thing to know how to write code, but it's another to know how to explain it. Whether it be working with a group on a project, or working for a client, it is important to be capable of communicating ideas verbally, or in written form, not just in programming languages. I fully agree with Carlos' explanation, http://theimportanceofbeingpython.blogspot.ca/, as how writing improves us in two dimensions. He gives a detailed explanation in both our outer and inner dimensions which I found intriguing to read.

Now, enough writing, time for a Java break :)

Saturday 17 January 2015

W2: Getting Started

     I enjoyed and learned lots from csc108 last semester! The only thing I feel less confident about is "class". I understand we use class to contain several functions that may be used together in case we have a lot of separate functions which may be difficult to keep track of. Class still somewhat confuses me, and I am slightly unfamiliar with writing a class. I have been attempting to clarify my confusion about classes by asking my prof, asking my peers, googling, and referring to notes from csc108 as well as textbooks available to me. As for the design, I am slowly learning, it helps me to identify the main noun (which is a candidate name), verbs and important attributes, as well as operations that should support the noun. In class we have also used the special methods, __str__, __repr__, and __eq__ which I hope will become more familiar to me with more practice.

     Our first assignment has been assigned, and the first time I read through the handout I felt very overwhelmed. Then, I decided to break it down and read it section by section; even after doing that, I was still perplexed in what to do and how to start. I kept reading it over, not necessarily from the start to the end, but chunks by chunks. I did some highlighting of hints and more specific instructions which I thought would help me get started. I slept on it, and then I did more brainstorming, ideas started forming and connecting and making sense! I don't know if all these ideas will work and I don't have ideas for all of the assignment but at least I have something.

     We also had our first lab this week, which really helped with my familiarization of a class. For the majority, I was on the right track. I think these labs will prove beneficial and worthwhile as it allows me to practice with a TA available for questions or errors I may have. This also allows for discussion or exchanges with fellow students working on the same or similar task and is sometimes less intimidating than asking TA's or profs.

Thursday 8 January 2015

W1: Fresh Start

    It's again, the start of a new beginning for most of us. I, for one, have definitely been awakened by the chill of the weather. I am determined to make yet again, the best of the upcoming semester. True, this semester's courses do seem heavier and harder, but that just means more opportunities to improve, expand, and experience! To be honest, I'm interested in 148 and at the same time nervous. The first few lectures have not been too intimidating- so that's a relief.

    So far, this week, I have learned: the general definition of "recursion", "clever functions that call themselves", the general structure in designing a new class, and a refresher about object-oriented programming and special methods in python.