This week, we were introduced to designing and implementing abstract data classes of containers that operated upon the traditionally accounting/inventory-related concepts of First-In-Last-Out and First-In-First-Out. Specifically, stacks, sacks, and queues!
I’m finding that the hardest thing about computer science is wrapping one’s mind around concepts in the right shape. Much as a baseball can be thrown in a number of different ways, some of which are more useful or less useful for a particular pitcher to hit a target with the ball, programming involves such a a range of abstraction that there are many ways to pitch a programming concept in order to understand, implement, and apply it.
For example, upon first encountering the idea of stacks, the concept is intuitively understandable: it is a sequential collection of items where the addition/access/removal of items occurs in a designed, algorithmic way. But how does one create a stack in Python code with functions and class definitions? In what ways can a stack be useful when solving programming problems (or modelling real life)? How are the class definitions then used to solve a more complex problem? The transformation from an abstract, intuitive concept to a concrete, useful program requires an immeasurable amount of mental legwork.
The legwork is immeasurable because of how abstract it is. With the little we know about human cognition, all we can say about what occurs in the moments before and after understanding is that some “connections” are made between concepts as we somehow realize to find certain aspects relevant – or, something “lit up” like a lightbulb. Yet even these are still abstract representations. In much the same way that we cannot describe how we know how to pitch a ball with any level of replicable accuracy (i.e. as far as our descriptions can be used to program a robot to throw a ball), we cannot describe the cognitive process of understanding.
There are many ways to understand a programming problem or concept. But only one way that works for a particular individual at a particular instance in pursuing a particular goal in a particular context. The challenge, then, I suppose, is finding the meta-method that works best for me in order to pick up these concepts, with the meta-goal of successfully entering the CS minor POSt.