Tuesday, 25 March 2014

Hey there comp sci, it's been a while

This is mostly a placeholder update, if you will. I have been out of the world of programming for quite some time due to severe illness. I'm back though! Just in time for the term test!

I have very little to contribute to this SLOG at the moment. Minor studying hasn't been eventful enough to be anything of note. I also haven't been to class in over a week thanks to my sickness (lab today will be fun!). I think I'll just get back to studying and then update based on my progress.

See you soon!

Sunday, 9 March 2014

A rather uneventful week

This past week was kind of slow for whatever reason. While I find trees to be fascinating, I strongly dislike how the course is approaching them. There's only so many times I can create tree classes for the sake of making a tree class. I want to see the theory behind this applied! I feel like there's so much more I could do now, knowing about recursion and data trees. But it's all being underutilized as we've yet to implement them in a practical sense. I just think that A2 Part 1, for instance, is just so pointless. I understand that we need to create the classes so that we can do A2 Part 2, but I kind of wish we could've done both segments simultaneously. That's just my two cents, however.

On a different note, fiddling around with functions for the LinkedList class in lab this week was quite interesting. I really felt that I am becoming more and more comfortable with recursion by doing things like this. That being said, I don't really have all that much to talk about this week. So I suppose I'll post again next week.

Ciao!

Sunday, 2 March 2014

Recursion

def week_seven(blog):
"""We've finally arrived to what is constantly described as the core of CSC148. While the subject is initially bewildering, it is actually relatively simple. Basically, recursion is when a function calls on itself, which is recursion when a function calls on itself, which is recursion is when a function calls on itself- you get the point. What makes recursion so brilliant is what it allows you to do. Without recursion, programming would be significantly more challenging and less efficient. Data trees, for example, are made possible by recursion. Quite frankly, writing about this topic is particularly daunting because of its scope. Instead, I'll focus on my own "journey", if you may, as I learned about this subject.

Way back in high school, I did some programming competitions. My coding was pretty basic, but I still enjoyed doing them. I still remember looking at the solutions, and coming across "simple recursion" as the descriptions. Based on my knowledge at the time, I had no idea what this mysterious "recursion" was. Though, to be fair, I didn't know what a function was either. Now that I'm more knowledgeable about the subject, all those old questions seem so much more simple.

When I learned about recursion for the first time in this class, I was surprised at how simple it was. I always wondered "if a function calls on itself, when will it ever end?". Well, the use of if statements makes the answer quite simple. Though it took a moment to wrap my head around the concept, after this point (and my first recursion tutorial), I felt as though I knew "how to recursion". I practiced tracing recursive functions a little bit in order to fully grasp the concept, and I feel like I figured it out (well, at least I did until I got my marks for the first question of the term test). From there I moved on to trying to implement recursive functions into my code. At the most basic level it was quite simple, however as I described in my last entry, implementing it into tour.py of A1 was a little mind boggling. To be honest I'm still a little confused how that ended up working out, though I'm not complaining.

From there I learned more and more about the usefulness of recursion. So many things were rendered simpler through it's use. I found data trees to be fascinating, and the use of recursion in order to establish and traverse through them was also very interesting. Ultimately, I feel like I still know nothing of the true power of recursion, though I am looking forward to learning more about it!"""

    if (blog.read()):
        return "Thanks for reading :)"
    else:
        return week_seven(blog)