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 :)

3 comments:

  1. Hi there,

    I like the approach you used in CSC108- I used a similar approach, but I uploaded my files constantly on MarkUs. I tend to get a bit disorganized with files, so this time around, I'm going to briefly write down my debugging problems on the blog, so maybe others can learn from them :) I agree with noting things in layman's terms to help jog your memory when you look at something again in the future.

    Good luck with the assignment!

    ReplyDelete
  2. Haha, it's true having several untitled.py files open at the same time was slightly annoying but it did help. Sometimes even writing out the code on paper was helpful and hey, makes good practice for exams :P Good for you trying out the debugging journal, and thanks! :)

    ReplyDelete
    Replies
    1. Thanks for replying :) Yes, definitely! In CSC108, I had some trouble completing questions on paper and on the exam, I couldn't move through as many problems as I would have on the computer because I didn't have enough practice on paper :( It's something that I would like to improve on in this course.

      Delete