Saturday, 22 March 2014

Yet Another Update

So it's coming down to the final few assessments before finals. I started phoning things in during the middle of the course, but since most of my other courses don't have any more big assessments I can devote all my enthusiasm for learning and knowledge to getting ready for the second term test and hopefully finish strong. I already feel pretty good about the second assignment, and ended up submitting a version I felt was complete a day before the deadline, but in some ways how straight-forwards it felt to me (Just chopping up strings with exact specifications as to what you'll find and feeding them into a recursive function? sign me up.) compared to the first assignment is starting the mind games. As in, "If I thought I did a good job, it must be TERRIBLE."

There's been some algorithm analysis material that I don't feel confident with, but I guess I better get comfortable with it because it's probably going to be on two different exams for me. At least after the midterm on Wednesday I'll have a few weeks to get over my distaste for accepting academic help and be able thoroughly acquaint myself  to the big-O. After that the only assessment I really have is the final exercise for this course, but what could possibly go wrong?

Sunday, 16 March 2014

Another General Update

I've definitely been neglecting this blog, especially between having a duedate every weekday the past several weeks, fatal computer hardware failures, and general physical/emotional fatigue from hurtling towards the end of term, so I guess it's time for another update.

The last handful of programs I've written for the course I've been happy with how intuitvely I've found the answer, and I would consider myself very comfortable with recursion at this point when I was guessing a lot of figures and syntax at the beginning of the course for recursion problems. Though at first I didn't like using nested lists to represent trees, I really enjoyed assignment 2 part 1 and exercise 3. Exercise 3a has been my favourite program in the entire course because it felt like some kind of traditional logic puzzle where there bare minimum to find the final solution (the proper tree) was given and the students' job is to use the information and how it interrelates to find an answer.

Despite having to hand over my personal computer for repairs, I managed to submit an updated version of e3 that I'm fairly confident in. The remarks for Assignment 1 are going on, but I figure just trying to put my best into Assignment 2 pt2 than go through that old mess and see what can be salvaged and just save my mental and emotional energy for something upcoming.

Sunday, 2 March 2014

Recursion

Recursion is a nifty little programming trick in which a function calls itself. Depending on the nature of the function, recursion can be used to streamline a variety of tasks, such as parsing and creating nested objects, creating several objects containing values relative to each other in some way, or splitting a large algorithm into several small, easily calculable  parts. It's an important element of writing efficient code, as the same set of instructions are read every time a function calls itself again. However, it's also sometimes difficult to trace and keep track of all the interacting elements, as with each iteration there is a new set of input values and a different return value. But hey, no one said it was easy being beautiful.

I found recursion in python very difficult at first, making mistakes like forgetting to put return statements where they were needed (Note to any student readers: never forget the return statements.), returning data as the wrong type, calling the function with the incorrect number of variables, ect. Staying away from the single-line, ultra-dense return statement functions helped with tracing the code, seeing it spaced out and organized in an order that made sense to me helped a lot in labs, and by the first term test I felt comfortable enough to answer the recursion question in a single line.
At least I think I did.
The test was first thing in the morning and I was really sick, so the whole thing's kinda a blur.
Pretty sure I did well, though.