What Is Programming?

Programming In Today’s World | Who Can Code?

Photo by Jean-Louis Paulin

Programming Today

First I need to let you into a little secret – computers are dumb.  Really, they are! A computer does not know how to do anything, they need to be told to do things.

Have you ever seen a dog do a trick?  When the owner says “sit”, “stay”, “paw”, “fetch” or “rollover”, to which the dog responds by doing a certain action.  The dog has been taught, it has maybe taken many steps for the dog to learn the complete trick.

Photo by Jamie Street

Programming is the dialogue (written words ‘syntax‘) a bit like the instructions you would give to the dog.  Breaking the entire trick down into steps, teaching one bit of the trick and then moving onto the next bit.

As a programmer you will think of something to build (‘problem‘) & break it down into manageable chunks.  Maybe you want to make an app, a mobile game, web based game, website, or something else.

The way we write code (syntax) will change depending on the language.  Each programming language will have its own set of instructions.

Have you ever written a poem?  They often have a few words on each line, rhyming words, a theme (topic) in the piece you write and being usually just a few paragraphs or less in length.  Writing a small story is quite different.  They often have a contents page, opening paragraph, chapter one, chapter two, chapter three, etc.  The structure of each chapter needs to include that chapters part of the story, the characters, the events that happen, have jokes or a sneaky story line.  How a poem and a small story differ are noticeable, but  so long as you understand the structure and bring your awesome imagination – great things can be made!

Sometimes we want to let our code (technology) ‘talk’ to another code (technology), or maybe we want to access some functionality given by someones else’s code (technology)  i.e by Facebook, iOS, Android, Twitter, etc.  How we can connect? It is through an Application Programming Interface (API).  Think of it almost like a syntax tool set that allows connectivity, data sharing & much more!  API is the collection of sequences, instructions and tools for software components.

Examples of API’s

Android API – Developers for the android platform use a bunch of groups of code (classeswe will talk more about classes later) and groups of code/files/information called packages, to make android applications.  If you wanted to build a compass app, a programmer could use the android API  to use the android phones motion sensors, such as the gyroscope.

Google Maps API – You may have seen Google Maps on a phone, computer/mac.  It is a mapping service, so you can use it to know where you are, where any destination is, to map out a route (& more!).  If someone wanted to make an app say of the school playground game tag/tig,  a programmer could use the Google Maps API in their app to monitor where the players were!

How To Think Like A Programmer

One reason Scratch is so awesome, is because it exposes kids to the need to think like a programmer!  Before you get down to any programming syntax (the structure of a language i.e. of Java, C#, JavaScript….etc), you need to understand the problem your code will need to solve.

Whether we are making an app for businesses,a game , app, functionality for devices such as ATM’s or even checkout till systems, as programmers we need to break down how we will approach any problem.

Photo by Tijana Drndarski

TASK  How would you take a cookie from this cookie jar?

Write down a list of steps to take a cookie out of this cookie jar. Each step just one action.

EXAMPLE: The kind of thing to write, if the task was describe how you would get into a car:

1- Go outside
2- Open the car door
3- Sit in the seat
4- Close the car door

SOLUTION: Have you had a go?  Watch the video below for my answer:

ICC Full Scratch Offering Overview

For an overview of this blog offering please click here!