What is programming/coding? Coding or programming is the process of giving your computer a set of instruction to carry out. This set of instructions is referred to as a program, app, application, or software. It can be thought of as a recipe like one you’d follow to make your favorite dessert.
A recipe in English might look something like:
- 1 cup butter
- 1 cup sugar
- 1 egg
- 1 teaspoon vanilla extract
- 2 ¾ cups flour
- 2 teaspoons baking powder
- Preheat Oven to 350°
- Mix dry ingredients
- Mix wet ingredients in a different bowl
- Combine wet & dry ingredients
- Spoon cookies onto tray
- Bake cookies for 15 minutes
Computer programs are written in programming languages that provide the computer step by step instructions on what to do. A recipe written in a programming language might look something like:
ingredients = buyFood(‘eggs’, ‘flour’, ‘butter’, ‘chocolate’)
tools = buyItems(‘oven’, ‘tray’) dough = mix(ingredients)
uncookedCookies = divide(dough)
loadedTray = distribute(uncookedCookies, tray)
cookies = bake(loadedTray, oven, 375F, 15 minutes)
Computers are not as smart as us, and cannot make assumptions. Therefore, we must be very clear and specific in our instructions to ensure that the proper result is achieved. We must use proper syntax when coding, and each language has its own specific syntax. Computers also interpret our instructions in order from top to bottom, so we must make sure that our code is in the right order in order for our code to execute properly.
Coding is used everywhere in our lives, even in places you might not expect. Code is used in our computers cell phones, video games, cars, even things like traffic lights and elevators. Truly we are surrounded by code everywhere we look. In our next blog post we will go over different styles and methods of coding.
By Joey Aronson – Code Naturally Educator