Sunday, 8 March 2015

Week 7

Stressful

The lectures weren't of course, but the assignment we had due this week. Complete with work due for other classes it became extremely stressful just trying to figure out how to code the game properly (properly meaning by course standards / CSC108 Python standards).

Keeping this in mind, if I recall correctly the stuff we've been doing in lecture has been somewhat similar in that it is another fun data type, linked lists, though it was iterative rather than recursive like the trees we've been doing last week. Blaze it.

I hope whatever we were talking about in lecture doesn't come back to bite me in the ass later, hopefully I'll figure it out on the spot if need be.

Sunday, 1 March 2015

To be marked: Abstract Data Types

Summary of Abstract Data Types

I'm sure we're all familiar with our more common data types that we've been always using, things like lists, strings, integers, etc. However, programming languages, including our wonderful Python, can produce and use various other data types that are more theoretical in nature, which can exist with similar characteristics among most programming languages. These data types are especially useful for simplifying certain algorithms, and can be easily implemented as we have been doing for the past few weeks.

For example, the first abstract data type we discussed was a stack, which was a type of list that had a last-in-first-out structure, such that adding to the stack would always append to the end, and only the last added item could be adjusted or removed. More recently, we've been working with trees, which is a data type that somewhat refers to other versions of itself to create a data tree consisting of a root node which can branch off into different directions, each node containing whatever object it requires depending on what you're using the tree for.

No matter what language you're using, these abstract data types exist in all of them and share similar functionality and uses, and can be incredibly useful for certain algorithms.