Programming for Kids - Variables

The Act of Remembering

What did you have for breakfast this morning? Did you have a plate of steaming hot pancakes, a bowl of cereal with cold milk, or maybe you had something else entirely. I’m sure that with some effort most would be able to remember the meal that we had this morning.

Image

The human brain is truly a marvel. Scientists discovered that recording a memory requires adjusting connections between neurons. A single neuron sends a message across a gap to another neuron. The human brain has over 100 billion neurons and they are constantly changing the ways in which they talk to one another. How humans remember is a huge topic of discussion and if you’re interested be sure to check out more resources on how the brain works.

Computers in a similar fashion to humans can remember information. Now here’s where computers has an advantage over humans. When it comes to storing information, computers are far superior to humans. Computers can store really really long numbers such as the first 200 digits of Pi faster than you could read it from the screen. The information that computers store is called data and are stored with electricity and magnets within the computer.

Remember programmers from our last lesson. Right! We are going to learn how Programmers teach our computers to remember information.

Programmers use computer language to ask their computer for a box an empty box of memory. It may go something like this:

Image

To store information a programmer will have to the very specific and ask for the computer to remember the information. Remember in a previous lesson, we talked about how computer speak different languages. Some computers speak in very specific terms and others are more casual about their language. In some computer languages you have to tell the computer what type of memory you want it to remember.

Image

Some computers speak a language that is smart to understand what you are asking without telling them what type of information you want it to remember.

Okay that’s great. We can tell the computer to remember something and it stores it. But how do we get the information out of the computer. In the same way programmers will have a conversation that is similar to this in computer language.

Image

So in this instance to return a piece of information. The programmer will have to ask the computer to find the value with the box labelled toy. And the computer happily goes and looks for it opens the box and SHOUTS OUT 3!

Telling a computer how to store and return information is one of the most important lessons in learning how to be a programmer. Now you know how computers store information, I’ll see you in the next lesson on how computers know between right and wrong.