What IS Coding? Gearing up for Computer Science Education Week & An Hour of Code

I sat at a Thanksgiving dinner table about a week and a half ago with a group of friends.  We were enjoying our feast and chatting about this and that. Since most of us at the table were either teachers, spouses of teachers, or children…you can imagine how our conversation kept drifting back to issues in education.  I started telling one friend about my goal of learning to code, and she asked a simple question:

“What IS coding anyway?”

This question provoked a little nervous tingle, as I realized this was the first time I had been asked to explain something about coding to another teacher. I had to stop, rewind my brain to just over two months ago when I started to explore this very question, and try to conceive an answer that would make sense to someone with the same background and lack of technical expertise as myself. My response was something like this:

“Coding is very basically giving your computer a set of instructions that you write in a programming language. The computer then responds by doing what you told it to do.”

I was relieved when this came out of my mouth and I realized that it largely made sense. This conversation also made me realize that could be important to spend some more time considering what that coding really is, and ponder some ways to synthesize and explain it to people who might not have any background, or might never have had any interest before. 

When I was first learning to code, I would Google things like “programming for beginners”, “what is coding?” and “learning to code”. My search efforts would return tons of great resources for people who already know a little bit about computers, and are not completely intimidated by words like “algorithm”. Many of the search results assume you know what a “console” is, are already comfortable with words like “variables” and “data types”, or what a “platform” is. If you don’t already know these things, do not worry about them! I think there is a level of beginner explanation that is just plain difficult to find. Just to be clear, I recognize that there are tons of great beginner resources out there…I just found myself wishing for an even more novice level of basic description. With this in mind, I’m going to attempt to offer my own supplement, and explain programming in a way that makes sense to me and might appeal to a broad array of non-programmers. 

This seems like a particularly relevant thing to do now, since this is Computer Science Education Week (Dec. 8 – 14). All this week, millions of children around the world will participate in “An Hour of Code“. This is a challenge to teachers, administrators, community members, and families to offer children “a one-hour introduction to computer science, designed to demystify code and show that anybody can learn the basics.” Code.org is organizing and promoting this challenge, and they offer tons of great resources on their website. 

Note: Although some argue that there are differences, I use “coding” and “programming” interchangeably throughout this post in reference to “the act of writing computer programs”. 

Keep reading if:

  • You have ever wondered about coding/programming
  • You have never wondered about coding/programming (because it is never too late to start!)
  • You have tried to look up coding and programming before, and didn’t gain a whole lot of understanding
  • You do not consider yourself very tech-savvy or computer literate
  • You are curious about how someone who meets the above criteria might explain programming
  • You are curious what children are actually learning from beginner tutorials 

Programs

OS-X-Mavericks-Desktop-MacBook
Image source: http://bit.ly/12Fv7G7

Everything on your computer is done with programs. Computer programs are files saved on your hard drive (the same way you would save a Word Document or a Powerpoint Presentation). When you run the programs (files), your computer does things. When you buy a new computer, it comes with tons of programs already saved on it. They are organized, and already work together to make your computer do all the neat things it does. You might have a pretty background of an ocean. You will see little colorful icons that represent things you can easily interpret, like “calendar”, or “address book”. When you click on the little icons, your computer does different things. The manufacturer added all of these things in order to make your experience of using a computer easy and enjoyable. When you surf the internet, you encounter beautiful pages that are (hopefully) easy to use and simple to navigate. Programming is responsible for each and every one of the above things, as they are all just programs or groups of programs working together.

computer-hardware-1080242
Image Source: http://bit.ly/12Z3AAI

Hardware v. Software

If you were to strip away all of the shiny bells, whistles, applications, and software that come on your computer, you have the most basic thing…the “hardware” that composes the machine. Everything that adds functionality to the machine is composed of programs, and is called “software”. The first thing you would add, for example, is an operating system (like Windows, Linux, or Mac OS). An operating system is a complex collection of programs that work together to give the computer its functionality. The operating system allows the computer to think and interact. It allows your mouse and keyboard to work, and sound to come out of the speakers. Every other program you add to your computer interacts with the operating system, and builds more capability for thinking and performing.

