Basic Software Principles - Queues and Stacks
So, I figured I would start teaching the kids basic software principles. It's about time, they can walk and talk and eat independently.
I'm trying to make it very fun and hands-on. I'm teaching concepts and ideas, and trying to get it a fundamental part of how they think and reason. Of course, as they grow older, I'll probably pick some sort of language and teach them.
However, I truly believe the concepts are the most important, especially because by the time they are older, software will probably be written in some language that has yet to be invented today, and Java, C#, and C++ (the languages we know and love today) will be long-forgotten history.
I started the other night with Collections, Stacks, and Queues. We lined up the Duplo figurines and I explained the FIFO (first-in, first-out) concept. Also, is the Queue empty? How many items are in the Queue. Michael completely understood the concept, except of course he was a bit iffy with the terminology. He refused to use the word "Queue" and kept using "Line". But he gets the concepts of lines, and waiting in line, and first-come first-served, things being "fair" is very important to him.
We went on to stacks. I took their plastic IKEA chairs, and stacked them up 3 high. Michael knows the word "stack" already ... I'm sure he has stacked blocks in school and they refer to them as stacks. I was careful to use the terms "push onto the stack", "pop off the stack", and "peek at the item in the stack". He was pretty good with all of those, and understood that when I stacked the chairs:
That he had to "pop" the pink chair off the stack and then "pop" the blue chair off the stack before he could get to the green chair.
I'm trying to make it very fun and hands-on. I'm teaching concepts and ideas, and trying to get it a fundamental part of how they think and reason. Of course, as they grow older, I'll probably pick some sort of language and teach them.
However, I truly believe the concepts are the most important, especially because by the time they are older, software will probably be written in some language that has yet to be invented today, and Java, C#, and C++ (the languages we know and love today) will be long-forgotten history.
I started the other night with Collections, Stacks, and Queues. We lined up the Duplo figurines and I explained the FIFO (first-in, first-out) concept. Also, is the Queue empty? How many items are in the Queue. Michael completely understood the concept, except of course he was a bit iffy with the terminology. He refused to use the word "Queue" and kept using "Line". But he gets the concepts of lines, and waiting in line, and first-come first-served, things being "fair" is very important to him.
We went on to stacks. I took their plastic IKEA chairs, and stacked them up 3 high. Michael knows the word "stack" already ... I'm sure he has stacked blocks in school and they refer to them as stacks. I was careful to use the terms "push onto the stack", "pop off the stack", and "peek at the item in the stack". He was pretty good with all of those, and understood that when I stacked the chairs:
PINK |
BLUE |
GREEN |
That he had to "pop" the pink chair off the stack and then "pop" the blue chair off the stack before he could get to the green chair.
Comments
Post a Comment