Friday, 28 February 2014

Recursion is a very useful and often necessary tool for solving a variety of problems.  In my personal use I probably use it more for DFS and floodfill than anything else. It is particularly useful for mapping problems that can't be solved using a purely dynamic programming approach.  Although a lot of problems that can be solved well with recursion can be solved equally well (and without concern of stack overflow) with looping, recursion is invaluable when looping isn't an option.  In light of our recent assignment, recursion is necessary to writing a regex interpreter, especially if lookahead/behind is being incorporated (which I suppose it isn't in the assignment).  It's also really nice to compress a complex algorithm to a few lines of a recursive function.  Analyzing the time efficiency of that function isn't always nice though.

Monday, 10 February 2014

As someone with a strong programming background from high school, most (all) of the learning for this course involves learning the intricacies of Python.  I am most strong in Java and C++ so in the beginning learning a loosely typed language like Python was difficult. I also did not like that Python doesn't require semicolons (though I've since gotten used to it, and since they can be added regardless I suppose it's a moot point).  I have since come to appreciate Python's built in functionality for things like slicing strings and lists, which would in other languages require several lines of code.  One unfortunate necessity in Python is docstrings. Good documentation is obviously important in large projects, and building documentation skills is necessary, however if one knows how to comment/create docstrings, writing them for simple classes or functions is a pain (easy as it may be).  I'm out of things to say for this week.

Bye
-Kieran