Hardware & Software…Body & Thoughts

bm
Image Source: http://bit.ly/1AVRSlb

If you compare a computer to a human (something generally a little easier to understand), the hardware is like the body. Bones, muscles, organs, skin…they all work together to form the most basic physiology. The body is the machine, but it does not just work on its own. Bodies need instructions, or messages from the brain, to perform their functions.

The role of computer programs can be compared to the functionality of the brain and nervous system in the human body. The brain transmits electrical impulses/signals between different parts of the body that instruct it to function, and programs do this for computers. All of these programs are just text files. They are saved on your computer’s hard drive (which might be compared to a human’s physical brain matter), and consist of lines of code (which might be compared to a human’s thoughts and knowledge). The code provides the instructions, and can be called upon when the computer or user (you) needs.

Human “Programs”

stages
Image Source: http://bit.ly/1s54IxW

When we learn how to walk, we are acquiring a set of instructions that “programs” our body to send the proper electrical impulses through our nervous system to coordinate our thinking and movement into a reliable method of transport. We might say we acquire a “program” for walking. Once walking is mastered, we can call upon it whenever we would like (generally speaking). Over the course of our lives we acquire astronomical amounts of information from our environments (input) that enables “programs” for things we do (output). Once established, those “programs” simply work. We don’t have to consciously tell our bodies to put one foot in front of the other, coordinate balance, and repeat…we just intend to walk and our bodies do it. The more knowledge a human gains, they more they are able to do, and the same is true for computers: The more programs we save to our computer, the more functionality it has.

Low-Level v. High-Level

Some computer programs are low level, and provide basic function. This can be compared to human heartbeats and breathing. Some programs are higher level, necessitating more sets of instructions to run. Some higher level human functions are typing, skateboarding, or drinking coffee. Some programs some work together in groups, like the operating system of your computer. For humans this might be the way you have to coordinate your hands, eye movements, spatial perception, and thinking in order to type.

Writing Code & Thinking Thoughts

bigstock-Lights-Of-Human-Mind-48190634-1024x768
Image Source: http://bit.ly/1s54O8C

The lines of code contained within computer programs are written in languages that the computer understands, interprets, and processes, just as your body understands, interprets, and processes the electrical impulses (thoughts and knowledge) originating in your brain.

When you can be the one to write the programs, you possess an incredible ability to make your computer do anything you can imagine. Harnessing this power is as simple as learning a programming language and being able to write text files in ways that will make sense to your computer. However, interpretation and “sense-making” of input (programs) is an area where computer programming is decidedly different than human functionality.

Human Capability v. Computer Capability

Screen Shot 2014-12-08 at 1.08.29 PM
If a friend left you this note, would you know what to do? A computer would not.

The human brain is capable of incredibly complex functions, like computers, but unlike computers, it is capable of abstract interpretation and thought.  Let’s say you speak English, and need to tell an acquaintance that speaks Spanish to meet at the park at 3:00. You could look up the basic words for “meet” “park”, combine with numbers “3:00”, jot a little note, and expect the person to understand the message. Their brain is most likely capable of filling in the gaps between your words, and showing up to meet you. When you are at the park, you each might only know a few words of each other’s language, but you can communicate a great deal through body language, facial expression, and drawing pictures if need be. Humans are capable of reading between the lines, so to speak. Computers are NOT capable of filling in gaps like this. They understand things exactly as you tell them. If you don’t write your code in the right order, include all necessary variables, or punctuate properly, it will simply be rejected.

Logic & Sets of Rules

This is where logic comes into play. There certainly is logic involved with speaking or writing a language like English or Spanish. However, speaking and using these human languages is much more forgiving. Computer code needs to be written in ways that are completely accurate, and progress in ways that are completely logical to effectively instruct a computer. Computers are simply not as smart as humans. The good news is that the accuracy of logic you need to achieve with writing computer code is fairly consistent. You can learn some sets of rules, and then you don’t have to worry that your computer will misinterpret them.

The sets of rules for the Ruby programming language are what I’m learning. The sets of rules for the programming language JavaScript are what the official 2014 Hour of Code tutorials are teaching on code.org. The cool thing is that the components and sets of rules for both languages are incredibly similar, and contain a huge amount of overlap. Both languages contain basic components (words, numbers, punctuation). Both languages are based on English. Both languages rely on grammar rules that you can learn and apply.

A Simple Example

In “Why’s Poignant Guide to Ruby“, the first line of code you learn is this:

Screen Shot 2014-12-08 at 11.27.16 AM

Easy, right? Now thanks to Why the Lucky Stiff (the author), you’ve learned a line of code too!

I am still very much a beginner in my own process, as I have only been learning for a little over two months. This has, however, been long enough to gain confidence in my ability to understand, and feel curiosity for what else is ahead. 

Maybe you understand enough to explain coding to someone else, or maybe you understand enough to try a beginner coding tutorial to see what this is all about for yourself! Maybe you feel curious enough to find a child or children with whom to try anHour of Code! Most importantly, you can now ask yourself: “How am I going to participate in this conversation?”


What is the purpose of “An Hour of Code”?

Hour of Codetutorials are teaching the sets of rules in ways that are fun and accessible for children. Rather than typing in actual lines of code, you snap together visual blocks that represent lines of code and list the code’s function, like “turn right” or “go straight”.

2677.AngryBirdsHoC_7AF3B48F
Can you can figure out what the blocks mean, and how you would stack them to make the bird reach the pig?

Thus, these tutorials are not teaching children to remember the specifics of JavaScript. They are not teaching specific commands, ways to type words, or specific places to put the punctuation. They are teaching the sets of rules necessary to use logic to make all the basic pieces of code fit together to make computers do things. In the learning process, the programming language doesn’t need to come first. Instead, the concepts and logical thinking can. If you engage in the thinking, then you can more easily understand the specifics of a programming language should you decide to learn how to code in the future.

Through the “Hour of Code” tutorials, and other great beginner resources, anyone can cultivate a critical understanding:

You can easily construct sets of instructions on a computer can fit together in logical and interesting ways to make your computer do things.

That is coding.

Will the children who participate in “Hour of Code” be more apt to become programmers? Not necessarily, and this should not be the goal.  We can, however, hypothesize that they will be more apt to be comfortable using their brains in this very logical and very human way. We can hope that they might feel more empowered to be curious about computer programming, and see it as something fun and interesting, rather than hard and confusing. Further, when teachers become engaged, student interests and questions can be supported in endless ways. I think these possibilities can be celebrated!


What do you still wonder about programming?

What are you doing to celebrate, recognize, or participate in “Computer Science Education Week“?

4 thoughts on “What IS Coding? Gearing up for Computer Science Education Week & An Hour of Code

  1. Hi, Lauren
    “That was a jolly good effort”, he says, being frightfully English !
    The grammar (syntax) is correct, the general structure is satisfactory, etc, but does it work (run properly) ?
    Time for field testing. Find a human who knows nothing about programming and is unhappy with their lack of knowledge. Get them to read this (your post, I mean) and evaluate the results, which can vary from quivering heap to signing up for a Microsoft training course, and tell us the results.
    Merry, if busy, Christmas !

    Like

  2. I know absolutely nothing about coding. However, the way it is explained here both intrigues and makes(some) sense to me. The way it is explained as more or less the language your computer speaks gets the ball rolling in my head. I will have to keep reading! But, as a beginner, one of the first steps is *wanting* to learn more and that has been accomplished!

    Like

Leave a comment